Skip to content

gpgme: respect the doCheck parameter#187061

Merged
dotlambda merged 2 commits intostagingfrom
unknown repository
Aug 18, 2022
Merged

gpgme: respect the doCheck parameter#187061
dotlambda merged 2 commits intostagingfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Aug 17, 2022

Description of changes

The current gpgme expression ignores the doCheck parameter because upstream's Makefile runs the tests automatically as part of the buildPhase. Let's run the tests as part of the checkPhase iff doCheck is set, like the rest of nixpkgs' packages.

In particular, with this commit, pkgsCross.*.gpgme will no longer attempt to run the tests (tests are not supposed to be run when host!=build).

CC @dotlambda -- if there is a better way than setting tests="" to exert control over whether or not the tests are run automatically please let me know. I didn't see one but I could have missed it.

Things done
  • Built on platform(s)
    • powerpc64le-linux
    • mips64el-linux (cross from powerpc64le-linux, build in progress)
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

The current `gpgme` expression ignores the `doCheck` parameter because
upstream's `Makefile` runs the tests automatically as part of the
`buildPhase`.  Let's run the tests as part of the `checkPhase` iff
`doCheck` is set, like the rest of nixpkgs' packages.

In particular, with this commit, `pkgsCross.*.gpgme` will no longer
attempt to run the tests (tests are not supposed to be run when
host!=build).
@ofborg ofborg bot requested a review from dotlambda August 17, 2022 05:19
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Aug 17, 2022
# which has a path length limit. Nix on darwin is using a build directory
# that already has quite a long path and the resulting socket path doesn't
# fit in the limit. https://github.com/NixOS/nix/pull/1085
doCheck = !stdenv.isDarwin;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--disable-gpg-test is not sufficient anymore?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does not seem to disable all of the tests; just some of them:

$ ./configure --help | grep test
  --cache-file=FILE   cache test results in FILE [disabled]
  --disable-glibtest      do not try to compile and run a test GLIB program
  --disable-gpgconf-test  disable GPGCONF regression test
  --disable-gpg-test      disable GPG regression test
  --disable-gpgsm-test    disable GPGSM regression test
  --disable-g13-test      disable G13 regression test

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, but the other tests should remain enabled on Darwin. I see. Fixed in 1519ec7.

@ghost ghost requested a review from dotlambda August 17, 2022 17:24
@ofborg ofborg bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Aug 17, 2022
@dotlambda dotlambda changed the base branch from master to staging August 18, 2022 07:34
@dotlambda dotlambda merged commit c864ea9 into NixOS:staging Aug 18, 2022
@ghost ghost deleted the pr/gpgme/doCheck branch January 23, 2024 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant