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

notmuch: use test-database in checkPhase #47871

Merged
merged 1 commit into from Oct 5, 2018

Conversation

erictapen
Copy link
Member

@erictapen erictapen commented Oct 4, 2018

Motivation for this change

for running all tests, notmuch requires a database file, which can be downloaded at https://notmuchmail.org/releases/test-databases/

See test/README in notmuch sources for further info.

Things done

In preFixup, fetchurl the file and link it in the corresponding directory. This results in a log diff like this:

 T530-upgrade: Testing database upgrade
- missing prerequisites: database-v1.tar.xz - fetch with 'make download-test-databases'
- SKIP   all tests in T530-upgrade
+ PASS   database checksum
+ PASS   folder: search does not work with old database version
+ PASS   path: search does not work with old database version
+ PASS   pre upgrade dump
+ PASS   database upgrade from format version 1
+ PASS   tag backup matches pre-upgrade dump
+ PASS   folder: no longer matches in the middle of path
+ PASS   folder: search
+ PASS   top level folder: search
+ PASS   path: search
+ PASS   top level path: search
+ PASS   recursive path: search

As test/test-databases/database-v1.tar.xz.sha256 in notmuch sources contains the sha256 of the fetched file, I'd expect the download to be stable between notmuch releases.

Pinging notmuch maintainers @chaoflow @flokli @garbas @the-kenny

This could be (easily) backported.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@erictapen
Copy link
Member Author

Oops, does that ofborg message mean that I cannot do that?

@matthewbauer
Copy link
Member

You should use fetchurl instead of builtins.fetchurl IIUC.

for running all tests, notmuch requires a database file, which can be
downloaded at https://notmuchmail.org/releases/test-databases/

See test/README in notmuch sources for further info.
@erictapen
Copy link
Member Author

erictapen commented Oct 4, 2018 via email

@nlewo
Copy link
Member

nlewo commented Oct 5, 2018

@GrahamcOfBorg build notmuch

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: notmuch

Partial log (click to expand)

/nix/store/hrkm1l161sfrh4qnhrhqmxcadg6cfpmz-notmuch-0.27/lib/libnotmuch.5.2.0.dylib: fixing dylib
/nix/store/hrkm1l161sfrh4qnhrhqmxcadg6cfpmz-notmuch-0.27/lib/libnotmuch.5.2.0.dylib: fixing dylib
/nix/store/hrkm1l161sfrh4qnhrhqmxcadg6cfpmz-notmuch-0.27/lib/libnotmuch.5.2.0.dylib: fixing dylib
/nix/store/hrkm1l161sfrh4qnhrhqmxcadg6cfpmz-notmuch-0.27/lib/libnotmuch.5.2.0.dylib: fixing dylib
/nix/store/hrkm1l161sfrh4qnhrhqmxcadg6cfpmz-notmuch-0.27/lib/libnotmuch.5.2.0.dylib: fixing dylib
/nix/store/hrkm1l161sfrh4qnhrhqmxcadg6cfpmz-notmuch-0.27/lib/libnotmuch.5.2.0.dylib: fixing dylib
/nix/store/hrkm1l161sfrh4qnhrhqmxcadg6cfpmz-notmuch-0.27/lib/libnotmuch.5.2.0.dylib: fixing dylib
/nix/store/hrkm1l161sfrh4qnhrhqmxcadg6cfpmz-notmuch-0.27/lib/libnotmuch.5.2.0.dylib: fixing dylib
/nix/store/hrkm1l161sfrh4qnhrhqmxcadg6cfpmz-notmuch-0.27/lib/libnotmuch.5.2.0.dylib: fixing dylib
/nix/store/hrkm1l161sfrh4qnhrhqmxcadg6cfpmz-notmuch-0.27

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: notmuch

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/bncwgigwn6n6k8fr0wfl9pxdnbhq4852-notmuch-0.27
shrinking /nix/store/bncwgigwn6n6k8fr0wfl9pxdnbhq4852-notmuch-0.27/bin/notmuch
shrinking /nix/store/bncwgigwn6n6k8fr0wfl9pxdnbhq4852-notmuch-0.27/lib/libnotmuch.so.5.2.0
strip is /nix/store/428gs2z4b8f9byvghzlpbjwjb3a7jwxx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/bncwgigwn6n6k8fr0wfl9pxdnbhq4852-notmuch-0.27/lib  /nix/store/bncwgigwn6n6k8fr0wfl9pxdnbhq4852-notmuch-0.27/bin
patching script interpreter paths in /nix/store/bncwgigwn6n6k8fr0wfl9pxdnbhq4852-notmuch-0.27
/nix/store/bncwgigwn6n6k8fr0wfl9pxdnbhq4852-notmuch-0.27/bin/notmuch-emacs-mua: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/017xymp5i03qzigafnfx7sgf6602gmzq-bash-4.4-p23/bin/bash"
checking for references to /build in /nix/store/bncwgigwn6n6k8fr0wfl9pxdnbhq4852-notmuch-0.27...
/nix/store/bncwgigwn6n6k8fr0wfl9pxdnbhq4852-notmuch-0.27

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: notmuch

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/wk48b5vbgmg9w20b4gxxa104khipzh6j-notmuch-0.27
shrinking /nix/store/wk48b5vbgmg9w20b4gxxa104khipzh6j-notmuch-0.27/lib/libnotmuch.so.5.2.0
shrinking /nix/store/wk48b5vbgmg9w20b4gxxa104khipzh6j-notmuch-0.27/bin/notmuch
strip is /nix/store/dxf1m7dhc4qb655bdljc1fsd74v1nag3-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/wk48b5vbgmg9w20b4gxxa104khipzh6j-notmuch-0.27/lib  /nix/store/wk48b5vbgmg9w20b4gxxa104khipzh6j-notmuch-0.27/bin
patching script interpreter paths in /nix/store/wk48b5vbgmg9w20b4gxxa104khipzh6j-notmuch-0.27
/nix/store/wk48b5vbgmg9w20b4gxxa104khipzh6j-notmuch-0.27/bin/notmuch-emacs-mua: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/nii7pk6pv4x4as7vsxbvwyzjn67vax6r-bash-4.4-p23/bin/bash"
checking for references to /build in /nix/store/wk48b5vbgmg9w20b4gxxa104khipzh6j-notmuch-0.27...
/nix/store/wk48b5vbgmg9w20b4gxxa104khipzh6j-notmuch-0.27

@garbas garbas merged commit bea3f18 into NixOS:master Oct 5, 2018
@erictapen erictapen deleted the notmuch-test-db branch October 5, 2018 12:49
@oxij
Copy link
Member

oxij commented Oct 5, 2018 via email

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.

None yet

6 participants