run-tests: fix `vm` cmd

Previously, qemu failed with error
`restrict=on : Parameter 'restrict' expects 'on' or 'off'`
due to the trailing space after `on`.
This commit is contained in:
Erik Arvstedt 2022-01-02 22:37:35 +01:00
parent 4d0e196a90
commit 98bc0917d7
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
1 changed files with 1 additions and 3 deletions

View File

@ -185,13 +185,11 @@ vm() {
nix-build --out-link $TMPDIR/vm -E "((import \"$scriptDir/tests.nix\" {}).getTest \"$scenario\").vmWithoutTests"
echo "VM stats: CPUs: $numCPUs, memory: $memoryMiB MiB"
extraNetOpts=
[[ $NB_TEST_ENABLE_NETWORK ]] || extraNetOpts='restrict=on'
[[ $NB_TEST_ENABLE_NETWORK ]] || export QEMU_NET_OPTS="restrict=on,$QEMU_NET_OPTS"
USE_TMPDIR=1 \
NIX_DISK_IMAGE=$TMPDIR/img.qcow2 \
QEMU_OPTS="-smp $numCPUs -m $memoryMiB -nographic $QEMU_OPTS" \
QEMU_NET_OPTS="$extraNetOpts $QEMU_NET_OPTS" \
$TMPDIR/vm/bin/run-*-vm
}