@@ -36,7 +36,8 @@ const (
3636)
3737
3838var (
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*$` )
4041 diff = regexp .MustCompile (`\[Diff\] (.*)` )
4142 paniced = regexp .MustCompile (`panic:\s+(.*)\s+\[recovered\]\n` )
4243 //suite = regexp.MustCompile("^(ok|FAIL)\\s+([^\\s]+)\\s+([\\.\\d]+)s")
@@ -100,7 +101,8 @@ func (test *TeamCityTest) FormatTestOutput() string {
100101 }
101102
102103 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 ))
104106 output .WriteString (fmt .Sprintf (TeamCityTestFinished , now , test .Name ))
105107 return output .String ()
106108 }
@@ -121,8 +123,8 @@ func (test *TeamCityTest) FormatTestOutput() string {
121123 return output .String ()
122124 }
123125
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 ))
126128
127129 return output .String ()
128130}
0 commit comments