Le mercredi 17 mars 2021 à 09:12 +0000, Bryce Torcello a écrit :
I'm still fairly new to packaging and I was packaging a golang
library when one of it's tests relies on networking so I'd like to
skip it. The Fedora packaging guidelines
suggests the `-r <regexp>` flag would help me do this, however I've
not been able to get it to work.
I've tried `%gocheck -r get_gcs_test.go`, `%gocheck -r
get_gcs_test.*`, `%gocheck -r ./get_gcs_test.go`, as well as adding
double quotes around the filename, but none of these seem to have any
effect on excluding the test. Am I using this flag incorrectly or is
there a bug with this flag?
The regexp flag is advanced use and quite quirky to use. First, regexp
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.
Obviously, exposing raw Golang regexp syntax means the macros can not
fool with the Golang view of things, things like ^ would defeat
attempts to inject a path prefix in the expression supplied by the