diff options
author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-10-10 04:20:58 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-10 04:20:58 +0900 |
commit | 515ecc676da95c74e2db0fc660fe9dca1ab7a880 (patch) | |
tree | bcd51ac51057f0585f46586601d74d369d00eef2 | |
parent | dd8651682bf9a071bf4ee18b6db4a3fe7a664fe2 (diff) | |
parent | 911b54403df4a993322eb626ffd263d6cbbf6e44 (diff) | |
download | rust-libc-515ecc676da95c74e2db0fc660fe9dca1ab7a880.tar.gz |
Merge pull request #1916 from JohnTitor/s390x
-rw-r--r-- | ci/linux-s390x.sh | 4 | ||||
-rwxr-xr-x | ci/run.sh | 40 |
2 files changed, 36 insertions, 8 deletions
diff --git a/ci/linux-s390x.sh b/ci/linux-s390x.sh index 18c71f45c6..762ee7319d 100644 --- a/ci/linux-s390x.sh +++ b/ci/linux-s390x.sh @@ -6,8 +6,8 @@ mkdir -m 777 /qemu cd /qemu curl --retry 5 -LO https://github.com/qemu/qemu/raw/master/pc-bios/s390-ccw.img -curl --retry 5 -LO http://ftp.debian.org/debian/dists/testing/main/installer-s390x/20191129/images/generic/kernel.debian -curl --retry 5 -LO http://ftp.debian.org/debian/dists/testing/main/installer-s390x/20191129/images/generic/initrd.debian +curl --retry 5 -LO http://ftp.debian.org/debian/dists/testing/main/installer-s390x/20200314/images/generic/kernel.debian +curl --retry 5 -LO http://ftp.debian.org/debian/dists/testing/main/installer-s390x/20200314/images/generic/initrd.debian mv kernel.debian kernel mv initrd.debian initrd.gz @@ -82,17 +82,45 @@ if [ "$QEMU" != "" ]; then exec egrep "^(PASSED)|(test result: ok)" "${CARGO_TARGET_DIR}/out.log" fi -# FIXME: x86_64-unknown-linux-gnux32 fail to compile without --release +# FIXME: x86_64-unknown-linux-gnux32 fails to compile without --release # See https://github.com/rust-lang/rust/issues/59220 opt= if [ "$TARGET" = "x86_64-unknown-linux-gnux32" ]; then opt="--release" fi -cargo test $opt --no-default-features --manifest-path libc-test/Cargo.toml \ - --target "${TARGET}" +if [ "$TARGET" = "s390x-unknown-linux-gnu" ]; then + # FIXME: s390x-unknown-linux-gnu often fails to test due to timeout, + # so we retry this N times. + N=5 + n=0 + passed=0 + until [ $n -ge $N ] + do + if [ "$passed" = "0" ]; then + if cargo test --no-default-features --manifest-path libc-test/Cargo.toml --target "${TARGET}" ; then + passed=$((passed+1)) + continue + fi + elif [ "$passed" = "1" ]; then + if cargo test $opt --manifest-path libc-test/Cargo.toml --target "${TARGET}" ; then + passed=$((passed+1)) + continue + fi + elif [ "$passed" = "2" ]; then + if cargo test $opt --features extra_traits --manifest-path libc-test/Cargo.toml --target "${TARGET}"; then + break + fi + fi + n=$((n+1)) + sleep 1 + done +else + cargo test $opt --no-default-features --manifest-path libc-test/Cargo.toml \ + --target "${TARGET}" -cargo test $opt --manifest-path libc-test/Cargo.toml --target "${TARGET}" + cargo test $opt --manifest-path libc-test/Cargo.toml --target "${TARGET}" -cargo test $opt --features extra_traits --manifest-path libc-test/Cargo.toml \ - --target "${TARGET}" + cargo test $opt --features extra_traits --manifest-path libc-test/Cargo.toml \ + --target "${TARGET}" +fi |