mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
tests: Add hydraJobs.tests.functional_*
This commit is contained in:
parent
dc720f89f2
commit
439022c5ac
13 changed files with 273 additions and 28 deletions
|
@ -1,5 +1,30 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
# for shellcheck
|
||||
: "${test_nix_conf_dir?}" "${test_nix_conf?}"
|
||||
|
||||
if isTestOnNixOS; then
|
||||
|
||||
mkdir -p "$test_nix_conf_dir" "$TEST_HOME"
|
||||
|
||||
export NIX_USER_CONF_FILES="$test_nix_conf_dir/nix.conf"
|
||||
mkdir -p "$test_nix_conf_dir" "$TEST_HOME"
|
||||
! test -e "$test_nix_conf"
|
||||
cat > "$test_nix_conf_dir/nix.conf" <<EOF
|
||||
experimental-features = nix-command flakes
|
||||
flake-registry = $TEST_ROOT/registry.json
|
||||
show-trace = true
|
||||
EOF
|
||||
|
||||
# When we're doing everything in the same store, we need to bring
|
||||
# dependencies into context.
|
||||
sed -i "$(dirname "${BASH_SOURCE[0]}")"/../config.nix \
|
||||
-e 's^\(shell\) = "/nix/store/\([^/]*\)/\(.*\)";^\1 = builtins.appendContext "/nix/store/\2" { "/nix/store/\2".path = true; } + "/\3";^' \
|
||||
-e 's^\(path\) = "/nix/store/\([^/]*\)/\(.*\)";^\1 = builtins.appendContext "/nix/store/\2" { "/nix/store/\2".path = true; } + "/\3";^' \
|
||||
;
|
||||
|
||||
else
|
||||
|
||||
test -n "$TEST_ROOT"
|
||||
# We would delete any daemon socket, so let's stop the daemon first.
|
||||
killDaemon
|
||||
|
@ -41,3 +66,5 @@ EOF
|
|||
nix-store --init
|
||||
# Sanity check
|
||||
test -e "$NIX_STATE_DIR"/db/db.sqlite
|
||||
|
||||
fi # !isTestOnNixOS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue