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

R: give details on test failure #49378

Closed
wants to merge 1 commit into from
Closed

Conversation

timokau
Copy link
Member

@timokau timokau commented Oct 29, 2018

Motivation for this change

I had issues with (a downgraded version of) R in #49249. Those were hard to debug given only the build log since R just told me which test was failing without giving any details about what was going wrong.

This fixes that by also printing the (tail of the) relevant test logs. I'm unsure about the (ab-)use of failureHook here, but I couldn't find a better way to do this without rewriting the checkPhase.

Maintainer @peti.

Things done
  • 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.

Copy link
Member

@peti peti left a comment

Choose a reason for hiding this comment

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

Adding that code into the build expression feels superfluous to be. Just run nix-build with the --keep-failed option, and then it's possible to inspect any of those log files to heart's content.

@timokau
Copy link
Member Author

timokau commented Oct 29, 2018

Thats hard in a non-reproducible case like #49249. And either way it is easier if you don't have to hunt for the log (R doesn't make it quite obvious where the actual logs can be found).

That said I had to add the failureHook anyways to debug #49249 so I just made this PR to save the trouble next time. If you don't think its necessary/don't like it I'm not that invested and I'm fine with this being closed.

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: R

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@peti peti closed this Oct 29, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: R

Partial log (click to expand)

shrinking /nix/store/9naywf8sr76qrxwph2ar7azkh3pqf9l2-R-3.5.1/lib/R/modules/internet.so
shrinking /nix/store/9naywf8sr76qrxwph2ar7azkh3pqf9l2-R-3.5.1/lib/R/modules/R_de.so
shrinking /nix/store/9naywf8sr76qrxwph2ar7azkh3pqf9l2-R-3.5.1/lib/R/modules/lapack.so
shrinking /nix/store/9naywf8sr76qrxwph2ar7azkh3pqf9l2-R-3.5.1/bin/Rscript
gzipping man pages under /nix/store/9naywf8sr76qrxwph2ar7azkh3pqf9l2-R-3.5.1/share/man/
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/9naywf8sr76qrxwph2ar7azkh3pqf9l2-R-3.5.1/lib  /nix/store/9naywf8sr76qrxwph2ar7azkh3pqf9l2-R-3.5.1/bin
patching script interpreter paths in /nix/store/9naywf8sr76qrxwph2ar7azkh3pqf9l2-R-3.5.1
checking for references to /build in /nix/store/9naywf8sr76qrxwph2ar7azkh3pqf9l2-R-3.5.1...
/nix/store/9naywf8sr76qrxwph2ar7azkh3pqf9l2-R-3.5.1

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: R

Partial log (click to expand)

/nix/store/6v87yanvfg2l45scqm2x71q8npwmk372-R-3.5.1/lib/R/lib/libR.dylib: fixing dylib
/nix/store/6v87yanvfg2l45scqm2x71q8npwmk372-R-3.5.1/lib/R/lib/libR.dylib: fixing dylib
/nix/store/6v87yanvfg2l45scqm2x71q8npwmk372-R-3.5.1/lib/R/lib/libR.dylib: fixing dylib
/nix/store/6v87yanvfg2l45scqm2x71q8npwmk372-R-3.5.1/lib/R/lib/libR.dylib: fixing dylib
/nix/store/6v87yanvfg2l45scqm2x71q8npwmk372-R-3.5.1/lib/R/lib/libR.dylib: fixing dylib
/nix/store/6v87yanvfg2l45scqm2x71q8npwmk372-R-3.5.1/lib/R/lib/libR.dylib: fixing dylib
/nix/store/6v87yanvfg2l45scqm2x71q8npwmk372-R-3.5.1/lib/R/lib/libR.dylib: fixing dylib
/nix/store/6v87yanvfg2l45scqm2x71q8npwmk372-R-3.5.1/lib/R/lib/libR.dylib: fixing dylib
/nix/store/6v87yanvfg2l45scqm2x71q8npwmk372-R-3.5.1/lib/R/lib/libR.dylib: fixing dylib
/nix/store/6v87yanvfg2l45scqm2x71q8npwmk372-R-3.5.1/lib/R/lib/libR.dylib: fixing dylib

@timokau timokau mentioned this pull request Dec 16, 2019
10 tasks
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

3 participants