aboutsummaryrefslogtreecommitdiffstats
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-01 09:04:39 -0800
committerJunio C Hamano <gitster@pobox.com>2019-12-01 09:04:39 -0800
commit4ab9616c766b9a0929e8970569bf7dedd554bcdc (patch)
tree0397a7ab99e10d035426db09b97d5bc47edc90e5 /t/test-lib.sh
parent723a8adba5748a8acd0024e68276119d57eee6f8 (diff)
parente0316695ec323d2dde837e32ba16a82a36d828b4 (diff)
downloadgit-4ab9616c766b9a0929e8970569bf7dedd554bcdc.tar.gz
Merge branch 'sg/skip-skipped-prereq'
Test update to avoid wasted cycles. * sg/skip-skipped-prereq: test-lib: don't check prereqs of test cases that won't be run anyway
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 46c4440843..e8ae150d75 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1004,6 +1004,12 @@ test_skip () {
to_skip=t
skipped_reason="GIT_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
@@ -1016,12 +1022,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)