@@ -36,7 +36,8 @@ const (
36
36
)
37
37
38
38
var (
39
- end = regexp .MustCompile (`--- (PASS|SKIP|FAIL):\s+([a-zA-Z_]\S*) \(([\.\d]+)\)` )
39
+ // Looks for the final status line, accommodating both simple and full summaries.
40
+ end = regexp .MustCompile (`\n(PASS|SKIP|FAIL)(?:[\t\s]+(.*)\s+([0-9\.]+[a-z]+))?\s*$` )
40
41
diff = regexp .MustCompile (`\[Diff\] (.*)` )
41
42
paniced = regexp .MustCompile (`panic:\s+(.*)\s+\[recovered\]\n` )
42
43
//suite = regexp.MustCompile("^(ok|FAIL)\\s+([^\\s]+)\\s+([\\.\\d]+)s")
@@ -100,7 +101,8 @@ func (test *TeamCityTest) FormatTestOutput() string {
100
101
}
101
102
102
103
if test .Fail {
103
- output .WriteString (fmt .Sprintf (TeamCityTestFailed , now , test .Name ))
104
+ // skip failures for diff tests
105
+ output .WriteString (fmt .Sprintf (TeamCityTestIgnored , now , test .Name ))
104
106
output .WriteString (fmt .Sprintf (TeamCityTestFinished , now , test .Name ))
105
107
return output .String ()
106
108
}
@@ -121,8 +123,8 @@ func (test *TeamCityTest) FormatTestOutput() string {
121
123
return output .String ()
122
124
}
123
125
124
- // test passes if no diff, even if failure (failure artifacts will be in regular_failure_file.log)
125
- output .WriteString (fmt .Sprintf (TeamCityTestFinished , now , test .Name ))
126
+ // instead of failing when something unexpected happens, we skip the test now
127
+ output .WriteString (fmt .Sprintf (TeamCityTestIgnored , now , test .Name ))
126
128
127
129
return output .String ()
128
130
}
0 commit comments