If you are looking for inspiration, then this  archive contains
Fedora .spec files. Grepping for `%gocheck`, it seems that
golang-github-gogo-protobuf.spec is using the `-r` option this way:
%gocheck -t protoc-gen-gogo -d test/moredefaults -d test/dashfilename -d
test/embedconflict -d test/issue270 -r .*/unsafeunmarshaler -r
.*/unsafeboth -r .*/unsafemarshaler -d test/packed
Not sure if that helps.
Thanks for mentioning this Vít, I hadn't realised this existed. Will definitely make
it much easier to learn from other packagers by grepping through all the spec files in the
The regexp flag is advanced use and quite quirky to use. First,
means regexp as implemented by Golang (ie, not exactly usual shell
regexp syntax). And second, the other simplified flags hide quite a lot
of internal Golang complexity, from memory and without testing I’m
almost certain that what you think of “./” does not exist for Golang,
you need to qualify the path with the Go package name at least.
I think I'm realising that what the `-r` flag is referring to is regex of the path
with the package name and not the filename of a test file itself, which is how I was
trying to use it.
This is seemingly how it is being used in the case of golang-github-gogo-protobuf.spec at
least (seemingly the only spec file existing that is using the `-r` flag). Where `-r
.*/unsafeboth` would match
However it's my understanding that this would match all "*_test.go" files in
these matching paths. Whereas I was hoping to exclude a single "*_test.go" at a
specific path since I don't want to disable all the other tests.
Unless there is another way, I think that the only way to do what I desire is to include a
patch for the deletion of the "_test.go" files I require. At least until
something like https://github.com/golang/go/issues/41583
is implemented (and I assume
`%gocheck` could make use of).