[igt-dev] [PATCH i-g-t 1/1] scripts/run-tests.sh: Use the filter flag values when listing tests

Petri Latvala petri.latvala at intel.com
Wed Nov 27 11:02:51 UTC 2019


Testcase:
scripts/run-tests.sh -l -T fast-feedback.testlist -x vgem_basic

Previously the filters (-T for testlist, -t/-x for regex
include/exclude) were silently dropped when listing tests. Actually
use them for listing, since that works properly when using igt_runner.

Warning for those using piglit (the -p flag): The -x flag for listing
with piglit is the same as -t at this time:
https://gitlab.freedesktop.org/mesa/piglit/issues/29

Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela at intel.com>
---
 scripts/run-tests.sh | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index 615b7da5..2780f59d 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -32,7 +32,6 @@ IGT_RESUME=
 USE_PIGLIT=0
 RUNNER=
 RESUME=
-BLACKLIST=
 
 function find_file # basename <possible paths>
 {
@@ -134,11 +133,11 @@ while getopts ":dhlr:st:T:vx:Rnpb:" opt; do
 		t) FILTER="$FILTER -t $OPTARG" ;;
 		T) FILTER="$FILTER --test-list $OPTARG" ;;
 		v) VERBOSE="-l verbose" ;;
-		x) EXCLUDE="$EXCLUDE -x $OPTARG" ;;
+		x) FILTER="$FILTER -x $OPTARG" ;;
 		R) RESUME_RUN="true" ;;
 		n) NORETRY="--no-retry" ;;
 		p) USE_PIGLIT=1 ;;
-		b) BLACKLIST="$BLACKLIST -b $OPTARG" ;;
+		b) FILTER="$FILTER -b $OPTARG" ;;
 		:)
 			echo "Option -$OPTARG requires an argument."
 			exit 1
@@ -187,12 +186,11 @@ else
 
 	RUNNER=$IGT_RUNNER
 	RESUME=$IGT_RESUME
-	RUN_ARGS="$BLACKLIST"
-	LIST_ARGS="-L $BLACKLIST"
+	LIST_ARGS="-L"
 fi
 
 if [ "x$LIST_TESTS" != "x" ]; then
-	execute_runner 0 $RUNNER $LIST_ARGS
+	echo execute_runner 0 $RUNNER $LIST_ARGS $FILTER
 	exit
 fi
 
@@ -200,7 +198,7 @@ if [ "x$RESUME_RUN" != "x" ]; then
 	execute_runner 1 $RESUME $RESUME_ARGS "$RESULTS"
 else
 	mkdir -p "$RESULTS"
-	execute_runner 1 $RUNNER $RUN_ARGS -o -s "$RESULTS" $VERBOSE $EXCLUDE $FILTER
+	execute_runner 1 $RUNNER $RUN_ARGS -o -s "$RESULTS" $VERBOSE $FILTER
 fi
 
 if [ "$SUMMARY" == "html" ]; then
-- 
2.19.1



More information about the igt-dev mailing list