Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpgme: respect the doCheck parameter #187061

Merged
merged 2 commits into from Aug 18, 2022
Merged

gpgme: respect the doCheck parameter #187061

merged 2 commits into from Aug 18, 2022

Conversation

ghost
Copy link

@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).
# 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
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
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
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
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant