Duplicated go test
arguments on rerun, causing package is not in std
#381
Labels
bug
Something isn't working
go test
arguments on rerun, causing package is not in std
#381
Given a failing test
test_test.go
when running
gotestsum
with multiple reruns and additional go test flags:we get the red-herring error
on the second(!) rerun.
full output
Note that the reruns stop after 2, even though I specified 4.
I set up an interception of the
go
commands thatgotestsum
actually invokes, and these are interesting:how to intercept
Add a file `go` to some directory, say `./fake-go`, with the contentsIf not using homebrew, insert the absolute path to
go
(command -v go
).Make it executable (
chmod +x fake-go/go
) and run gotestsum asPATH="$(pwd)/fake-go:${PATH}" gotestsum …
Something goes wrong when massaging the test arguments for reruns, but only the second time.
I can work around this by using a one-argument form of the tags flag:
which correctly reruns.
full output
The commands it invokes are still wrong but this no longer breaks
go test
:It is worth noting that the argument list does not continue to grow after the second rerun.
The text was updated successfully, but these errors were encountered: