diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 6 | ||||
-rw-r--r-- | tests/build-hook.hook.sh | 16 | ||||
-rw-r--r-- | tests/build-hook.sh | 2 | ||||
-rw-r--r-- | tests/parallel.sh | 2 |
4 files changed, 16 insertions, 10 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 4256625d9dc2..4c8e5d8a54a3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -18,8 +18,10 @@ locking.sh: locking.nix parallel.sh: parallel.nix build-hook.sh: build-hook.nix -TESTS = init.sh simple.sh dependencies.sh locking.sh parallel.sh \ - build-hook.sh +TESTS = init.sh build-hook.sh + +#TESTS = init.sh simple.sh dependencies.sh locking.sh parallel.sh \ +# build-hook.sh XFAIL_TESTS = diff --git a/tests/build-hook.hook.sh b/tests/build-hook.hook.sh index 7176315d9d11..bbf423017f18 100644 --- a/tests/build-hook.hook.sh +++ b/tests/build-hook.hook.sh @@ -1,17 +1,21 @@ +#! /bin/sh + set -x -drv=$1 +drv=$4 -echo "HOOK for $drv" +echo "HOOK for $drv" >&2 outPath=$(sed 's/Derive(\[\"\([^\"]*\)\".*/\1/' $drv) -echo "output path is $outPath" +echo "output path is $outPath" >&2 if $(echo $outPath | grep -q input-1); then + echo "accept" >&3 + read x <&4 + echo "got $x" mkdir $outPath echo "BAR" > $outPath/foo - exit 100 +else + echo "decline" >&3 fi - -exit 101 \ No newline at end of file diff --git a/tests/build-hook.sh b/tests/build-hook.sh index bd74e42fe366..417f8c6d0300 100644 --- a/tests/build-hook.sh +++ b/tests/build-hook.sh @@ -1,4 +1,4 @@ -export NIX_BUILD_HOOK="sh build-hook.hook.sh" +export NIX_BUILD_HOOK="build-hook.hook.sh" storeExpr=$($TOP/src/nix-instantiate/nix-instantiate build-hook.nix) diff --git a/tests/parallel.sh b/tests/parallel.sh index 70996015f838..d16da3a7ac20 100644 --- a/tests/parallel.sh +++ b/tests/parallel.sh @@ -2,7 +2,7 @@ storeExpr=$($TOP/src/nix-instantiate/nix-instantiate parallel.nix) echo "store expr is $storeExpr" -outPath=$($TOP/src/nix-store/nix-store -qnfvvvv -j0 "$storeExpr") +outPath=$($TOP/src/nix-store/nix-store -qnfvvvv -j10000 "$storeExpr") echo "output path is $outPath" |