about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/Makefile.am3
-rw-r--r--tests/init.sh7
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c14b8a9210b0..8a1b824d0c3f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -9,6 +9,7 @@ TESTS_ENVIRONMENT = TEST_ROOT=$(TEST_ROOT) \
   NIX_LOG_DIR=$(TEST_ROOT)/var/log/nix \
   NIX_STATE_DIR=$(TEST_ROOT)/var/nix \
   NIX_DB_DIR=$(TEST_ROOT)/db \
+  NIX_CONF_DIR=$(TEST_ROOT)/etc \
   NIX_BIN_DIR=$(TEST_ROOT)/bin \
   NIX_LIBEXEC_DIR=$(TEST_ROOT)/bin \
   REAL_BIN_DIR=$(bindir) \
@@ -39,7 +40,7 @@ gc-concurrent.sh: gc-concurrent.nix gc-concurrent2.nix
 TESTS = init.sh hash.sh lang.sh simple.sh dependencies.sh locking.sh parallel.sh \
   build-hook.sh substitutes.sh substitutes2.sh fallback.sh nix-push.sh gc.sh \
   gc-concurrent.sh verify.sh nix-pull.sh
-#TESTS = init.sh nix-push.sh nix-pull.sh
+#TESTS = init.sh gc.sh
 
 XFAIL_TESTS =
 
diff --git a/tests/init.sh b/tests/init.sh
index 2ad3c18a7eb0..eb791493ba63 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -13,6 +13,7 @@ mkdir "$NIX_LOCALSTATE_DIR"
 mkdir -p "$NIX_LOG_DIR"
 mkdir "$NIX_STATE_DIR"
 mkdir "$NIX_DB_DIR"
+mkdir "$NIX_CONF_DIR"
 
 mkdir $NIX_BIN_DIR
 ln -s $TOP/src/nix-store/nix-store $NIX_BIN_DIR/
@@ -28,6 +29,12 @@ mkdir -p "$NIX_STATE_DIR"/manifests
 mkdir -p "$NIX_STATE_DIR"/gcroots
 mkdir -p "$NIX_STATE_DIR"/temproots
 
+cat > "$NIX_CONF_DIR"/nix.conf <<EOF
+gc-keep-outputs = false
+gc-keep-derivations = false
+env-keep-derivations = false
+EOF
+
 mkdir $NIX_DATA_DIR/nix
 cp -prd $TOP/corepkgs $NIX_DATA_DIR/nix/
 # Bah, script has the prefix hard-coded.  This is really messy stuff