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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed May 21, 2022 at 22:18 UTC 3069f2a6f4c38e7e599067d2e4a8e31b4f53e2d3
1 file changed +6 -5
t/test-lib.sh
+6 -5
@@ -783,13 +783,13 @@ trap '{ code=$?; set +x; } 2>/dev/null; exit $code' INT TERM HUP
783 # the test_expect_* functions instead.
784
785 test_ok_ () {
786 - finalize_test_case_output ok "$@"
786 test_success=$(($test_success + 1))
787 say_color "" "ok $test_count - $@"
788 + finalize_test_case_output ok "$@"
789 }
790
791 test_failure_ () {
792 - finalize_test_case_output failure "$@"
792 + failure_label=$1
793 test_failure=$(($test_failure + 1))
794 say_color error "not ok $test_count - $1"
795 shift
@@ -799,18 +799,19 @@ test_failure_ () {
799 say_color error "1..$test_count"
800 _error_exit
801 fi
802 + finalize_test_case_output failure "$failure_label" "$@"
803 }
804
805 test_known_broken_ok_ () {
805 - finalize_test_case_output fixed "$@"
806 test_fixed=$(($test_fixed+1))
807 say_color error "ok $test_count - $@ # TODO known breakage vanished"
808 + finalize_test_case_output fixed "$@"
809 }
810
811 test_known_broken_failure_ () {
811 - finalize_test_case_output broken "$@"
812 test_broken=$(($test_broken+1))
813 say_color warn "not ok $test_count - $@ # TODO known breakage"
814 + finalize_test_case_output broken "$@"
815 }
816
817 test_debug () {
@@ -1136,10 +1137,10 @@ test_skip () {
1137
1138 case "$to_skip" in
1139 t)
1139 - finalize_test_case_output skip "$@"
1140
1141 say_color skip "ok $test_count # skip $1 ($skipped_reason)"
1142 : true
1143 + finalize_test_case_output skip "$@"
1144 ;;
1145 *)
1146 false