about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-09-11T13·32+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-09-11T13·32+0000
commit3339f854473863c8780e537626f457be0b2b33e2 (patch)
tree37e7215fbaa94d308bc61463c13793eb2a50d90f /tests
parent9441550acb34cf35f6cd3859d3672adca79551d9 (diff)
* Test the impureEnvVars feature.
Diffstat (limited to 'tests')
-rw-r--r--tests/fixed.builder1.sh2
-rw-r--r--tests/fixed.nix.in1
-rw-r--r--tests/fixed.sh3
3 files changed, 6 insertions, 0 deletions
diff --git a/tests/fixed.builder1.sh b/tests/fixed.builder1.sh
index c792f52a5608..c41bb2b9a611 100644
--- a/tests/fixed.builder1.sh
+++ b/tests/fixed.builder1.sh
@@ -1 +1,3 @@
+if test "$IMPURE_VAR1" != "foo"; then exit 1; fi
+if test "$IMPURE_VAR2" != "bar"; then exit 1; fi
 echo "Hello World!" > $out
diff --git a/tests/fixed.nix.in b/tests/fixed.nix.in
index c7dd99e6f214..5d364eb39ea5 100644
--- a/tests/fixed.nix.in
+++ b/tests/fixed.nix.in
@@ -10,6 +10,7 @@ rec {
     outputHash = hash;
     PATH = "@testPath@";
     inherit dummy;
+    impureEnvVars = ["IMPURE_VAR1" "IMPURE_VAR2"];
   };
 
   f = f2 "";
diff --git a/tests/fixed.sh b/tests/fixed.sh
index d0a284af48c4..72038adfce83 100644
--- a/tests/fixed.sh
+++ b/tests/fixed.sh
@@ -2,6 +2,9 @@ source common.sh
 
 clearStore
 
+export IMPURE_VAR1=foo
+export IMPURE_VAR2=bar
+
 echo 'testing good...'
 drvs=$($nixinstantiate fixed.nix -A good)
 echo $drvs