Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emscripten test fixes #35574

Merged
merged 3 commits into from
Aug 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/bootstrap/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions src/libstd/sys/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
}

Expand Down
6 changes: 4 additions & 2 deletions src/libstd/sys/unix/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 3 additions & 4 deletions src/libstd/sys/unix/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/libunwind/libunwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/linkage-visibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/logging-enabled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// exec-env:RUST_LOG=logging_enabled=info
// ignore-emscripten: FIXME(#31622)


#![feature(rustc_private)]
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/logging-separate-lines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// ignore-windows
// exec-env:RUST_LOG=debug
// compile-flags:-C debug-assertions=y
// ignore-emscripten: FIXME(#31622)

#![feature(rustc_private)]

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/backtrace-debuginfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/command-before-exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// ignore-windows - this is a unix-specific test
// ignore-emscripten

#![feature(process_exec, libc)]

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/command-exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// ignore-windows - this is a unix-specific test
// ignore-emscripten
// ignore-pretty

#![feature(process_exec)]
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/drop-flag-sanity-check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/drop-trait-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/env-args-reverse-iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/env-home-dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-emscripten

#![feature(path)]

Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/exec-env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

// exec-env:TEST_EXEC_ENV=22

// ignore-emscripten FIXME: issue #31622

use std::env;

Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/hashmap-memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
3 changes: 2 additions & 1 deletion src/test/run-pass/intrinsic-alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-10626.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-12133-3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-13304.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// ignore-aarch64
// ignore-emscripten
#![feature(io, process_capture)]

use std::env;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-14456.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-14940.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-16272.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// ignore-aarch64
// ignore-emscripten

use std::process::Command;
use std::env;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-20091.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// ignore-aarch64
// ignore-emscripten
#![feature(std_misc, os)]

#[cfg(unix)]
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-2190-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// pretty-expanded FIXME #23616
// ignore-emscripten

use std::thread::Builder;

Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/issue-24313.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-28950.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-29485.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// aux-build:issue-29485.rs
// ignore-emscripten

#[feature(recover)]

Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/issue-30490.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/issue-33770.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/linkage1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

// ignore-windows
// ignore-macos
// ignore-emscripten
// aux-build:linkage1.rs

#![feature(linkage)]
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/multi-panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/no-stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/test/run-pass/panic-handler-chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/process-exit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/process-remove-from-env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/process-spawn-with-unicode-params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// intact.

// ignore-aarch64
// ignore-emscripten

use std::io::prelude::*;
use std::io;
Expand Down
3 changes: 2 additions & 1 deletion src/test/run-pass/rec-align-u64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/running-with-no-runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/segfault-no-out-of-stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/signal-exit-status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// ignore-windows
// ignore-emscripten

use std::env;
use std::process::Command;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/sigpipe-should-be-ignored.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down
Loading