Lines Matching +full:build +full:- +full:in +full:- +full:qemu
6 set -ex
8 MIRRORS_URL="https://ci-mirrors.rust-lang.org/libc"
12 # If we're going to run tests inside of a qemu image, then we don't need any of
18 if [ "$QEMU" != "" ]; then
19 tmpdir=/tmp/qemu-img-creation
20 mkdir -p "${tmpdir}"
22 if [ -z "${QEMU#*.gz}" ]; then
24 qemufile="$(echo "${QEMU%.gz}" | sed 's/\//__/g')"
25 if [ ! -f "${tmpdir}/${qemufile}" ]; then
26 curl --retry 5 "${MIRRORS_URL}/${QEMU}" | \
27 gunzip -d > "${tmpdir}/${qemufile}"
29 elif [ -z "${QEMU#*.xz}" ]; then
31 qemufile="$(echo "${QEMU%.xz}" | sed 's/\//__/g')"
32 if [ ! -f "${tmpdir}/${qemufile}" ]; then
33 curl --retry 5 "${MIRRORS_URL}/${QEMU}" | \
38 qemufile="$(echo "${QEMU}" | sed 's/\//__/g')"
39 if [ ! -f "${tmpdir}/${qemufile}" ]; then
40 curl --retry 5 "${MIRRORS_URL}/${QEMU}" \
45 # Create a mount a fresh new filesystem image that we'll later pass to QEMU.
48 rm -f "${tmpdir}/libc-test.img"
51 # Do the standard rigamarole of cross-compiling an executable and then the
53 cargo build \
54 --manifest-path libc-test/Cargo.toml \
55 --target "${TARGET}" \
56 --test main ${LIBC_CI_ZBUILD_STD+"-Zbuild-std"}
57 rm "${CARGO_TARGET_DIR}/${TARGET}"/debug/main-*.d
58 cp "${CARGO_TARGET_DIR}/${TARGET}"/debug/main-* "${tmpdir}"/mount/libc-test
60 echo 'exec $1/libc-test' > "${tmpdir}/mount/run.sh"
62 du -sh "${tmpdir}/mount"
64 --root "${tmpdir}/mount" \
65 --size-in-blocks 100000 \
66 "${tmpdir}/libc-test.img"
68 # Pass -snapshot to prevent tampering with the disk images, this helps when
69 # running this script in development. The two drives are then passed next,
73 qemu-system-x86_64 \
74 -m 1024 \
75 -snapshot \
76 -drive if=virtio,file="${tmpdir}/${qemufile}" \
77 -drive if=virtio,file="${tmpdir}/libc-test.img" \
78 -net nic,model=virtio \
79 -net user \
80 -nographic \
81 -vga none 2>&1 | tee "${CARGO_TARGET_DIR}/out.log"
82 exec grep -E "^(PASSED)|(test result: ok)" "${CARGO_TARGET_DIR}/out.log"
85 if [ "$TARGET" = "s390x-unknown-linux-gnu" ]; then
86 # FIXME: s390x-unknown-linux-gnu often fails to test due to timeout,
91 until [ $n -ge $N ]
94 …if cargo test --no-default-features --manifest-path libc-test/Cargo.toml --target "${TARGET}" ${LI…
99 …if cargo test --manifest-path libc-test/Cargo.toml --target "${TARGET}" ${LIBC_CI_ZBUILD_STD+"-Zbu…
104 …if cargo test --features extra_traits --manifest-path libc-test/Cargo.toml --target "${TARGET}" ${…
112 cargo test --no-default-features --manifest-path libc-test/Cargo.toml \
113 --target "${TARGET}" ${LIBC_CI_ZBUILD_STD+"-Zbuild-std"}
115 …cargo test --manifest-path libc-test/Cargo.toml --target "${TARGET}" ${LIBC_CI_ZBUILD_STD+"-Zbuild…
117 RUST_BACKTRACE=1 cargo test --features extra_traits --manifest-path libc-test/Cargo.toml \
118 --target "${TARGET}" ${LIBC_CI_ZBUILD_STD+"-Zbuild-std"}