scripts/run-tests.sh: use single combined test list

i-g-t now creates a single combined test list for tests with
and without subtests. This patch adapts run-tests.sh to that
change.

Signed-off-by: Mike Mason <michael.w.mason@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
Mike Mason 2015-05-05 17:14:55 -07:00 committed by Thomas Wood
parent e949c42b49
commit 3db5762384

View File

@ -33,13 +33,13 @@ if [ ! -d "$IGT_TEST_ROOT" ]; then
exit 1 exit 1
fi fi
if [ ! -f "$IGT_TEST_ROOT/single-tests.txt" ]; then if [ ! -f "$IGT_TEST_ROOT/test-list.txt" ]; then
echo "Error: test list not found." echo "Error: test list not found."
echo "Please run make in the tests directory to generate the test list." echo "Please run make in the tests directory to generate the test list."
exit 1
fi fi
SINGLE_TEST_LIST=`cat "$IGT_TEST_ROOT/single-tests.txt" | sed -e '/TESTLIST/d' -e 's/ /\n/g'` TEST_LIST=`cat "$IGT_TEST_ROOT/test-list.txt" | sed -e '/TESTLIST/d' -e 's/ /\n/g'`
MULTI_TEST_LIST=`cat "$IGT_TEST_ROOT/multi-tests.txt" | sed -e '/TESTLIST/d' -e 's/ /\n/g'`
function download_piglit { function download_piglit {
git clone git://anongit.freedesktop.org/piglit "$ROOT/piglit" git clone git://anongit.freedesktop.org/piglit "$ROOT/piglit"
@ -66,12 +66,15 @@ function print_help {
} }
function list_tests { function list_tests {
echo "$SINGLE_TEST_LIST" for test in $TEST_LIST; do
for test in $MULTI_TEST_LIST; do
SUBTESTS=`"$IGT_TEST_ROOT/$test" --list-subtests` SUBTESTS=`"$IGT_TEST_ROOT/$test" --list-subtests`
if [ -z "$SUBTESTS" ]; then
echo "$test"
else
for subtest in $SUBTESTS; do for subtest in $SUBTESTS; do
echo "$test/$subtest" echo "$test/$subtest"
done done
fi
done done
} }