aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-05 17:45:22 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-05 17:45:22 +0200
commitbb50c8931934d04dbf61bd245b4583f8c1ac4fd9 (patch)
tree47d4dfef0da6ac7b2bd9cde3336b12f57a6a14aa /tests
parent465cb6824401541d82489e11b5223dbfd50bb132 (diff)
Make the location of the build directory in the sandbox configurable
This is mostly for use in the sandbox tests, since if the Nix store is under /build, then we can't use /build as the build directory.
Diffstat (limited to 'tests')
-rw-r--r--tests/build-remote.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/build-remote.sh b/tests/build-remote.sh
index 071011dcb..927a217f3 100644
--- a/tests/build-remote.sh
+++ b/tests/build-remote.sh
@@ -12,9 +12,13 @@ rm -rf $TEST_ROOT/store0 $TEST_ROOT/store1
# FIXME: --option is not passed to build-remote, so have to create a config file.
export NIX_CONF_DIR=$TEST_ROOT/etc2
mkdir -p $NIX_CONF_DIR
-echo "build-sandbox-paths = /nix/store" > $NIX_CONF_DIR/nix.conf
+echo "
+build-sandbox-paths = /nix/store
+sandbox-build-dir = /build-tmp
+" > $NIX_CONF_DIR/nix.conf
-outPath=$(nix-build build-hook.nix --no-out-link -j0 --option builders "local?root=$TEST_ROOT/store0; local?root=$TEST_ROOT/store1 - - 1 1 foo" --option build-sandbox-paths /nix/store)
+outPath=$(nix-build build-hook.nix --no-out-link -j0 \
+ --option builders "local?root=$TEST_ROOT/store0; local?root=$TEST_ROOT/store1 - - 1 1 foo")
cat $outPath/foobar | grep FOOBAR