mfridman / tparse

CLI tool for summarizing go test output. Pipe friendly. CI/CD friendly.
MIT License
998 stars 22 forks source link

Catch build and setup failures; return correct exit code #60

Closed mfridman closed 2 years ago

mfridman commented 2 years ago

Fix #54

$ go test -count=1  ./... -json | tparse  ; echo status code: $?
# github.com/marco-m/tparse-bugs [github.com/marco-m/tparse-bugs.test]
./a_test.go:6:2: undefined: hello
┌────────────────────────────────────────────────────────────────────────────────────┐
│  STATUS │ ELAPSED │             PACKAGE              │ COVER │ PASS │ FAIL │ SKIP  │
│─────────┼─────────┼──────────────────────────────────┼───────┼──────┼──────┼───────│
│  FAIL   │ 0.00s   │ github.com/marco-m/tparse-bugs   │ --    │ --   │ --   │ --    │
│         │         │ [build failed]                   │       │      │      │       │
│  PASS   │ 0.06s   │ github.com/marco-m/tparse-bugs/b │ 0.0%  │    1 │    0 │    0  │
└────────────────────────────────────────────────────────────────────────────────────┘
status code: 2