about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am6
-rw-r--r--tests/gc-concurrent.sh4
-rw-r--r--tests/gc.sh2
-rw-r--r--tests/init.sh10
4 files changed, 10 insertions, 12 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3aa43417f1f3..c14b8a9210b0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -5,12 +5,12 @@ extra1 = $(TEST_ROOT)/shared
 TESTS_ENVIRONMENT = TEST_ROOT=$(TEST_ROOT) \
   NIX_STORE_DIR=$(TEST_ROOT)/store \
   NIX_DATA_DIR=$(TEST_ROOT)/data \
-  NIX_LOG_DIR=$(TEST_ROOT)/log \
-  NIX_STATE_DIR=$(TEST_ROOT)/state \
+  NIX_LOCALSTATE_DIR=$(TEST_ROOT)/var \
+  NIX_LOG_DIR=$(TEST_ROOT)/var/log/nix \
+  NIX_STATE_DIR=$(TEST_ROOT)/var/nix \
   NIX_DB_DIR=$(TEST_ROOT)/db \
   NIX_BIN_DIR=$(TEST_ROOT)/bin \
   NIX_LIBEXEC_DIR=$(TEST_ROOT)/bin \
-  NIX_LOCALSTATE_DIR=$(TEST_ROOT)/state \
   REAL_BIN_DIR=$(bindir) \
   REAL_LIBEXEC_DIR=$(libexecdir) \
   REAL_LOCALSTATE_DIR=$(localstatedir) \
diff --git a/tests/gc-concurrent.sh b/tests/gc-concurrent.sh
index c85a03e1ca88..b3fb06535d3d 100644
--- a/tests/gc-concurrent.sh
+++ b/tests/gc-concurrent.sh
@@ -4,9 +4,7 @@ outPath1=$($TOP/src/nix-store/nix-store -q $storeExpr1)
 storeExpr2=$($TOP/src/nix-instantiate/nix-instantiate gc-concurrent2.nix)
 outPath2=$($TOP/src/nix-store/nix-store -q $storeExpr2)
 
-ls -l test-tmp/state/temproots
-
-ln -s $storeExpr2 "$NIX_LOCALSTATE_DIR"/nix/gcroots/foo2
+ln -s $storeExpr2 "$NIX_STATE_DIR"/gcroots/foo2
 
 # Start build #1 in the background.  It starts immediately.
 $TOP/src/nix-store/nix-store -rvv "$storeExpr1" &
diff --git a/tests/gc.sh b/tests/gc.sh
index 9aeda43e7101..e45e35a8c9b6 100644
--- a/tests/gc.sh
+++ b/tests/gc.sh
@@ -2,7 +2,7 @@ storeExpr=$($TOP/src/nix-instantiate/nix-instantiate dependencies.nix)
 outPath=$($TOP/src/nix-store/nix-store -rvv "$storeExpr")
 
 # Set a GC root.
-ln -s $outPath "$NIX_LOCALSTATE_DIR"/nix/gcroots/foo
+ln -s $outPath "$NIX_STATE_DIR"/gcroots/foo
 
 $NIX_BIN_DIR/nix-collect-garbage
 
diff --git a/tests/init.sh b/tests/init.sh
index 63cce81bd79d..2ad3c18a7eb0 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -9,7 +9,8 @@ mkdir "$TEST_ROOT"
 
 mkdir "$NIX_STORE_DIR"
 mkdir "$NIX_DATA_DIR"
-mkdir "$NIX_LOG_DIR"
+mkdir "$NIX_LOCALSTATE_DIR"
+mkdir -p "$NIX_LOG_DIR"
 mkdir "$NIX_STATE_DIR"
 mkdir "$NIX_DB_DIR"
 
@@ -23,10 +24,9 @@ mkdir $NIX_BIN_DIR/nix
 ln -s $TOP/scripts/download-using-manifests.pl $NIX_BIN_DIR/nix/
 ln -s $TOP/scripts/readmanifest.pm $NIX_BIN_DIR/nix/
 
-mkdir -p "$NIX_LOCALSTATE_DIR"/nix/manifests
-mkdir -p "$NIX_LOCALSTATE_DIR"/nix/gcroots
-mkdir -p "$NIX_LOCALSTATE_DIR"/log/nix
-mkdir -p "$NIX_LOCALSTATE_DIR"/temproots
+mkdir -p "$NIX_STATE_DIR"/manifests
+mkdir -p "$NIX_STATE_DIR"/gcroots
+mkdir -p "$NIX_STATE_DIR"/temproots
 
 mkdir $NIX_DATA_DIR/nix
 cp -prd $TOP/corepkgs $NIX_DATA_DIR/nix/