summaryrefslogtreecommitdiff
path: root/scripts/run-tests.sh
diff options
context:
space:
mode:
authorMike Mason <michael.w.mason@intel.com>2015-05-05 17:14:55 -0700
committerThomas Wood <thomas.wood@intel.com>2015-05-12 17:03:43 +0100
commit3db5762384a9495241c1e80ce315a2092e83686a (patch)
tree8074698da3d02707cb1f0db4d8ac1d035e1fb7ec /scripts/run-tests.sh
parente949c42b496a3cd4f69a2c1953a58d4c1d1f7b46 (diff)
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>
Diffstat (limited to 'scripts/run-tests.sh')
-rwxr-xr-xscripts/run-tests.sh19
1 files changed, 11 insertions, 8 deletions
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index 5f83dcf8..d65e813a 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -33,13 +33,13 @@ if [ ! -d "$IGT_TEST_ROOT" ]; then
exit 1
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 "Please run make in the tests directory to generate the test list."
+ exit 1
fi
-SINGLE_TEST_LIST=`cat "$IGT_TEST_ROOT/single-tests.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'`
+TEST_LIST=`cat "$IGT_TEST_ROOT/test-list.txt" | sed -e '/TESTLIST/d' -e 's/ /\n/g'`
function download_piglit {
git clone git://anongit.freedesktop.org/piglit "$ROOT/piglit"
@@ -66,12 +66,15 @@ function print_help {
}
function list_tests {
- echo "$SINGLE_TEST_LIST"
- for test in $MULTI_TEST_LIST; do
+ for test in $TEST_LIST; do
SUBTESTS=`"$IGT_TEST_ROOT/$test" --list-subtests`
- for subtest in $SUBTESTS; do
- echo "$test/$subtest"
- done
+ if [ -z "$SUBTESTS" ]; then
+ echo "$test"
+ else
+ for subtest in $SUBTESTS; do
+ echo "$test/$subtest"
+ done
+ fi
done
}