From 0c4dd28d2d3b39216f9d041119ebf34cc44b7df7 Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Tue, 24 Mar 2015 17:33:02 +0000 Subject: 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 --- docs/reference/intel-gpu-tools/Makefile.am | 22 +++++++++++++++------- 1 file 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 "]]>" >> $@; \ if ./$$testprog --list-subtests > /dev/null ; then \ echo "Subtests" >> $@; \ - echo "" >> $@; \ - for subtest in `./$$testprog --list-subtests`; do \ - echo "" >> $@; \ - echo "$$subtest" | perl -pe 's/\b$(KEYWORDS)\b/\1<\/acronym>/g' >> $@; \ - echo "" >> $@; \ - done; \ - echo "" >> $@; \ + subtest_list=`./$$testprog --list-subtests`; \ + subtest_count=`echo $$subtest_list | wc -w`; \ + if [ $$subtest_count -gt 100 ]; then \ + echo "This test has over 100 subtests. " >> $@; \ + echo "Run $$test to list them." >> $@; \ + else \ + echo "" >> $@; \ + for subtest in $$subtest_list; do \ + echo "" >> $@; \ + echo "$$subtest" | perl -pe 's/\b$(KEYWORDS)\b/\1<\/acronym>/g' >> $@; \ + echo "" >> $@; \ + done; \ + echo "" >> $@; \ + fi; \ + echo "" >> $@; \ fi; \ echo "" >> $@; \ done; -- cgit v1.2.3