Merge #148: Misc. fixes
e398674964
run-tests.sh: fix leaking tmp files outside TMPDIR (Erik Arvstedt)b07c77f4a4
secrets.nix: remove obsolete comment (Erik Arvstedt) Pull request description: ACKs for top commit: jonasnick: ACKe398674964
Tree-SHA512: 08b61e40fc80d5d1af1d736dd5f27ff3785b07e481f179e525fec4d78d89795c6d572a3a4b9b5ad9afd47656530cbfb8cdc1da9204571eff41767cad7ae1276e
This commit is contained in:
commit
6ec8b1d2a3
@ -47,7 +47,6 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Operation of this service:
|
# Operation of this service:
|
||||||
# - Create missing secrets that are composed of attrs from secrets.nix
|
|
||||||
# - Set owner and permissions for all used secrets
|
# - Set owner and permissions for all used secrets
|
||||||
# - Make all other secrets accessible to root only
|
# - Make all other secrets accessible to root only
|
||||||
# For all steps make sure that no secrets are copied to the nix store.
|
# For all steps make sure that no secrets are copied to the nix store.
|
||||||
|
@ -29,7 +29,7 @@ export NIX_PATH=nixpkgs=$(nix eval --raw -f "$scriptDir/../pkgs/nixpkgs-pinned.n
|
|||||||
# Run the test. No temporary files are left on the host system.
|
# Run the test. No temporary files are left on the host system.
|
||||||
run() {
|
run() {
|
||||||
# TMPDIR is also used by the test driver for VM tmp files
|
# TMPDIR is also used by the test driver for VM tmp files
|
||||||
export TMPDIR=$(mktemp -d -p /tmp nix-bitcoin-test.XXXXXX)
|
export TMPDIR=$(mktemp -d /tmp/nix-bitcoin-test.XXX)
|
||||||
trap "rm -rf $TMPDIR" EXIT
|
trap "rm -rf $TMPDIR" EXIT
|
||||||
|
|
||||||
nix-build --out-link $TMPDIR/driver "$scriptDir/test.nix" -A driver
|
nix-build --out-link $TMPDIR/driver "$scriptDir/test.nix" -A driver
|
||||||
@ -58,9 +58,12 @@ run() {
|
|||||||
|
|
||||||
echo "VM stats: CPUs: $numCPUs, memory: $memoryMiB MiB"
|
echo "VM stats: CPUs: $numCPUs, memory: $memoryMiB MiB"
|
||||||
[[ $NB_TEST_ENABLE_NETWORK ]] || QEMU_NET_OPTS='restrict=on'
|
[[ $NB_TEST_ENABLE_NETWORK ]] || QEMU_NET_OPTS='restrict=on'
|
||||||
|
cd $TMPDIR # The VM creates a VDE control socket in $PWD
|
||||||
env -i \
|
env -i \
|
||||||
NIX_PATH="$NIX_PATH" \
|
NIX_PATH="$NIX_PATH" \
|
||||||
TMPDIR="$TMPDIR" \
|
TMPDIR="$TMPDIR" \
|
||||||
|
USE_TMPDIR=1 \
|
||||||
|
NIX_DISK_IMAGE=$TMPDIR/img.qcow2 \
|
||||||
tests="$tests" \
|
tests="$tests" \
|
||||||
QEMU_OPTS="-smp $numCPUs -m $memoryMiB -nographic $QEMU_OPTS" \
|
QEMU_OPTS="-smp $numCPUs -m $memoryMiB -nographic $QEMU_OPTS" \
|
||||||
QEMU_NET_OPTS="$QEMU_NET_OPTS" \
|
QEMU_NET_OPTS="$QEMU_NET_OPTS" \
|
||||||
|
Loading…
Reference in New Issue
Block a user