#!/bin/sh output=$1 filter=$2 testlist=$3 testdir=$(dirname $testlist) KEYWORDS="(invalid|hang|swap|thrash|crc|tiled|tiling|rte|ctx|render|blt|bsd|vebox|exec|rpm)" echo "" > $output echo "> $output echo " \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\"" >> $output echo "[" >> $output echo " " >> $output echo " " >> $output echo "]>" >> $output echo "" >> $output echo "Description" >> $output for test in `cat $testlist | tr ' ' '\n' | grep "^$filter" | sort`; do echo "" >> $output; echo "$test" | perl -pe "s/(?<=_)$KEYWORDS(?=(_|\\W))/<acronym>\\1<\\/acronym>/g" >> $output; echo "> $output; testprog=$testdir/$test; ./$testprog --help-description >> $output; echo "]]>" >> $output; if ./$testprog --list-subtests > /dev/null ; then echo "Subtests" >> $output; 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. " >> $output; echo "Run $test to list them." >> $output; else echo "" >> $output; for subtest in $subtest_list; do echo "" >> $output; echo "$subtest" | perl -pe "s/\\b$KEYWORDS\\b/\\1<\\/acronym>/g" >> $output; echo "" >> $output; done; echo "" >> $output; fi; echo "" >> $output; fi; echo "" >> $output; done; echo "" >> $output