Skip to content

Panic when syntax error output comes after JSON output #39

@daenney

Description

@daenney

We've adopted gotestfmt for Go repos in https://github.com/pion, but every now and then a test run fails with:

panic: unexpected output encountered: exit status 1 (Did you use -json on go test?)

goroutine 7 [running]:
github.com/haveyoudebuggedit/gotestfmt/v2/parser.parse(0xc000062480, 0xc0000624e0, 0xc000062540, 0xc0000625a0, 0xc000062600)
	/home/runner/go/pkg/mod/github.com/haveyoudebuggedit/gotestfmt/v2@v2.3.0/parser/parse.go:163 +0x1588
created by github.com/haveyoudebuggedit/gotestfmt/v2/parser.Parse
	/home/runner/go/pkg/mod/github.com/haveyoudebuggedit/gotestfmt/v2@v2.3.0/parser/parse.go:26 +0xf7
Error: Process completed with exit code 2.

For example:

The rerun is "rerun failed jobs" and then passes, no CI or code changes in between.

I suspect this is some weird interaction with go-acc but the fact that it seems to only happen about 10% of the time has me kinda stuck trying to figure this out. Any pointers or ideas would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions