Commit 7be13d1
committed
tests: let --immediate and --write-junit-xml play well together
When the `--immediate` option is in effect, any test failure will
immediately exit the test script. Together with `--write-junit-xml`, we
will want the JUnit-style `.xml` file to be finalized (and not leave the
XML incomplete). Let's make it so.
This comes in particularly handy when trying to debug via Azure
Pipelines, where the JUnit-style XML is consumed to present the test
results in an informative and helpful way.
While at it, also handle the `error()` code path.
The only remaining code path that sets `GIT_EXIT_OK` happens whenever
the trash directory could not be set up, i.e. long before the JUnit XML
was written, therefore we should _not_ try to finalize that XML in that
case.
It is tempting to change the `immediate` code path to just hand off to
`error`, simplifying the code in the process. That would, however,
result in a change of behavior (an additional error message) in the test
suite, which is outside of the purview of the current patch series: its
goal is to allow building Git with Visual Studio and testing it with a
portable version of Git for Windows.
Signed-off-by: Johannes Schindelin <[email protected]>1 parent 24b1c7b commit 7be13d1
1 file changed
+22
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
| 570 | + | |
570 | 571 | | |
571 | 572 | | |
572 | 573 | | |
| |||
695 | 696 | | |
696 | 697 | | |
697 | 698 | | |
698 | | - | |
| 699 | + | |
699 | 700 | | |
700 | 701 | | |
701 | 702 | | |
| |||
1063 | 1064 | | |
1064 | 1065 | | |
1065 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
1066 | 1086 | | |
1067 | 1087 | | |
1068 | 1088 | | |
| |||
1085 | 1105 | | |
1086 | 1106 | | |
1087 | 1107 | | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | | - | |
1094 | | - | |
1095 | | - | |
1096 | | - | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
| 1108 | + | |
1103 | 1109 | | |
1104 | 1110 | | |
1105 | 1111 | | |
| |||
0 commit comments