-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
No longer copy functional tests to the build dir #11792
No longer copy functional tests to the build dir #11792
Conversation
OK just need to fix the VM test, good! |
20fa5a6
to
b3e845b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Some of the refactor suggestions can be follow-ups; would be great to get this in asap.
mkdir -p "$start" | ||
cp -r common common.sh ${config_nix} ./nested-sandboxing "$start" | ||
cp "${_NIX_TEST_BUILD_DIR}/common/subst-vars.sh" "$start/common" | ||
# N.B. redefine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh just that those variables are already defined, and so I am redefining them
(mutating doesn't seem right since the scope is difference)
_NIX_TEST_SOURCE_DIR="$start" | ||
_NIX_TEST_BUILD_DIR="$start" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want these to be the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -55,6 +55,10 @@ in | |||
-e 's!nix_tests += test-libstoreconsumer\.sh!!' \ | |||
; | |||
|
|||
_NIX_TEST_SOURCE_DIR="$(realpath tests/functional)" | |||
export _NIX_TEST_SOURCE_DIR | |||
export _NIX_TEST_BUILD_DIR="''${_NIX_TEST_SOURCE_DIR}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the old configured source has those coincide. I'll switch it over in the next PR.
export _NIX_TEST_SOURCE_DIR=$PWD | ||
export _NIX_TEST_BUILD_DIR=$PWD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I've copied the needed files from both locations into one location to get inside the sandbox.
@@ -1,6 +1,6 @@ | |||
{ busybox }: | |||
|
|||
with import ./config.nix; | |||
with import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/config.nix"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be factored into a file?
I think this would be nice:
with import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/config.nix"; | |
with import ./config.nix; |
+
tests/functional/config.nix
:
import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/config.nix"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh hah! that's not bad :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh but let's do that after we get rid of the old build system, because it will probably break it when we have a config.nix.in
and config.nix
in the same dir.
This should make `_NIX_TEST_ACCEPT=1` work again, fixing NixOS#11369. Progress on NixOS#2503
b3e845b
to
9d2ed0a
Compare
As requested in NixOS#11792 (comment)
As requested in NixOS#11792 (comment)
Motivation
This should make
_NIX_TEST_ACCEPT=1
work again, fixing #11369.Context
Progress on #2503
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.