Skip to content

Commit

Permalink
Enable multithread testing using qemu-system
Browse files Browse the repository at this point in the history
  • Loading branch information
malbarbo committed Nov 22, 2017
1 parent 5be02f8 commit d83b621
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docker/linux-runner
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ case "$CROSS_RUNNER" in
;;
esac

export -n RUST_TEST_THREADS

if [ "$arch" = "arm" ]; then
opt="-machine virt"
fi
Expand All @@ -33,11 +35,11 @@ fi
(
flock -n 200 || exit 0

echo Starting qemu...
echo Starting qemu with $(nproc) cpus...

qemu-system-$arch \
-m 1024 \
-smp 4 \
-smp $(nproc) \
-nographic \
$opt \
-kernel /qemu/vmlinuz \
Expand All @@ -53,7 +55,7 @@ fi
nc 127.0.0.1 4444 | while read LINE; do
LINE=$(echo "$LINE" | tr -d '\r')
if [[ "$LINE" == "emulator is ready!"* ]]; then
echo "Boot in ${LINE##* } seconds"
echo "Booted in ${LINE##* } seconds"
break
fi
done
Expand Down

0 comments on commit d83b621

Please sign in to comment.