1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-10 08:53:55 +02:00

No longer copy functional tests to the build dir

This should make `_NIX_TEST_ACCEPT=1` work again, fixing #11369.

Progress on #2503
This commit is contained in:
John Ericson 2024-11-01 09:56:50 -04:00
parent 55fe4ee4f3
commit 9d2ed0a7d3
94 changed files with 198 additions and 140 deletions

View file

@ -1,4 +1,4 @@
with import ./config.nix;
with import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/ca/config.nix";
let mkCADerivation = args: mkDerivation ({
__contentAddressed = true;

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
source ./common.sh
source common.sh
requireDaemonNewerThan "2.4pre20210625"

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1

View file

@ -29,5 +29,5 @@ suites += {
'substitute.sh',
'why-depends.sh',
],
'workdir': meson.current_build_dir(),
'workdir': meson.current_source_dir(),
}

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1

View file

@ -2,6 +2,11 @@
source common.sh
FLAKE_PATH=path:$PWD
flakeDir="$TEST_HOME/flake"
mkdir -p "${flakeDir}"
cp flake.nix "${_NIX_TEST_BUILD_DIR}/ca/config.nix" content-addressed.nix "${flakeDir}"
nix run --no-write-lock-file "$FLAKE_PATH#runnable"
# `config.nix` cannot be gotten via build dir / env var (runs afoul pure eval). Instead get from flake.
removeBuildDirRef "$flakeDir"/*.nix
nix run --no-write-lock-file "path:${flakeDir}#runnable"

View file

@ -5,4 +5,3 @@ source common.sh
CONTENT_ADDRESSED=true
cd ..
source ./nix-shell.sh

View file

@ -1,4 +1,4 @@
with import ./config.nix;
with import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/ca/config.nix";
let mkCADerivation = args: mkDerivation ({
__contentAddressed = true;

View file

@ -2,7 +2,7 @@
# build it at once.
with import ./config.nix;
with import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/ca/config.nix";
mkDerivation {
name = "simple";

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1