From f38b398103fea0423b7bf133bbe5868fde99623c Mon Sep 17 00:00:00 2001 From: Petri Latvala Date: Thu, 28 Nov 2019 10:45:44 +0200 Subject: scripts/run-tests.sh: Use the filter flag values when listing tests 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 v2: Remember to git add after removing debug echos instead of breaking CI Signed-off-by: Petri Latvala Cc: Arkadiusz Hiler Cc: Tomi Sarvela Reviewed-by: Arkadiusz Hiler --- scripts/run-tests.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 615b7da5..b7e2faa3 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 { @@ -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 + 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 -- cgit v1.2.3