about summary refs log tree commit diff
path: root/tests/substitutes.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-06-24T12·56+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-06-24T12·56+0000
commit8052aef4866e236ef0bb5d5675bbae330abb9b9b (patch)
tree149cae936f60724b4ccdb8714bff97950dc3ddf7 /tests/substitutes.sh
parent66c7f347591c0c4e26e018672c487a3090e36e5e (diff)
* A test for multiple and/or failing substitutes.
Diffstat (limited to 'tests/substitutes.sh')
-rw-r--r--tests/substitutes.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/substitutes.sh b/tests/substitutes.sh
index ea214a8a8a43..7b236249b190 100644
--- a/tests/substitutes.sh
+++ b/tests/substitutes.sh
@@ -10,13 +10,17 @@ echo "output path is $outPath"
 subExpr=$($TOP/src/nix-instantiate/nix-instantiate substituter.nix)
 echo "store expr is $subExpr"
 
+regSub() {
+    (echo $1 && echo $2 && echo "/substituter" && echo 3 && echo $outPath && echo Hallo && echo Wereld) | $TOP/src/nix-store/nix-store --substitute
+}
+
 # Register a fake successor, and a substitute for it.
 suc=$NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-s.store
-(echo $suc && echo $subExpr && echo "/substituter" && echo 3 && echo $outPath && echo Hallo && echo Wereld) | $TOP/src/nix-store/nix-store --substitute
+regSub $suc $subExpr
 $TOP/src/nix-store/nix-store --successor $storeExpr $suc
 
 # Register a substitute for the output path.
-(echo $outPath && echo $subExpr && echo "/substituter" && echo 3 && echo $outPath && echo Hallo && echo Wereld) | $TOP/src/nix-store/nix-store --substitute
+regSub $outPath $subExpr
 
 
 $TOP/src/nix-store/nix-store -rvvvvv "$storeExpr"