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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions pkgs/development/libraries/gpgme/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,7 @@ stdenv.mkDerivation rec {
"--enable-fixed-path=${gnupg}/bin"
"--with-libgpg-error-prefix=${libgpg-error.dev}"
"--with-libassuan-prefix=${libassuan.dev}"
] ++ lib.optional pythonSupport "--enable-languages=python"
# Tests will try to communicate with gpg-agent instance via a UNIX socket
# 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
++ lib.optionals stdenv.isDarwin [ "--disable-gpg-test" ];
] ++ lib.optional pythonSupport "--enable-languages=python";

NIX_CFLAGS_COMPILE = toString (
# qgpgme uses Q_ASSERT which retains build inputs at runtime unless
Expand All @@ -110,7 +105,16 @@ stdenv.mkDerivation rec {
++ lib.optional stdenv.hostPlatform.is32bit "-D_FILE_OFFSET_BITS=64"
);

doCheck = true;
# prevent tests from being run during the buildPhase
makeFlags = [ "tests=" ];

# Tests will try to communicate with gpg-agent instance via a UNIX socket
# 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.


checkFlags = [ "-C" "tests" ];

passthru.tests = {
python = python3.pkgs.gpgme;
Expand Down