From 1c4b9c103496d876ee4254ce5259c89c725c4c5e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 16 Mar 2018 11:42:42 -0700 Subject: [PATCH 1/2] ci: Disable optimized tests for asm.js Since all tests are compiled with LTO effectively in Emscripten this commit disables optimizations to hopefully squeeze some more time out of the CI builders. Closes #48826 --- src/ci/docker/asmjs/Dockerfile | 2 +- src/test/run-pass/deep.rs | 4 +--- src/test/run-pass/float-int-invalid-const-cast.rs | 2 ++ src/test/run-pass/intrinsics-integer.rs | 2 ++ src/test/run-pass/intrinsics-math.rs | 2 ++ src/test/run-pass/issue-32947.rs | 2 ++ src/test/run-pass/issue-38074.rs | 2 ++ src/test/run-pass/issue-39720.rs | 2 ++ src/test/run-pass/mir_heavy_promoted.rs | 2 ++ src/test/run-pass/next-power-of-two-overflow-debug.rs | 1 + src/test/run-pass/next-power-of-two-overflow-ndebug.rs | 1 + src/test/run-pass/packed-struct-borrow-element.rs | 1 + src/test/run-pass/simd-intrinsic-generic-arithmetic.rs | 2 ++ src/test/run-pass/simd-intrinsic-generic-comparison.rs | 2 ++ src/test/run-pass/simd-intrinsic-generic-elements.rs | 2 ++ 15 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/ci/docker/asmjs/Dockerfile b/src/ci/docker/asmjs/Dockerfile index 2a0901691a55..be1b161f33e0 100644 --- a/src/ci/docker/asmjs/Dockerfile +++ b/src/ci/docker/asmjs/Dockerfile @@ -29,6 +29,6 @@ ENV EM_CONFIG=/emsdk-portable/.emscripten ENV TARGETS=asmjs-unknown-emscripten -ENV RUST_CONFIGURE_ARGS --enable-emscripten +ENV RUST_CONFIGURE_ARGS --enable-emscripten --disable-optimize-tests ENV SCRIPT python2.7 ../x.py test --target $TARGETS diff --git a/src/test/run-pass/deep.rs b/src/test/run-pass/deep.rs index 9ae4f2c1e708..d59fe8d813d2 100644 --- a/src/test/run-pass/deep.rs +++ b/src/test/run-pass/deep.rs @@ -8,9 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - - +// ignore-emscripten apparently blows the stack fn f(x: isize) -> isize { if x == 1 { return 1; } else { let y: isize = 1 + f(x - 1); return y; } diff --git a/src/test/run-pass/float-int-invalid-const-cast.rs b/src/test/run-pass/float-int-invalid-const-cast.rs index 80ab12482cbb..d44f78922c70 100644 --- a/src/test/run-pass/float-int-invalid-const-cast.rs +++ b/src/test/run-pass/float-int-invalid-const-cast.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten no i128 support + #![feature(i128_type)] #![deny(const_err)] diff --git a/src/test/run-pass/intrinsics-integer.rs b/src/test/run-pass/intrinsics-integer.rs index bfa3a1e128a9..cdfad51e648a 100644 --- a/src/test/run-pass/intrinsics-integer.rs +++ b/src/test/run-pass/intrinsics-integer.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten no i128 support + #![feature(intrinsics, i128_type)] mod rusti { diff --git a/src/test/run-pass/intrinsics-math.rs b/src/test/run-pass/intrinsics-math.rs index a2c55634749c..5132405a9d58 100644 --- a/src/test/run-pass/intrinsics-math.rs +++ b/src/test/run-pass/intrinsics-math.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten fma not implemented in emscripten + macro_rules! assert_approx_eq { ($a:expr, $b:expr) => ({ let (a, b) = (&$a, &$b); diff --git a/src/test/run-pass/issue-32947.rs b/src/test/run-pass/issue-32947.rs index d0fef36efb9c..d059a46b4df1 100644 --- a/src/test/run-pass/issue-32947.rs +++ b/src/test/run-pass/issue-32947.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten FIXME(#45351) + #![feature(repr_simd, test)] extern crate test; diff --git a/src/test/run-pass/issue-38074.rs b/src/test/run-pass/issue-38074.rs index 5c9a63b86166..2368ba8a110b 100644 --- a/src/test/run-pass/issue-38074.rs +++ b/src/test/run-pass/issue-38074.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten FIXME(#45351) + #![feature(platform_intrinsics, repr_simd)] extern "platform-intrinsic" { diff --git a/src/test/run-pass/issue-39720.rs b/src/test/run-pass/issue-39720.rs index f90696e3cdf1..9873a8c2bf44 100644 --- a/src/test/run-pass/issue-39720.rs +++ b/src/test/run-pass/issue-39720.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten FIXME(#45351) + #![feature(repr_simd, platform_intrinsics)] #[repr(C)] diff --git a/src/test/run-pass/mir_heavy_promoted.rs b/src/test/run-pass/mir_heavy_promoted.rs index 9e033421574b..b50852175776 100644 --- a/src/test/run-pass/mir_heavy_promoted.rs +++ b/src/test/run-pass/mir_heavy_promoted.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten apparently only works in optimized mode + const TEST_DATA: [u8; 32 * 1024 * 1024] = [42; 32 * 1024 * 1024]; // Check that the promoted copy of TEST_DATA doesn't diff --git a/src/test/run-pass/next-power-of-two-overflow-debug.rs b/src/test/run-pass/next-power-of-two-overflow-debug.rs index 2782f8c2a598..599c6dfd31d9 100644 --- a/src/test/run-pass/next-power-of-two-overflow-debug.rs +++ b/src/test/run-pass/next-power-of-two-overflow-debug.rs @@ -10,6 +10,7 @@ // compile-flags: -C debug_assertions=yes // ignore-wasm32-bare compiled with panic=abort by default +// ignore-emscripten dies with an LLVM error #![feature(i128_type)] diff --git a/src/test/run-pass/next-power-of-two-overflow-ndebug.rs b/src/test/run-pass/next-power-of-two-overflow-ndebug.rs index f8bcb961c683..f2312b70be67 100644 --- a/src/test/run-pass/next-power-of-two-overflow-ndebug.rs +++ b/src/test/run-pass/next-power-of-two-overflow-ndebug.rs @@ -9,6 +9,7 @@ // except according to those terms. // compile-flags: -C debug_assertions=no +// ignore-emscripten dies with an LLVM error #![feature(i128_type)] diff --git a/src/test/run-pass/packed-struct-borrow-element.rs b/src/test/run-pass/packed-struct-borrow-element.rs index 3041c73afba8..e725b25efee5 100644 --- a/src/test/run-pass/packed-struct-borrow-element.rs +++ b/src/test/run-pass/packed-struct-borrow-element.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten weird assertion? #[repr(packed)] struct Foo { diff --git a/src/test/run-pass/simd-intrinsic-generic-arithmetic.rs b/src/test/run-pass/simd-intrinsic-generic-arithmetic.rs index 1894cd0084bc..ac6d0c697ecc 100644 --- a/src/test/run-pass/simd-intrinsic-generic-arithmetic.rs +++ b/src/test/run-pass/simd-intrinsic-generic-arithmetic.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten FIXME(#45351) hits an LLVM assert + #![feature(repr_simd, platform_intrinsics)] #[repr(simd)] diff --git a/src/test/run-pass/simd-intrinsic-generic-comparison.rs b/src/test/run-pass/simd-intrinsic-generic-comparison.rs index 5802fb30bd68..d27378ba8930 100644 --- a/src/test/run-pass/simd-intrinsic-generic-comparison.rs +++ b/src/test/run-pass/simd-intrinsic-generic-comparison.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten FIXME(#45351) hits an LLVM assert + #![feature(repr_simd, platform_intrinsics, concat_idents)] #![allow(non_camel_case_types)] diff --git a/src/test/run-pass/simd-intrinsic-generic-elements.rs b/src/test/run-pass/simd-intrinsic-generic-elements.rs index f0444c271705..72fcef27a665 100644 --- a/src/test/run-pass/simd-intrinsic-generic-elements.rs +++ b/src/test/run-pass/simd-intrinsic-generic-elements.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten FIXME(#45351) hits an LLVM assert + #![feature(repr_simd, platform_intrinsics)] #[repr(simd)] From 60eb308b421a471fa3ecc2848fb93c6527ec409c Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 16 Mar 2018 12:53:51 -0700 Subject: [PATCH 2/2] ci: Run fewer tests on asmjs Many tests run on the asmjs builder like compile-fail, ui, parse-fail, etc, aren't actually specific to asm.js. Instead of running redundant test suites this commit changes things up to only run tests that actually emit JS we then pass to node. --- src/ci/docker/asmjs/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ci/docker/asmjs/Dockerfile b/src/ci/docker/asmjs/Dockerfile index be1b161f33e0..cb85cf3d9e9f 100644 --- a/src/ci/docker/asmjs/Dockerfile +++ b/src/ci/docker/asmjs/Dockerfile @@ -31,4 +31,9 @@ ENV TARGETS=asmjs-unknown-emscripten ENV RUST_CONFIGURE_ARGS --enable-emscripten --disable-optimize-tests -ENV SCRIPT python2.7 ../x.py test --target $TARGETS +ENV SCRIPT python2.7 ../x.py test --target $TARGETS \ + src/test/run-pass \ + src/test/run-fail \ + src/libstd \ + src/liballoc \ + src/libcore