No longer copy functional tests to the build dir#11792
No longer copy functional tests to the build dir#11792Ericson2314 merged 1 commit intoNixOS:masterfrom
Conversation
|
OK just need to fix the VM test, good! |
20fa5a6 to
b3e845b
Compare
roberth
left a comment
There was a problem hiding this comment.
❤️
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.
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.
Do we want these to be the same?
|
|
||
| _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.
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.
Because I've copied the needed files from both locations into one location to get inside the sandbox.
| { busybox }: | ||
|
|
||
| with import ./config.nix; | ||
| with import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/config.nix"; |
There was a problem hiding this comment.
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.
Oh hah! that's not bad :)
There was a problem hiding this comment.
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=1work 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.