Re: Excluding tests with %gocheck -r not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le mercredi 17 mars 2021 à 09:12 +0000, Bryce Torcello a écrit :
Hi,

> 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
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/#_running_the_unit_tests_gocheck
>  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
packager.

Regards,

-- 
Nicolas Mailhot
_______________________________________________
packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/packaging@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux