1

I have many classes of test, which are marked with build constraints, e.g.:

//go:build all || (!foo && !bar && !baz && quux)

for the test class quux. This is okay, as far as it goes, but what I'd really rather have is constraints such that the class quux runs for these commands (in the correct directory):

$ go test
$ go test ./...
$ go test ./... -tags quux

but not for

$ go test ./... tags foo

The actual list of test classes is twenty-plus, so

//go:build all || quux || (!foo && !bar && !baz &&...

is not a good option. If there's some way to set the default value of -tags, so that running go test ./... without explicitly passing a -tags argument defaults to -tags all (or even if that's possible but only for bare go test rather than with ./...), that would be good enough.

YoureIt
  • 21
  • 1

0 Answers0