]> git.proxmox.com Git - rustc.git/blobdiff - vendor/packed_simd/ci/test-runner-linux
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / vendor / packed_simd / ci / test-runner-linux
diff --git a/vendor/packed_simd/ci/test-runner-linux b/vendor/packed_simd/ci/test-runner-linux
new file mode 100755 (executable)
index 0000000..0654f63
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+arch=$1
+prog=$2
+
+cd /qemu/init
+cp -f $2 prog
+find . | cpio --create --format='newc' --quiet | gzip > ../initrd.gz
+cd ..
+
+timeout 30s qemu-system-$arch \
+        -m 1024 \
+        -nographic \
+        -kernel kernel \
+        -initrd initrd.gz \
+        -append init=/prog > output || true
+
+# remove kernel messages
+tr -d '\r' < output | egrep -v '^\['
+
+# if the output contains a failure, return error
+! grep FAILED output > /dev/null