aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/dyn-drv/common.sh8
l---------tests/dyn-drv/config.nix.in1
-rw-r--r--tests/dyn-drv/text-hashed-output.nix (renamed from tests/ca/text-hashed-output.nix)0
-rw-r--r--tests/dyn-drv/text-hashed-output.sh (renamed from tests/ca/text-hashed-output.sh)8
-rw-r--r--tests/local.mk15
5 files changed, 20 insertions, 12 deletions
diff --git a/tests/dyn-drv/common.sh b/tests/dyn-drv/common.sh
new file mode 100644
index 000000000..c786f6925
--- /dev/null
+++ b/tests/dyn-drv/common.sh
@@ -0,0 +1,8 @@
+source ../common.sh
+
+# Need backend to support text-hashing too
+requireDaemonNewerThan "2.16.0pre20230419"
+
+enableFeatures "ca-derivations dynamic-derivations"
+
+restartDaemon
diff --git a/tests/dyn-drv/config.nix.in b/tests/dyn-drv/config.nix.in
new file mode 120000
index 000000000..af24ddb30
--- /dev/null
+++ b/tests/dyn-drv/config.nix.in
@@ -0,0 +1 @@
+../config.nix.in \ No newline at end of file
diff --git a/tests/ca/text-hashed-output.nix b/tests/dyn-drv/text-hashed-output.nix
index 31a66dfa8..31a66dfa8 100644
--- a/tests/ca/text-hashed-output.nix
+++ b/tests/dyn-drv/text-hashed-output.nix
diff --git a/tests/ca/text-hashed-output.sh b/tests/dyn-drv/text-hashed-output.sh
index 7d01d5cd7..8c70e0335 100644
--- a/tests/ca/text-hashed-output.sh
+++ b/tests/dyn-drv/text-hashed-output.sh
@@ -2,14 +2,6 @@
source common.sh
-# Need backend to support text-hashing too
-requireDaemonNewerThan "2.16.0pre20230419"
-
-# Globally enable dynamic-derivations in addition to CA derivations
-enableFeatures "dynamic-derivations"
-
-restartDaemon
-
# In the corresponding nix file, we have two derivations: the first, named root,
# is a normal recursive derivation, while the second, named dependent, has the
# new outputHashMode "text". Note that in "dependent", we don't refer to the
diff --git a/tests/local.mk b/tests/local.mk
index e54726787..d3467aac2 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -110,7 +110,7 @@ nix_tests = \
ca/derivation-json.sh \
import-derivation.sh \
ca/import-derivation.sh \
- ca/text-hashed-output.sh \
+ dyn-drv/text-hashed-output.sh \
nix_path.sh \
case-hack.sh \
placeholders.sh \
@@ -138,11 +138,18 @@ ifeq ($(HAVE_LIBCPUID), 1)
nix_tests += compute-levels.sh
endif
-install-tests += $(foreach x, $(nix_tests), tests/$(x))
+install-tests += $(foreach x, $(nix_tests), $(d)/$(x))
-clean-files += $(d)/common/vars-and-functions.sh $(d)/config.nix $(d)/ca/config.nix
+clean-files += \
+ $(d)/common/vars-and-functions.sh \
+ $(d)/config.nix \
+ $(d)/ca/config.nix \
+ $(d)/dyn-drv/config.nix
-test-deps += tests/common/vars-and-functions.sh tests/config.nix tests/ca/config.nix
+test-deps += \
+ tests/common/vars-and-functions.sh \
+ tests/config.nix \
+ tests/dyn-drv/config.nix \
ifeq ($(BUILD_SHARED_LIBS), 1)
test-deps += tests/plugins/libplugintest.$(SO_EXT)