diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2016-08-14 20:29:49 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-14 20:29:49 +0300 |
| commit | 8ade28e9a26a27153bda67cd5213411bfbd95ff3 (patch) | |
| tree | 972c008b61710f32382c2132641f7433048c2513 /src | |
| parent | c3cede2257424d3d1879618a784974b967491b9b (diff) | |
| parent | 60599df03b094c81923ab863c6fd616ef2c15806 (diff) | |
| download | rust-8ade28e9a26a27153bda67cd5213411bfbd95ff3.tar.gz rust-8ade28e9a26a27153bda67cd5213411bfbd95ff3.zip | |
Rollup merge of #35574 - badboy:emscripten-test-fixes, r=brson
Emscripten test fixes This picks up parts of #31623 to disable certain tests that emscripten can't run, as threads/processes are not supported. I re-applied @tomaka's changes manually, I can rebase those commits with his credentials if he wants. It also disables jemalloc for emscripten (at least in Rustbuild, I have to check if there is another setting for the same thing in the old makefile approach). This should not impact anything for normal builds.
Diffstat (limited to 'src')
46 files changed, 68 insertions, 13 deletions
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index 09f96782e71..d6ac3ef6c9c 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -98,7 +98,8 @@ pub fn check(build: &mut Build) { if target.contains("rumprun") || target.contains("bitrig") || target.contains("openbsd") || - target.contains("msvc") { + target.contains("msvc") || + target.contains("emscripten") { build.config.use_jemalloc = false; } diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs index 1c25c8f77c1..23687e10e47 100644 --- a/src/libstd/sys/unix/mod.rs +++ b/src/libstd/sys/unix/mod.rs @@ -83,11 +83,11 @@ pub fn init() { } } - #[cfg(not(target_os = "nacl"))] + #[cfg(not(any(target_os = "nacl", target_os = "emscripten")))] unsafe fn reset_sigpipe() { assert!(signal(libc::SIGPIPE, libc::SIG_IGN) != !0); } - #[cfg(target_os = "nacl")] + #[cfg(any(target_os = "nacl", target_os = "emscripten"))] unsafe fn reset_sigpipe() {} } diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs index 9c57f25dfcc..c29e87f91c9 100644 --- a/src/libstd/sys/unix/os.rs +++ b/src/libstd/sys/unix/os.rs @@ -551,11 +551,13 @@ pub fn home_dir() -> Option<PathBuf> { #[cfg(any(target_os = "android", target_os = "ios", - target_os = "nacl"))] + target_os = "nacl", + target_os = "emscripten"))] unsafe fn fallback() -> Option<OsString> { None } #[cfg(not(any(target_os = "android", target_os = "ios", - target_os = "nacl")))] + target_os = "nacl", + target_os = "emscripten")))] unsafe fn fallback() -> Option<OsString> { #[cfg(not(target_os = "solaris"))] unsafe fn getpwduid_r(me: libc::uid_t, passwd: &mut libc::passwd, diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index 1061ca87f64..75e10d25853 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -81,8 +81,7 @@ impl Thread { } #[cfg(any(target_os = "linux", - target_os = "android", - target_os = "emscripten"))] + target_os = "android"))] pub fn set_name(name: &CStr) { const PR_SET_NAME: libc::c_int = 15; // pthread wrapper only appeared in glibc 2.12, so we use syscall @@ -118,9 +117,9 @@ impl Thread { name.as_ptr() as *mut libc::c_void); } } - #[cfg(any(target_env = "newlib", target_os = "solaris"))] + #[cfg(any(target_env = "newlib", target_os = "solaris", target_os = "emscripten"))] pub fn set_name(_name: &CStr) { - // Newlib and Illumos has no way to set a thread name. + // Newlib, Illumos and Emscripten have no way to set a thread name. } pub fn sleep(dur: Duration) { diff --git a/src/libunwind/libunwind.rs b/src/libunwind/libunwind.rs index 5e242db0a88..680ad3ecd64 100644 --- a/src/libunwind/libunwind.rs +++ b/src/libunwind/libunwind.rs @@ -60,7 +60,6 @@ pub const unwinder_private_data_size: usize = 2; pub const unwinder_private_data_size: usize = 2; #[cfg(target_arch = "asmjs")] -// FIXME: Copied from arm. Need to confirm. pub const unwinder_private_data_size: usize = 20; #[repr(C)] diff --git a/src/test/run-pass-fulldeps/linkage-visibility.rs b/src/test/run-pass-fulldeps/linkage-visibility.rs index e6eaefb0490..f884bb2098e 100644 --- a/src/test/run-pass-fulldeps/linkage-visibility.rs +++ b/src/test/run-pass-fulldeps/linkage-visibility.rs @@ -12,6 +12,7 @@ // ignore-android: FIXME(#10356) // ignore-windows: std::dynamic_lib does not work on Windows well // ignore-musl +// ignore-emscripten no dynamic linking extern crate linkage_visibility as foo; diff --git a/src/test/run-pass-fulldeps/logging-enabled.rs b/src/test/run-pass-fulldeps/logging-enabled.rs index 2975835a271..26261348020 100644 --- a/src/test/run-pass-fulldeps/logging-enabled.rs +++ b/src/test/run-pass-fulldeps/logging-enabled.rs @@ -9,6 +9,7 @@ // except according to those terms. // exec-env:RUST_LOG=logging_enabled=info +// ignore-emscripten: FIXME(#31622) #![feature(rustc_private)] diff --git a/src/test/run-pass-fulldeps/logging-separate-lines.rs b/src/test/run-pass-fulldeps/logging-separate-lines.rs index 09759326afd..183a522bba7 100644 --- a/src/test/run-pass-fulldeps/logging-separate-lines.rs +++ b/src/test/run-pass-fulldeps/logging-separate-lines.rs @@ -11,6 +11,7 @@ // ignore-windows // exec-env:RUST_LOG=debug // compile-flags:-C debug-assertions=y +// ignore-emscripten: FIXME(#31622) #![feature(rustc_private)] diff --git a/src/test/run-pass/backtrace-debuginfo.rs b/src/test/run-pass/backtrace-debuginfo.rs index f42a6ab162b..838005cbc91 100644 --- a/src/test/run-pass/backtrace-debuginfo.rs +++ b/src/test/run-pass/backtrace-debuginfo.rs @@ -17,6 +17,7 @@ // compile-flags:-g -Cllvm-args=-enable-tail-merge=0 // ignore-pretty as this critically relies on line numbers +// ignore-emscripten spawning processes is not supported use std::io; use std::io::prelude::*; diff --git a/src/test/run-pass/backtrace.rs b/src/test/run-pass/backtrace.rs index f1ce17c0736..f26706d1754 100644 --- a/src/test/run-pass/backtrace.rs +++ b/src/test/run-pass/backtrace.rs @@ -10,6 +10,7 @@ // no-pretty-expanded FIXME #15189 // ignore-android FIXME #17520 +// ignore-emscripten spawning processes is not supported // compile-flags:-g use std::env; diff --git a/src/test/run-pass/command-before-exec.rs b/src/test/run-pass/command-before-exec.rs index 72f952fb6c0..5b83ce48e5d 100644 --- a/src/test/run-pass/command-before-exec.rs +++ b/src/test/run-pass/command-before-exec.rs @@ -9,6 +9,7 @@ // except according to those terms. // ignore-windows - this is a unix-specific test +// ignore-emscripten #![feature(process_exec, libc)] diff --git a/src/test/run-pass/command-exec.rs b/src/test/run-pass/command-exec.rs index 039245bfd08..130526e72b1 100644 --- a/src/test/run-pass/command-exec.rs +++ b/src/test/run-pass/command-exec.rs @@ -9,6 +9,7 @@ // except according to those terms. // ignore-windows - this is a unix-specific test +// ignore-emscripten // ignore-pretty #![feature(process_exec)] diff --git a/src/test/run-pass/drop-flag-sanity-check.rs b/src/test/run-pass/drop-flag-sanity-check.rs index f9e1b651a49..a8014768d78 100644 --- a/src/test/run-pass/drop-flag-sanity-check.rs +++ b/src/test/run-pass/drop-flag-sanity-check.rs @@ -9,6 +9,7 @@ // except according to those terms. // compile-flags: -Z force-dropflag-checks=on +// ignore-emscripten // Quick-and-dirty test to ensure -Z force-dropflag-checks=on works as // expected. Note that the inlined drop-flag is slated for removal diff --git a/src/test/run-pass/drop-trait-enum.rs b/src/test/run-pass/drop-trait-enum.rs index ce675547a68..912cb4c5e87 100644 --- a/src/test/run-pass/drop-trait-enum.rs +++ b/src/test/run-pass/drop-trait-enum.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten no threads support + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/env-args-reverse-iterator.rs b/src/test/run-pass/env-args-reverse-iterator.rs index d22fa6494f0..89af1db7c78 100644 --- a/src/test/run-pass/env-args-reverse-iterator.rs +++ b/src/test/run-pass/env-args-reverse-iterator.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten + use std::env::args; use std::process::Command; diff --git a/src/test/run-pass/env-home-dir.rs b/src/test/run-pass/env-home-dir.rs index 2110f0b3bf9..bcb0c62d9fe 100644 --- a/src/test/run-pass/env-home-dir.rs +++ b/src/test/run-pass/env-home-dir.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten #![feature(path)] diff --git a/src/test/run-pass/exec-env.rs b/src/test/run-pass/exec-env.rs index d17056e6d79..a96d189afaa 100644 --- a/src/test/run-pass/exec-env.rs +++ b/src/test/run-pass/exec-env.rs @@ -9,7 +9,7 @@ // except according to those terms. // exec-env:TEST_EXEC_ENV=22 - +// ignore-emscripten FIXME: issue #31622 use std::env; diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs index 3f6f1aa6b5f..8efc4cb1b17 100644 --- a/src/test/run-pass/hashmap-memory.rs +++ b/src/test/run-pass/hashmap-memory.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten No support for threads + #![allow(unknown_features)] #![feature(std_misc)] diff --git a/src/test/run-pass/intrinsic-alignment.rs b/src/test/run-pass/intrinsic-alignment.rs index f1e4f8dfa8c..cfae9903a95 100644 --- a/src/test/run-pass/intrinsic-alignment.rs +++ b/src/test/run-pass/intrinsic-alignment.rs @@ -24,7 +24,8 @@ mod rusti { target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd", - target_os = "solaris"))] + target_os = "solaris", + target_os = "emscripten"))] mod m { #[main] #[cfg(target_arch = "x86")] diff --git a/src/test/run-pass/issue-10626.rs b/src/test/run-pass/issue-10626.rs index c81e16ebb7c..b350bd1a4cc 100644 --- a/src/test/run-pass/issue-10626.rs +++ b/src/test/run-pass/issue-10626.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten // Make sure that if a process doesn't have its stdio/stderr descriptors set up // that we don't die in a large ball of fire diff --git a/src/test/run-pass/issue-12133-3.rs b/src/test/run-pass/issue-12133-3.rs index 66201ff901f..8f455c2fe4e 100644 --- a/src/test/run-pass/issue-12133-3.rs +++ b/src/test/run-pass/issue-12133-3.rs @@ -12,6 +12,7 @@ // aux-build:issue-12133-dylib.rs // aux-build:issue-12133-dylib2.rs // ignore-musl +// ignore-emscripten no dylib support // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issue-13304.rs b/src/test/run-pass/issue-13304.rs index c260aa95b57..e1c2c5684fb 100644 --- a/src/test/run-pass/issue-13304.rs +++ b/src/test/run-pass/issue-13304.rs @@ -9,6 +9,7 @@ // except according to those terms. // ignore-aarch64 +// ignore-emscripten #![feature(io, process_capture)] use std::env; diff --git a/src/test/run-pass/issue-14456.rs b/src/test/run-pass/issue-14456.rs index 7e24c8f73ab..513ab91489c 100644 --- a/src/test/run-pass/issue-14456.rs +++ b/src/test/run-pass/issue-14456.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten #![feature(io, process_capture)] diff --git a/src/test/run-pass/issue-14940.rs b/src/test/run-pass/issue-14940.rs index ba6815d5b7c..ffe6b646794 100644 --- a/src/test/run-pass/issue-14940.rs +++ b/src/test/run-pass/issue-14940.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten use std::env; use std::process::Command; diff --git a/src/test/run-pass/issue-16272.rs b/src/test/run-pass/issue-16272.rs index 9562d113ada..d4f3d15b320 100644 --- a/src/test/run-pass/issue-16272.rs +++ b/src/test/run-pass/issue-16272.rs @@ -9,6 +9,7 @@ // except according to those terms. // ignore-aarch64 +// ignore-emscripten use std::process::Command; use std::env; diff --git a/src/test/run-pass/issue-20091.rs b/src/test/run-pass/issue-20091.rs index 1fe44348466..52c7911075a 100644 --- a/src/test/run-pass/issue-20091.rs +++ b/src/test/run-pass/issue-20091.rs @@ -9,6 +9,7 @@ // except according to those terms. // ignore-aarch64 +// ignore-emscripten #![feature(std_misc, os)] #[cfg(unix)] diff --git a/src/test/run-pass/issue-2190-1.rs b/src/test/run-pass/issue-2190-1.rs index 844826c45db..39375703514 100644 --- a/src/test/run-pass/issue-2190-1.rs +++ b/src/test/run-pass/issue-2190-1.rs @@ -9,6 +9,7 @@ // except according to those terms. // pretty-expanded FIXME #23616 +// ignore-emscripten use std::thread::Builder; diff --git a/src/test/run-pass/issue-24313.rs b/src/test/run-pass/issue-24313.rs index 9acfb04d781..9b2b474351d 100644 --- a/src/test/run-pass/issue-24313.rs +++ b/src/test/run-pass/issue-24313.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten + use std::thread; use std::env; use std::process::Command; diff --git a/src/test/run-pass/issue-28950.rs b/src/test/run-pass/issue-28950.rs index efce148ea51..a905727afff 100644 --- a/src/test/run-pass/issue-28950.rs +++ b/src/test/run-pass/issue-28950.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten // compile-flags: -Z orbit=off // (blows the stack with MIR trans and no optimizations) diff --git a/src/test/run-pass/issue-29485.rs b/src/test/run-pass/issue-29485.rs index 9e8f5869437..9252762d1bd 100644 --- a/src/test/run-pass/issue-29485.rs +++ b/src/test/run-pass/issue-29485.rs @@ -9,6 +9,7 @@ // except according to those terms. // aux-build:issue-29485.rs +// ignore-emscripten #[feature(recover)] diff --git a/src/test/run-pass/issue-30490.rs b/src/test/run-pass/issue-30490.rs index ea603fc665d..035911302cf 100644 --- a/src/test/run-pass/issue-30490.rs +++ b/src/test/run-pass/issue-30490.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten + // Previously libstd would set stdio descriptors of a child process // by `dup`ing the requested descriptors to inherit directly into the // stdio descriptors. This, however, would incorrectly handle cases diff --git a/src/test/run-pass/issue-33770.rs b/src/test/run-pass/issue-33770.rs index f5635fddaf9..76728a0d354 100644 --- a/src/test/run-pass/issue-33770.rs +++ b/src/test/run-pass/issue-33770.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten + use std::process::{Command, Stdio}; use std::env; use std::sync::{Mutex, RwLock}; diff --git a/src/test/run-pass/linkage1.rs b/src/test/run-pass/linkage1.rs index 0794a5e0daf..17abf9cb1f2 100644 --- a/src/test/run-pass/linkage1.rs +++ b/src/test/run-pass/linkage1.rs @@ -10,6 +10,7 @@ // ignore-windows // ignore-macos +// ignore-emscripten // aux-build:linkage1.rs #![feature(linkage)] diff --git a/src/test/run-pass/multi-panic.rs b/src/test/run-pass/multi-panic.rs index 93e2a854ccb..86fe06b1765 100644 --- a/src/test/run-pass/multi-panic.rs +++ b/src/test/run-pass/multi-panic.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten + fn check_for_no_backtrace(test: std::process::Output) { assert!(!test.status.success()); let err = String::from_utf8_lossy(&test.stderr); diff --git a/src/test/run-pass/no-stdio.rs b/src/test/run-pass/no-stdio.rs index 3658b6a508a..ad4d56ec50a 100644 --- a/src/test/run-pass/no-stdio.rs +++ b/src/test/run-pass/no-stdio.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/panic-handler-chain.rs b/src/test/run-pass/panic-handler-chain.rs index 7c2e3f0c91b..1ad43f5f17f 100644 --- a/src/test/run-pass/panic-handler-chain.rs +++ b/src/test/run-pass/panic-handler-chain.rs @@ -7,6 +7,9 @@ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. + +// ignore-emscripten no threads support + #![feature(panic_handler, const_fn, std_panic)] use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/src/test/run-pass/process-exit.rs b/src/test/run-pass/process-exit.rs index 9ef66ff2d71..a5d408448a0 100644 --- a/src/test/run-pass/process-exit.rs +++ b/src/test/run-pass/process-exit.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten + use std::env; use std::process::{self, Command, Stdio}; diff --git a/src/test/run-pass/process-remove-from-env.rs b/src/test/run-pass/process-remove-from-env.rs index 3096fe4a266..cce5ef4fe17 100644 --- a/src/test/run-pass/process-remove-from-env.rs +++ b/src/test/run-pass/process-remove-from-env.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten use std::process::Command; use std::env; diff --git a/src/test/run-pass/process-spawn-with-unicode-params.rs b/src/test/run-pass/process-spawn-with-unicode-params.rs index a155ee396b6..d3d847127ee 100644 --- a/src/test/run-pass/process-spawn-with-unicode-params.rs +++ b/src/test/run-pass/process-spawn-with-unicode-params.rs @@ -17,6 +17,7 @@ // intact. // ignore-aarch64 +// ignore-emscripten use std::io::prelude::*; use std::io; diff --git a/src/test/run-pass/rec-align-u64.rs b/src/test/run-pass/rec-align-u64.rs index 2161864f0b6..4863979b3f6 100644 --- a/src/test/run-pass/rec-align-u64.rs +++ b/src/test/run-pass/rec-align-u64.rs @@ -42,7 +42,8 @@ struct Outer { target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd", - target_os = "solaris"))] + target_os = "solaris", + target_os = "emscripten"))] mod m { #[cfg(target_arch = "x86")] pub mod m { diff --git a/src/test/run-pass/running-with-no-runtime.rs b/src/test/run-pass/running-with-no-runtime.rs index 23d5a08e216..f81c3f2e99d 100644 --- a/src/test/run-pass/running-with-no-runtime.rs +++ b/src/test/run-pass/running-with-no-runtime.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten + #![feature(start)] use std::ffi::CStr; diff --git a/src/test/run-pass/segfault-no-out-of-stack.rs b/src/test/run-pass/segfault-no-out-of-stack.rs index 0158c4282da..df64d7140b4 100644 --- a/src/test/run-pass/segfault-no-out-of-stack.rs +++ b/src/test/run-pass/segfault-no-out-of-stack.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten can't run commands + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/signal-exit-status.rs b/src/test/run-pass/signal-exit-status.rs index 51b369092f0..c7759ca743b 100644 --- a/src/test/run-pass/signal-exit-status.rs +++ b/src/test/run-pass/signal-exit-status.rs @@ -9,6 +9,7 @@ // except according to those terms. // ignore-windows +// ignore-emscripten use std::env; use std::process::Command; diff --git a/src/test/run-pass/sigpipe-should-be-ignored.rs b/src/test/run-pass/sigpipe-should-be-ignored.rs index 7734a2e80c3..4eb4720e8d7 100644 --- a/src/test/run-pass/sigpipe-should-be-ignored.rs +++ b/src/test/run-pass/sigpipe-should-be-ignored.rs @@ -12,6 +12,7 @@ // doesn't die in a ball of fire, but rather it's gracefully handled. // ignore-aarch64 +// ignore-emscripten use std::env; use std::io::prelude::*; diff --git a/src/test/run-pass/sleep.rs b/src/test/run-pass/sleep.rs index 8b06b02f3cb..9acc6ff8cf0 100644 --- a/src/test/run-pass/sleep.rs +++ b/src/test/run-pass/sleep.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten no threads support + use std::thread::{self, sleep}; use std::time::Duration; use std::sync::{Arc, Mutex}; diff --git a/src/test/run-pass/wait-forked-but-failed-child.rs b/src/test/run-pass/wait-forked-but-failed-child.rs index 795c3f46f75..1d1c83cf12a 100644 --- a/src/test/run-pass/wait-forked-but-failed-child.rs +++ b/src/test/run-pass/wait-forked-but-failed-child.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten #![feature(libc)] |
