summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-05-17 14:39:18 -0700
committerJunio C Hamano <gitster@pobox.com>2023-05-17 14:39:18 -0700
commit8afb2c2c8beb89c11a03e658b8dbc23878cf8491 (patch)
treea2986c9daf1f81540a1539ee915ae50be08d8db5
parent4a40cd62e84510e500a02f0d9b07bc38ce640ac7 (diff)
parentf216b8d143694b84e4f123abf214224d98cbd569 (diff)
downloadgit-8afb2c2c8beb89c11a03e658b8dbc23878cf8491.tar.gz
Merge branch 'ad/test-record-count-when-harness-is-in-use' into seen
Allow summary results from tests to be written to t/test-results directory even when a test harness like 'prove' is in use. * ad/test-record-count-when-harness-is-in-use: test-lib: allow storing counts with test harnesses
-rw-r--r--t/test-lib.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 293caf0f20..3315919eaf 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -157,6 +157,8 @@ parse_option () {
local opt="$1"
case "$opt" in
+ -c|--c|--co|--cou|--coun|--count|--counts)
+ record_counts=t ;;
-d|--d|--de|--deb|--debu|--debug)
debug=t ;;
-i|--i|--im|--imm|--imme|--immed|--immedi|--immedia|--immediat|--immediate)
@@ -1276,7 +1278,7 @@ test_done () {
finalize_test_output
- if test -z "$HARNESS_ACTIVE"
+ if test -z "$HARNESS_ACTIVE" || test -n "$record_counts"
then
mkdir -p "$TEST_RESULTS_DIR"