Browse Source

Fix test script

master
James Mills 3 days ago
parent
commit
29d703b677
Signed by: prologic
GPG Key ID: AC4C014F1440EBD6
  1. 24
      test.sh

24
test.sh

@ -1,19 +1,27 @@
#!/bin/sh
set -e
QEMU_OPTS=
if [ "$(uname -s)" = "Darwin" ]; then
QEMU_OPTS="$QEMU_OPTS -accel hvf,thread=multi"
else
if grep flags /proc/cpuinfo | head -n 1 | grep -q -E '(vmx|svm)'; then
QEMU_OPTS="$QEMU_OPTS -accel kvm,thread=multi"
fi
fi
# XXX: Disabled because qemu Homebrew Formulae by default on macOS doesn't
# support hvf acceleration
#if [ "$(uname -s)" = "Darwin" ]; then
# QEMU_OPTS="$QEMU_OPTS -accel hvf,thread=multi"
#else
# if grep flags /proc/cpuinfo | head -n 1 | grep -q -E '(vmx|svm)'; then
# QEMU_OPTS="$QEMU_OPTS -accel kvm,thread=multi"
# fi
#fi
[ -n "$HEADLESS" ] && QEMU_OPTS="$QEMU_OPTS -nographic"
[ -n "$CLOUDDRIVE" ] && QEMU_OPTS="$QEMU_OPTS -drive file=clouddrive.iso,index=1,media=cdrom"
[ -z "$DISK" ] && DISK="ulinux.img"
if [ -z "$DISK" ]; then
if [ -f "ulinux.img" ]; then
DISK="ulinux.img"
fi
fi
[ -z "$DISKIF" ] && DISKIF="ide"
[ -n "$DISK" ] && QEMU_OPTS="$QEMU_OPTS -drive file=$DISK,index=2,media=disk,if=$DISKIF,cache=writethrough"

Loading…
Cancel
Save