File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ func main() {
102
102
}
103
103
fmt .Fprintf (out , "\n " )
104
104
105
- if * setExitCode && report .HasFailures () {
105
+ if * setExitCode && ! report .IsSuccessful () {
106
106
os .Exit (1 )
107
107
}
108
108
}
Original file line number Diff line number Diff line change @@ -19,15 +19,18 @@ type Report struct {
19
19
Packages []Package
20
20
}
21
21
22
- func (r * Report ) HasFailures () bool {
22
+ func (r * Report ) IsSuccessful () bool {
23
23
for _ , pkg := range r .Packages {
24
+ if pkg .BuildError .Name != "" || pkg .RunError .Name != "" {
25
+ return false
26
+ }
24
27
for _ , t := range pkg .Tests {
25
- if t .Result == Fail {
26
- return true
28
+ if t .Result != Pass && t . Result != Skip {
29
+ return false
27
30
}
28
31
}
29
32
}
30
- return false
33
+ return true
31
34
}
32
35
33
36
type Package struct {
You can’t perform that action at this time.
0 commit comments