aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/binary-cache.sh2
-rw-r--r--tests/config.sh9
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/binary-cache.sh b/tests/binary-cache.sh
index e14cf882e..6415c9302 100644
--- a/tests/binary-cache.sh
+++ b/tests/binary-cache.sh
@@ -271,5 +271,5 @@ rm $cacheDir/$(hashpart $docPath).narinfo
nix-store --delete $outPath $docPath
# -vvv is the level that logs during the loop
-timeout 60 nix-build -E "$expr" --option substituters "file://$cacheDir" \
+timeout 60 nix-build --no-out-link -E "$expr" --option substituters "file://$cacheDir" \
--option trusted-binary-caches "file://$cacheDir" --no-require-sigs
diff --git a/tests/config.sh b/tests/config.sh
index 8fa349f11..eaa46c395 100644
--- a/tests/config.sh
+++ b/tests/config.sh
@@ -16,3 +16,12 @@ here=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")
export NIX_USER_CONF_FILES=$here/config/nix-with-substituters.conf
var=$(nix show-config | grep '^substituters =' | cut -d '=' -f 2 | xargs)
[[ $var == https://example.com ]]
+
+# Test that it's possible to load config from the environment
+prev=$(nix show-config | grep '^cores' | cut -d '=' -f 2 | xargs)
+export NIX_CONFIG="cores = 4242"$'\n'"experimental-features = nix-command flakes"
+exp_cores=$(nix show-config | grep '^cores' | cut -d '=' -f 2 | xargs)
+exp_features=$(nix show-config | grep '^experimental-features' | cut -d '=' -f 2 | xargs)
+[[ $prev != $exp_cores ]]
+[[ $exp_cores == "4242" ]]
+[[ $exp_features == "nix-command flakes" ]] \ No newline at end of file