summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2015-03-24 17:33:02 +0000
committerThomas Wood <thomas.wood@intel.com>2015-03-26 15:50:41 +0000
commit0c4dd28d2d3b39216f9d041119ebf34cc44b7df7 (patch)
treee5faa4bc7acfc1bceddeb3ed9502c172a9deffd3 /docs
parent76dad7f41475347f99e8a8ce6af67020dfd7c0f1 (diff)
docs: limit the number of subtests listed
Avoid producing long lists of subtests in the documentation and instead provide instructions on how to obtain the full list. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/intel-gpu-tools/Makefile.am22
1 files changed, 15 insertions, 7 deletions
diff --git a/docs/reference/intel-gpu-tools/Makefile.am b/docs/reference/intel-gpu-tools/Makefile.am
index 0f10eaab..fa19701d 100644
--- a/docs/reference/intel-gpu-tools/Makefile.am
+++ b/docs/reference/intel-gpu-tools/Makefile.am
@@ -46,13 +46,21 @@ xml/igt_test_programs_%_description.xml: $(TESTLISTS)
echo "]]></para>" >> $@; \
if ./$$testprog --list-subtests > /dev/null ; then \
echo "<refsect3><title>Subtests</title>" >> $@; \
- echo "<simplelist>" >> $@; \
- for subtest in `./$$testprog --list-subtests`; do \
- echo "<member>" >> $@; \
- echo "$$subtest" | perl -pe 's/\b$(KEYWORDS)\b/<acronym>\1<\/acronym>/g' >> $@; \
- echo "</member>" >> $@; \
- done; \
- echo "</simplelist></refsect3>" >> $@; \
+ subtest_list=`./$$testprog --list-subtests`; \
+ subtest_count=`echo $$subtest_list | wc -w`; \
+ if [ $$subtest_count -gt 100 ]; then \
+ echo "<para>This test has over 100 subtests. " >> $@; \
+ echo "Run <command>$$test</command> <option>--list-subtests</option> to list them.</para>" >> $@; \
+ else \
+ echo "<simplelist>" >> $@; \
+ for subtest in $$subtest_list; do \
+ echo "<member>" >> $@; \
+ echo "$$subtest" | perl -pe 's/\b$(KEYWORDS)\b/<acronym>\1<\/acronym>/g' >> $@; \
+ echo "</member>" >> $@; \
+ done; \
+ echo "</simplelist>" >> $@; \
+ fi; \
+ echo "</refsect3>" >> $@; \
fi; \
echo "</refsect2>" >> $@; \
done;