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

Show skipped tests and strictDeps = true #4659

Merged
merged 3 commits into from Apr 15, 2021

Conversation

roberth
Copy link
Member

@roberth roberth commented Mar 23, 2021

I wanted to check the assumption that utillinuxMinimal is placed correctly in buildInputs rather than nativeBuildInputs because of NixOS/nixpkgs#117295
To my surprise, Nix builds the same with strictDeps, despite the fact that it should be in nativeBuildInputs in order to run (unshare during tests), at least to my understanding. utillinuxMinimal outputs do not appear in the output closure either, which also seems to suggest that it should be in nativeBuildInputs.

@Ericson2314 should utillinuxMinimal move to nativeBuildInputs? Why doesn't this PR break the build?

@Ericson2314
Copy link
Member

@roberth I am surprised too. And built locally to double check (thanks for the rebase). But I recall @FRidh once added something to enlarge the path at test time with the understanding that testing only works when build = host. Perhaps that's it?

@Ericson2314
Copy link
Member

Nevermind I think was thinking of NixOS/nixpkgs@a1a5ea5, which is more minimal. So I'm confused too. Did nix-shell . --pure and it is indeed not there.

@Ericson2314
Copy link
Member

Ericson2314 commented Mar 23, 2021

I'm trying with

diff --git a/tests/common.sh.in b/tests/common.sh.in
index de44a4da4..443a853fc 100644
--- a/tests/common.sh.in
+++ b/tests/common.sh.in
@@ -89,9 +89,13 @@ killDaemon() {
     trap "" EXIT
 }

+echo BIG UNSHARE
+echo $PATH
+set -x
 if [[ $(uname) == Linux ]] && [[ -L /proc/self/ns/user ]] && unshare --user true; then
     _canUseSandbox=1
 fi
+set +x

 canUseSandbox() {
     if [[ ! $_canUseSandbox ]]; then

edit doh, it's no use if passinig tests hide their stuff!

@roberth
Copy link
Member Author

roberth commented Mar 24, 2021

Turns out the tests weren't honest about which ones were skipped.
@Ericson2314 stdenv still works as expected.

@roberth roberth changed the title flake.nix: Build nix with strictDeps = true Show skipped tests and strictDeps = true Mar 31, 2021
roberth added a commit to hercules-ci/nixpkgs that referenced this pull request Apr 2, 2021
on linux.

To find problems like this earlier: NixOS/nix#4659
@roberth roberth mentioned this pull request Apr 2, 2021
10 tasks
@edolstra edolstra merged commit 76980a1 into NixOS:master Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants