Re: Excluding tests with %gocheck -r not working

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

 



If you are looking for inspiration, then this [1] archive contains all 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.


Vít


[1] https://pkgs.fedoraproject.org/repo/rpm-specs-latest.tar.xz


Dne 17. 03. 21 v 10:12 Bryce Torcello napsal(a):
Hello all,

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?

I looked at a number of other golang packages and I wasn't able to find any other uses of the `-r` flag. Only noting uses of the `-d <directory>` flag, which does seem to work in my case but excludes other tests which I do not want to exclude.

--
Bryce Torcello
https://procupti.me
_______________________________________________
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

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
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