From f407223e4c15e923e07aa3efbe3c55f76d3d1fa7 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 3 Jun 2019 11:28:45 +0100 Subject: [PATCH] ci: dedup ignore_test validation Move the validation before the tests, since it's completely agnostic. Any empty lines have already been stripped away. This effectively removes fairly confusing output such as: Running unreliable deqp-gl32 on vtest-softpipe: Fail - passed 0/0 tests It used to happen since we run piglit/deqp with empty list, when we did not need to run it at all. Aside: this has uncovered a piglit bug, where it will run all tests, when the list is empty. Signed-off-by: Emil Velikov Reviewed-by: Elie Tournier --- ci/run_test_suite.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/ci/run_test_suite.sh b/ci/run_test_suite.sh index c3a041b..f5a9f84 100755 --- a/ci/run_test_suite.sh +++ b/ci/run_test_suite.sh @@ -232,6 +232,14 @@ run_test_suite() printf "Running ${UNRELIABLE_STRING}$TEST_APP-$TEST_NAME on $DRIVER_NAME: " fi + if test $VERIFY_UNRELIABLE_TESTS -eq 1; then + TEST_FILE="$IGNORE_TESTS_FILE" + if test ! -f $TEST_FILE -o $(wc -l $TEST_FILE | cut -f1 -d' ') -eq 0; then + echo "Unreliable: no ignore tests." + return 0 + fi + fi + if [ "$TEST_APP" = "piglit" ]; then # Don't run GLX tests @@ -239,10 +247,6 @@ run_test_suite() if [ $VERIFY_UNRELIABLE_TESTS -eq 1 ]; then UNRELIABLE_TESTS=$(cat $IGNORE_TESTS_FILE 2>/dev/null) - if [[ -z $UNRELIABLE_TESTS ]]; then - echo "Ignore - No unreliable tests found" - return 0 - fi for UNRELIABLE_TEST in $UNRELIABLE_TESTS; do PIGLIT_TESTS="$PIGLIT_TESTS -t $UNRELIABLE_TEST" @@ -267,14 +271,6 @@ run_test_suite() elif [ "$TEST_APP" = "deqp" ]; then - if [ $VERIFY_UNRELIABLE_TESTS -eq 1 ]; then - TEST_FILE="$IGNORE_TESTS_FILE" - if [ ! -f $TEST_FILE ]; then - echo "Ignore - No unreliable tests found" - return 0 - fi - fi - deqp \ --cts-build-dir $CTS_PATH/build \ --test-names-file "$TEST_FILE" \ @@ -478,4 +474,4 @@ setup() setup parse_input $@ -run_all_tests "$BACKENDS" "$TESTS" \ No newline at end of file +run_all_tests "$BACKENDS" "$TESTS"