Merge fort-nix/nix-bitcoin#435: run-tests: fix vm
cmd
98bc0917d7
run-tests: fix `vm` cmd (Erik Arvstedt) Pull request description: ACKs for top commit: jonasnick: ACK98bc0917d7
Tree-SHA512: c08810fbddac6493c1c8655abebca557a3d096b570598c0d97dfda5a31c864f1b7abc531536f197e1a7a093be5b39b3d9de4b64f8d019814e706080a5c435726
This commit is contained in:
commit
5a24f2afb2
@ -185,13 +185,11 @@ vm() {
|
|||||||
nix-build --out-link $TMPDIR/vm -E "((import \"$scriptDir/tests.nix\" {}).getTest \"$scenario\").vmWithoutTests"
|
nix-build --out-link $TMPDIR/vm -E "((import \"$scriptDir/tests.nix\" {}).getTest \"$scenario\").vmWithoutTests"
|
||||||
|
|
||||||
echo "VM stats: CPUs: $numCPUs, memory: $memoryMiB MiB"
|
echo "VM stats: CPUs: $numCPUs, memory: $memoryMiB MiB"
|
||||||
extraNetOpts=
|
[[ $NB_TEST_ENABLE_NETWORK ]] || export QEMU_NET_OPTS="restrict=on,$QEMU_NET_OPTS"
|
||||||
[[ $NB_TEST_ENABLE_NETWORK ]] || extraNetOpts='restrict=on'
|
|
||||||
|
|
||||||
USE_TMPDIR=1 \
|
USE_TMPDIR=1 \
|
||||||
NIX_DISK_IMAGE=$TMPDIR/img.qcow2 \
|
NIX_DISK_IMAGE=$TMPDIR/img.qcow2 \
|
||||||
QEMU_OPTS="-smp $numCPUs -m $memoryMiB -nographic $QEMU_OPTS" \
|
QEMU_OPTS="-smp $numCPUs -m $memoryMiB -nographic $QEMU_OPTS" \
|
||||||
QEMU_NET_OPTS="$extraNetOpts $QEMU_NET_OPTS" \
|
|
||||||
$TMPDIR/vm/bin/run-*-vm
|
$TMPDIR/vm/bin/run-*-vm
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user