run-tests: fix command debug
on NixOS 22.05
This commit is contained in:
parent
a8255d61d7
commit
2ae2eea54e
@ -135,15 +135,17 @@ run() {
|
|||||||
echo "Running interactive testing environment"
|
echo "Running interactive testing environment"
|
||||||
tests=$(
|
tests=$(
|
||||||
echo 'is_interactive = True'
|
echo 'is_interactive = True'
|
||||||
echo 'exec(os.environ["testScript"])'
|
echo 'exec(open(os.environ["testScript"]).read())'
|
||||||
# Start VM
|
# Start VM
|
||||||
echo 'start_all()'
|
echo 'start_all()'
|
||||||
# Start REPL
|
# Start REPL.
|
||||||
|
# Use `code.interact` for the REPL instead of the builtin test driver REPL
|
||||||
|
# because it supports low featured terminals like Emacs' shell-mode.
|
||||||
echo 'import code'
|
echo 'import code'
|
||||||
echo 'code.interact(local=globals())'
|
echo 'code.interact(local=globals())'
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
tests='exec(os.environ["testScript"])'
|
tests='exec(open(os.environ["testScript"]).read())'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "VM stats: CPUs: $numCPUs, memory: $memoryMiB MiB"
|
echo "VM stats: CPUs: $numCPUs, memory: $memoryMiB MiB"
|
||||||
@ -154,10 +156,9 @@ run() {
|
|||||||
TMPDIR="$TMPDIR" \
|
TMPDIR="$TMPDIR" \
|
||||||
USE_TMPDIR=1 \
|
USE_TMPDIR=1 \
|
||||||
NIX_DISK_IMAGE=$TMPDIR/img.qcow2 \
|
NIX_DISK_IMAGE=$TMPDIR/img.qcow2 \
|
||||||
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" \
|
||||||
$TMPDIR/driver/bin/nixos-test-driver
|
$TMPDIR/driver/bin/nixos-test-driver <(echo "$tests")
|
||||||
}
|
}
|
||||||
|
|
||||||
debug() {
|
debug() {
|
||||||
|
Loading…
Reference in New Issue
Block a user