Skip to content

Commit

Permalink
Auto merge of #47127 - EdSchouten:cloudabi-tests, r=kennytm
Browse files Browse the repository at this point in the history
First cut at getting some part of the test suite working for CloudABI

I am currently working on creating a Docker container for automated CI for CloudABI. Here are some of the trivial changes that need to land to make tests pass.
  • Loading branch information
bors committed Jan 3, 2018
2 parents 8d1a302 + 3ca407e commit d96cc6e
Show file tree
Hide file tree
Showing 102 changed files with 253 additions and 150 deletions.
8 changes: 3 additions & 5 deletions src/libtest/lib.rs
Expand Up @@ -977,15 +977,13 @@ fn use_color(opts: &TestOpts) -> bool {
}
}

#[cfg(target_os = "redox")]
#[cfg(any(target_os = "cloudabi",
target_os = "redox",
all(target_arch = "wasm32", not(target_os = "emscripten"))))]
fn stdout_isatty() -> bool {
// FIXME: Implement isatty on Redox
false
}
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
fn stdout_isatty() -> bool {
false
}
#[cfg(unix)]
fn stdout_isatty() -> bool {
unsafe { libc::isatty(libc::STDOUT_FILENO) != 0 }
Expand Down
7 changes: 4 additions & 3 deletions src/test/codegen/dllimports/main.rs
Expand Up @@ -9,19 +9,20 @@
// except according to those terms.

// This test is for *-windows-msvc only.
// ignore-gnu
// ignore-android
// ignore-bitrig
// ignore-macos
// ignore-cloudabi
// ignore-dragonfly
// ignore-emscripten
// ignore-freebsd
// ignore-gnu
// ignore-haiku
// ignore-ios
// ignore-linux
// ignore-macos
// ignore-netbsd
// ignore-openbsd
// ignore-solaris
// ignore-emscripten

// aux-build:dummy.rs
// aux-build:wrapper.rs
Expand Down
5 changes: 3 additions & 2 deletions src/test/codegen/panic-abort-windows.rs
Expand Up @@ -13,16 +13,17 @@
// This test is for *-windows-msvc only.
// ignore-android
// ignore-bitrig
// ignore-macos
// ignore-cloudabi
// ignore-dragonfly
// ignore-emscripten
// ignore-freebsd
// ignore-haiku
// ignore-ios
// ignore-linux
// ignore-macos
// ignore-netbsd
// ignore-openbsd
// ignore-solaris
// ignore-emscripten

// compile-flags: -C no-prepopulate-passes -C panic=abort -O

Expand Down
2 changes: 2 additions & 0 deletions src/test/compile-fail/E0277.rs
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-cloudabi no std::path

use std::path::Path;

trait Foo {
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/cdylib-deps-must-be-static.rs
Expand Up @@ -11,6 +11,7 @@
// error-pattern: crate `cdylib_dep` required to be available in rlib format, but was not found
// aux-build:cdylib-dep.rs
// ignore-musl
// ignore-cloudabi
// ignore-emscripten

#![crate_type = "cdylib"]
Expand Down
2 changes: 2 additions & 0 deletions src/test/compile-fail/issue-13352.rs
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-cloudabi no std::process

fn foo(_: Box<FnMut()>) {}

fn main() {
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-37665.rs
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// compile-flags: -Z unstable-options --unpretty=mir
// ignore-cloudabi no std::path

use std::path::MAIN_SEPARATOR;

Expand Down
Expand Up @@ -10,6 +10,7 @@

// compile-flags:-C panic=abort -C prefer-dynamic
// ignore-musl - no dylibs here
// ignore-cloudabi
// ignore-emscripten
// error-pattern:`panic_unwind` is not compiled with this crate's panic strategy

Expand Down
7 changes: 4 additions & 3 deletions src/test/parse-fail/mod_file_not_exist_windows.rs
Expand Up @@ -8,19 +8,20 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-gnu
// ignore-android
// ignore-bitrig
// ignore-macos
// ignore-cloudabi
// ignore-dragonfly
// ignore-emscripten
// ignore-freebsd
// ignore-gnu
// ignore-haiku
// ignore-ios
// ignore-linux
// ignore-macos
// ignore-netbsd
// ignore-openbsd
// ignore-solaris
// ignore-emscripten

// compile-flags: -Z parse-only

Expand Down
3 changes: 2 additions & 1 deletion src/test/run-fail/mir_dynamic_drops_1.rs
Expand Up @@ -7,9 +7,10 @@
// <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.

// error-pattern:drop 1
// error-pattern:drop 2

// ignore-cloudabi no std::process

/// Structure which will not allow to be dropped twice.
struct Droppable<'a>(&'a mut bool, u32);
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-fail/mir_dynamic_drops_2.rs
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

// error-pattern:drop 1

// ignore-cloudabi no std::process

/// Structure which will not allow to be dropped twice.
struct Droppable<'a>(&'a mut bool, u32);
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-fail/mir_dynamic_drops_3.rs
Expand Up @@ -12,7 +12,7 @@
// error-pattern:drop 3
// error-pattern:drop 2
// error-pattern:drop 1

// ignore-cloudabi no std::process

/// Structure which will not allow to be dropped twice.
struct Droppable<'a>(&'a mut bool, u32);
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-fail/mir_trans_no_landing_pads.rs
Expand Up @@ -10,6 +10,8 @@

// compile-flags: -Z no-landing-pads -C codegen-units=1
// error-pattern:converging_fn called
// ignore-cloudabi no std::process

use std::io::{self, Write};

struct Droppable;
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-fail/mir_trans_no_landing_pads_diverging.rs
Expand Up @@ -10,6 +10,8 @@

// compile-flags: -Z no-landing-pads -C codegen-units=1
// error-pattern:diverging_fn called
// ignore-cloudabi no std::process

use std::io::{self, Write};

struct Droppable;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-fail/tls-exit-status.rs
Expand Up @@ -10,6 +10,7 @@

// error-pattern:nonzero
// exec-env:RUST_NEWRT=1
// ignore-cloudabi no std::env

use std::env;

Expand Down
3 changes: 2 additions & 1 deletion src/test/run-pass-valgrind/exit-flushes.rs
Expand Up @@ -9,9 +9,10 @@
// except according to those terms.

// no-prefer-dynamic
// ignore-cloudabi
// ignore-emscripten
// ignore-macos this needs valgrind 3.11 or higher; see
// https://github.com/rust-lang/rust/pull/30365#issuecomment-165763679
// ignore-emscripten

use std::env;
use std::process::{exit, Command};
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/abort-on-c-abi.rs
Expand Up @@ -11,6 +11,7 @@
// Since we mark some ABIs as "nounwind" to LLVM, we must make sure that
// we never unwind through them.

// ignore-cloudabi no env and process
// ignore-emscripten no processes

use std::{env, panic};
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/atomic-print.rs
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-cloudabi no process support
// ignore-emscripten no threads support

use std::{env, fmt, process, sync, thread};
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/backtrace-debuginfo.rs
Expand Up @@ -17,6 +17,7 @@

// compile-flags:-g -Cllvm-args=-enable-tail-merge=0
// ignore-pretty issue #37195
// ignore-cloudabi spawning processes is not supported
// ignore-emscripten spawning processes is not supported

use std::env;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/backtrace.rs
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// ignore-android FIXME #17520
// ignore-cloudabi spawning processes is not supported
// ignore-emscripten spawning processes is not supported
// ignore-openbsd no support for libbacktrace without filename
// compile-flags:-g
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/cfg-family.rs
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// pretty-expanded FIXME #23616
// ignore-cloudabi no target_family
// ignore-wasm32-bare no target_family

#[cfg(windows)]
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/cfg-target-family.rs
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-cloudabi no target_family
// ignore-wasm32-bare no target_family

// pretty-expanded FIXME #23616
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/cleanup-shortcircuit.rs
Expand Up @@ -11,6 +11,7 @@
// Test that cleanups for the RHS of shortcircuiting operators work.

// pretty-expanded FIXME #23616
// ignore-cloudabi no std::env support

use std::env;

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

// ignore-windows - this is a unix-specific test
// ignore-cloudabi no processes
// ignore-emscripten no processes

#![feature(process_exec, libc)]
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/command-exec.rs
Expand Up @@ -10,6 +10,7 @@

// ignore-windows - this is a unix-specific test
// ignore-pretty issue #37199
// ignore-cloudabi no processes
// ignore-emscripten no processes

#![feature(process_exec)]
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/core-run-destroy.rs
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// compile-flags:--test
// ignore-cloudabi no processes
// ignore-emscripten no processes

// NB: These tests kill child processes. Valgrind sees these children as leaking
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/env-args-reverse-iterator.rs
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-cloudabi no processes
// ignore-emscripten no processes

use std::env::args;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/env-funky-keys.rs
Expand Up @@ -12,6 +12,7 @@

// ignore-android
// ignore-windows
// ignore-cloudabi no execve
// ignore-emscripten no execve
// no-prefer-dynamic

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

// ignore-cloudabi no environment variables present
// ignore-emscripten env vars don't work?

#![feature(path)]
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/env-vars.rs
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-cloudabi no env vars
// ignore-wasm32-bare no env vars

use std::env::*;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/exec-env.rs
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// exec-env:TEST_EXEC_ENV=22
// ignore-cloudabi no env vars
// ignore-emscripten FIXME: issue #31622

use std::env;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/fds-are-cloexec.rs
Expand Up @@ -10,6 +10,7 @@

// ignore-windows
// ignore-android
// ignore-cloudabi no processes
// ignore-emscripten no processes
// ignore-haiku

Expand Down
11 changes: 6 additions & 5 deletions src/test/run-pass/intrinsic-alignment.rs
Expand Up @@ -19,14 +19,15 @@ mod rusti {
}
}

#[cfg(any(target_os = "linux",
target_os = "macos",
target_os = "freebsd",
#[cfg(any(target_os = "cloudabi",
target_os = "dragonfly",
target_os = "emscripten",
target_os = "freebsd",
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
target_os = "emscripten"))]
target_os = "solaris"))]
mod m {
#[main]
#[cfg(target_arch = "x86")]
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-10626.rs
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-cloudabi no processes
// ignore-emscripten no processes

// Make sure that if a process doesn't have its stdio/stderr descriptors set up
Expand Down
3 changes: 2 additions & 1 deletion src/test/run-pass/issue-12133-3.rs
Expand Up @@ -11,8 +11,9 @@
// aux-build:issue-12133-rlib.rs
// aux-build:issue-12133-dylib.rs
// aux-build:issue-12133-dylib2.rs
// ignore-musl
// ignore-cloudabi no dylib support
// ignore-emscripten no dylib support
// ignore-musl

// pretty-expanded FIXME #23616

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

// ignore-cloudabi no processes
// ignore-emscripten no processes

#![feature(io, process_capture)]
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-14456.rs
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-cloudabi no processes
// ignore-emscripten no processes

#![feature(io, process_capture)]
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-14940.rs
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-cloudabi no processes
// ignore-emscripten no processes

use std::env;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issue-16272.rs
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-cloudabi no processes
// ignore-emscripten no processes

use std::process::Command;
Expand Down

0 comments on commit d96cc6e

Please sign in to comment.