* A test for the nix-worker.

This commit is contained in:
Eelco Dolstra 2007-08-13 14:56:40 +00:00
parent 550ba9ebb4
commit a7e1a51fdf
4 changed files with 24 additions and 2 deletions

View file

@ -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 \ 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 \ 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 \ 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 = XFAIL_TESTS =

View file

@ -18,7 +18,9 @@ export NIX_LIBEXEC_DIR=$TEST_ROOT/bin
export NIX_ROOT_FINDER= export NIX_ROOT_FINDER=
export SHARED=$TEST_ROOT/shared export SHARED=$TEST_ROOT/shared
if test -z "$FORCE_NIX_REMOTE"; then
export NIX_REMOTE= export NIX_REMOTE=
fi
export REAL_BIN_DIR=@bindir@ export REAL_BIN_DIR=@bindir@
export REAL_LIBEXEC_DIR=@libexecdir@ 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 nixstore=$TOP/src/nix-store/nix-store
export nixenv=$TOP/src/nix-env/nix-env export nixenv=$TOP/src/nix-env/nix-env
export nixhash=$TOP/src/nix-hash/nix-hash export nixhash=$TOP/src/nix-hash/nix-hash
export nixworker=$TOP/src/nix-worker/nix-worker
export nixbuild=$NIX_BIN_DIR/nix-build export nixbuild=$NIX_BIN_DIR/nix-build
readLink() { readLink() {

View file

@ -22,6 +22,7 @@ ln -s $nixstore $NIX_BIN_DIR/
ln -s $nixinstantiate $NIX_BIN_DIR/ ln -s $nixinstantiate $NIX_BIN_DIR/
ln -s $nixhash $NIX_BIN_DIR/ ln -s $nixhash $NIX_BIN_DIR/
ln -s $nixenv $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-prefetch-url $NIX_BIN_DIR/
ln -s $TOP/scripts/nix-collect-garbage $NIX_BIN_DIR/ ln -s $TOP/scripts/nix-collect-garbage $NIX_BIN_DIR/
ln -s $TOP/scripts/nix-build $NIX_BIN_DIR/ ln -s $TOP/scripts/nix-build $NIX_BIN_DIR/

17
tests/remote-store.sh Normal file
View file

@ -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