forked from lix-project/lix
* Refactoring.
This commit is contained in:
parent
0243eea4b9
commit
4bdb51e621
|
@ -18,9 +18,7 @@ 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@
|
||||||
|
@ -77,6 +75,19 @@ clearManifests() {
|
||||||
rm -f $NIX_STATE_DIR/manifests/*
|
rm -f $NIX_STATE_DIR/manifests/*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
startDaemon() {
|
||||||
|
$nixworker --daemon &
|
||||||
|
pidDaemon=$!
|
||||||
|
trap "kill -9 $pidDaemon" EXIT
|
||||||
|
export NIX_REMOTE=daemon
|
||||||
|
}
|
||||||
|
|
||||||
|
killDaemon() {
|
||||||
|
kill -9 $pidDaemon
|
||||||
|
wait $pidDaemon || true
|
||||||
|
trap "" EXIT
|
||||||
|
}
|
||||||
|
|
||||||
fail() {
|
fail() {
|
||||||
echo "$1"
|
echo "$1"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
source common.sh
|
source common.sh
|
||||||
|
|
||||||
export FORCE_NIX_REMOTE=1
|
|
||||||
|
|
||||||
echo '*** testing slave mode ***'
|
echo '*** testing slave mode ***'
|
||||||
clearStore
|
clearStore
|
||||||
clearManifests
|
clearManifests
|
||||||
|
@ -10,10 +8,6 @@ NIX_REMOTE=slave $SHELL ./user-envs.sh
|
||||||
echo '*** testing daemon mode ***'
|
echo '*** testing daemon mode ***'
|
||||||
clearStore
|
clearStore
|
||||||
clearManifests
|
clearManifests
|
||||||
$nixworker --daemon &
|
startDaemon
|
||||||
pidDaemon=$!
|
$SHELL ./user-envs.sh
|
||||||
trap "kill -9 $pidDaemon" EXIT
|
killDaemon
|
||||||
NIX_REMOTE=daemon $SHELL ./user-envs.sh
|
|
||||||
kill -9 $pidDaemon
|
|
||||||
wait $pidDaemon || true
|
|
||||||
trap "" EXIT
|
|
||||||
|
|
Loading…
Reference in a new issue