Skip to content

Commit eb53a5b

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 0276842 commit eb53a5b

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
@@ -734,30 +734,31 @@ trap '{ code=$?; set +x; } 2>/dev/null; exit $code' INT TERM HUP
734734
# the test_expect_* functions instead.
735735

736736
test_ok_ () {
737-
finalize_test_case_output ok "$@"
738737
test_success=$(($test_success + 1))
739738
say_color "" "ok $test_count - $@"
739+
finalize_test_case_output ok "$@"
740740
}
741741

742742
test_failure_ () {
743-
finalize_test_case_output failure "$@"
743+
failure_label=$1
744744
test_failure=$(($test_failure + 1))
745745
say_color error "not ok $test_count - $1"
746746
shift
747747
printf '%s\n' "$*" | sed -e 's/^/# /'
748748
test "$immediate" = "" || _error_exit
749+
finalize_test_case_output failure "$failure_label" "$@"
749750
}
750751

751752
test_known_broken_ok_ () {
752-
finalize_test_case_output fixed "$@"
753753
test_fixed=$(($test_fixed+1))
754754
say_color error "ok $test_count - $@ # TODO known breakage vanished"
755+
finalize_test_case_output fixed "$@"
755756
}
756757

757758
test_known_broken_failure_ () {
758-
finalize_test_case_output broken "$@"
759759
test_broken=$(($test_broken+1))
760760
say_color warn "not ok $test_count - $@ # TODO known breakage"
761+
finalize_test_case_output broken "$@"
761762
}
762763

763764
test_debug () {
@@ -1083,10 +1084,10 @@ test_skip () {
10831084

10841085
case "$to_skip" in
10851086
t)
1086-
finalize_test_case_output skip "$@"
10871087

10881088
say_color skip "ok $test_count # skip $1 ($skipped_reason)"
10891089
: true
1090+
finalize_test_case_output skip "$@"
10901091
;;
10911092
*)
10921093
false

0 commit comments

Comments
 (0)