diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-08-13 14:56:40 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-08-13 14:56:40 +0000 |
commit | a7e1a51fdf5d93b0a158a120595443fe9c7c6687 (patch) | |
tree | f49f3ea5568ce73e4b80774935a7ce5910c4a4a0 /tests | |
parent | 550ba9ebb4b1b2415c9930879cfa6937f7fa916a (diff) | |
download | guix-a7e1a51fdf5d93b0a158a120595443fe9c7c6687.tar.gz |
* A test for the nix-worker.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/common.sh.in | 5 | ||||
-rw-r--r-- | tests/init.sh | 1 | ||||
-rw-r--r-- | tests/remote-store.sh | 17 |
4 files changed, 24 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 31ad159b06..bab9e8ee47 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -18,7 +18,8 @@ TESTS = init.sh hash.sh lang.sh add.sh simple.sh dependencies.sh \ locking.sh parallel.sh build-hook.sh substitutes.sh substitutes2.sh \ fallback.sh nix-push.sh gc.sh gc-concurrent.sh verify.sh nix-pull.sh \ referrers.sh user-envs.sh logging.sh nix-build.sh misc.sh fixed.sh \ - gc-runtime.sh install-package.sh check-refs.sh filter-source.sh + gc-runtime.sh install-package.sh check-refs.sh filter-source.sh \ + remote-store.sh XFAIL_TESTS = diff --git a/tests/common.sh.in b/tests/common.sh.in index 1b8bb3e7df..4228811ff9 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -18,7 +18,9 @@ export NIX_LIBEXEC_DIR=$TEST_ROOT/bin export NIX_ROOT_FINDER= export SHARED=$TEST_ROOT/shared -export NIX_REMOTE= +if test -z "$FORCE_NIX_REMOTE"; then + export NIX_REMOTE= +fi export REAL_BIN_DIR=@bindir@ export REAL_LIBEXEC_DIR=@libexecdir@ @@ -45,6 +47,7 @@ export nixinstantiate=$TOP/src/nix-instantiate/nix-instantiate export nixstore=$TOP/src/nix-store/nix-store export nixenv=$TOP/src/nix-env/nix-env export nixhash=$TOP/src/nix-hash/nix-hash +export nixworker=$TOP/src/nix-worker/nix-worker export nixbuild=$NIX_BIN_DIR/nix-build readLink() { diff --git a/tests/init.sh b/tests/init.sh index 160cb6b0a9..b5c62f4087 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -22,6 +22,7 @@ ln -s $nixstore $NIX_BIN_DIR/ ln -s $nixinstantiate $NIX_BIN_DIR/ ln -s $nixhash $NIX_BIN_DIR/ ln -s $nixenv $NIX_BIN_DIR/ +ln -s $nixworker $NIX_BIN_DIR/ ln -s $TOP/scripts/nix-prefetch-url $NIX_BIN_DIR/ ln -s $TOP/scripts/nix-collect-garbage $NIX_BIN_DIR/ ln -s $TOP/scripts/nix-build $NIX_BIN_DIR/ diff --git a/tests/remote-store.sh b/tests/remote-store.sh new file mode 100644 index 0000000000..4a31312f58 --- /dev/null +++ b/tests/remote-store.sh @@ -0,0 +1,17 @@ +source common.sh + +export FORCE_NIX_REMOTE=1 + +echo '*** testing slave mode ***' +clearStore +clearManifests +NIX_REMOTE=slave sh ./user-envs.sh + +echo '*** testing daemon mode ***' +clearStore +clearManifests +$nixworker --daemon & +pidDaemon=$! +NIX_REMOTE=daemon sh ./user-envs.sh +kill -9 $pidDaemon +wait $pidDaemon || true |