Skip to content

Commit 3069f2a

Browse files
dschogitster
authored andcommitted
ci: call finalize_test_case_output a little later
We used to call that function already before printing the final verdict. However, now that we added grouping to the GitHub workflow output, we will want to include even that part in the collapsible group for that test case. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aeea008 commit 3069f2a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

t/test-lib.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -783,13 +783,13 @@ trap '{ code=$?; set +x; } 2>/dev/null; exit $code' INT TERM HUP
783783
# the test_expect_* functions instead.
784784

785785
test_ok_ () {
786-
finalize_test_case_output ok "$@"
787786
test_success=$(($test_success + 1))
788787
say_color "" "ok $test_count - $@"
788+
finalize_test_case_output ok "$@"
789789
}
790790

791791
test_failure_ () {
792-
finalize_test_case_output failure "$@"
792+
failure_label=$1
793793
test_failure=$(($test_failure + 1))
794794
say_color error "not ok $test_count - $1"
795795
shift
@@ -799,18 +799,19 @@ test_failure_ () {
799799
say_color error "1..$test_count"
800800
_error_exit
801801
fi
802+
finalize_test_case_output failure "$failure_label" "$@"
802803
}
803804

804805
test_known_broken_ok_ () {
805-
finalize_test_case_output fixed "$@"
806806
test_fixed=$(($test_fixed+1))
807807
say_color error "ok $test_count - $@ # TODO known breakage vanished"
808+
finalize_test_case_output fixed "$@"
808809
}
809810

810811
test_known_broken_failure_ () {
811-
finalize_test_case_output broken "$@"
812812
test_broken=$(($test_broken+1))
813813
say_color warn "not ok $test_count - $@ # TODO known breakage"
814+
finalize_test_case_output broken "$@"
814815
}
815816

816817
test_debug () {
@@ -1136,10 +1137,10 @@ test_skip () {
11361137

11371138
case "$to_skip" in
11381139
t)
1139-
finalize_test_case_output skip "$@"
11401140

11411141
say_color skip "ok $test_count # skip $1 ($skipped_reason)"
11421142
: true
1143+
finalize_test_case_output skip "$@"
11431144
;;
11441145
*)
11451146
false

0 commit comments

Comments
 (0)