From d83b621025dc0c6b5db990731702b94cb4f72f8f Mon Sep 17 00:00:00 2001 From: Marco A L Barbosa Date: Wed, 22 Nov 2017 11:36:06 -0200 Subject: [PATCH] Enable multithread testing using qemu-system --- docker/linux-runner | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/linux-runner b/docker/linux-runner index c5c0fa866..9032291a0 100755 --- a/docker/linux-runner +++ b/docker/linux-runner @@ -22,6 +22,8 @@ case "$CROSS_RUNNER" in ;; esac +export -n RUST_TEST_THREADS + if [ "$arch" = "arm" ]; then opt="-machine virt" fi @@ -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 \ @@ -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