From bff8c4a65989c51704a8844f759ed492a1b10bb8 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Fri, 9 Mar 2018 19:53:54 -0800 Subject: [PATCH] test-lib-main.sh: check --run before prereqs When skipping tests using --run there's no reason to complain about missing prereqs for a test that's being skipped anyway. Move the $run_list check ahead of the $test_prereq check where it belongs to avoid bogus missing prerequisite messages when skipping the tests that set them. With this ordering, the "--run" default "partially active" --quiet mode avoids generating spammy messages about missing prereqs that resulted from skipping tests (via "--run") that would have set them. Signed-off-by: Kyle J. McKay --- t/test-lib-main.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/test-lib-main.sh b/t/test-lib-main.sh index 5601d92..972c6f9 100644 --- a/t/test-lib-main.sh +++ b/t/test-lib-main.sh @@ -547,6 +547,12 @@ test_skip() { to_skip=t skipped_reason="TESTLIB_SKIP_TESTS" fi + if test -z "$to_skip" && test -n "$run_list" && + ! match_test_selector_list '--run' $test_count "$run_list" + then + to_skip=t + skipped_reason="--run" + fi if test -z "$to_skip" && test -n "$test_prereq" && ! test_have_prereq "$test_prereq" then @@ -559,12 +565,6 @@ test_skip() { fi skipped_reason="missing $missing_prereq${of_prereq}" fi - if test -z "$to_skip" && test -n "$run_list" && - ! match_test_selector_list '--run' $test_count "$run_list" - then - to_skip=t - skipped_reason="--run" - fi case "$to_skip" in t) -- 2.11.4.GIT