Skip to content

Commit d96cc6e

Browse files
committed
Auto merge of #47127 - EdSchouten:cloudabi-tests, r=kennytm
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.
2 parents 8d1a302 + 3ca407e commit d96cc6e

File tree

102 files changed

+253
-150
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+253
-150
lines changed

src/libtest/lib.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -977,15 +977,13 @@ fn use_color(opts: &TestOpts) -> bool {
977977
}
978978
}
979979

980-
#[cfg(target_os = "redox")]
980+
#[cfg(any(target_os = "cloudabi",
981+
target_os = "redox",
982+
all(target_arch = "wasm32", not(target_os = "emscripten"))))]
981983
fn stdout_isatty() -> bool {
982984
// FIXME: Implement isatty on Redox
983985
false
984986
}
985-
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
986-
fn stdout_isatty() -> bool {
987-
false
988-
}
989987
#[cfg(unix)]
990988
fn stdout_isatty() -> bool {
991989
unsafe { libc::isatty(libc::STDOUT_FILENO) != 0 }

src/test/codegen/dllimports/main.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,20 @@
99
// except according to those terms.
1010

1111
// This test is for *-windows-msvc only.
12-
// ignore-gnu
1312
// ignore-android
1413
// ignore-bitrig
15-
// ignore-macos
14+
// ignore-cloudabi
1615
// ignore-dragonfly
16+
// ignore-emscripten
1717
// ignore-freebsd
18+
// ignore-gnu
1819
// ignore-haiku
1920
// ignore-ios
2021
// ignore-linux
22+
// ignore-macos
2123
// ignore-netbsd
2224
// ignore-openbsd
2325
// ignore-solaris
24-
// ignore-emscripten
2526

2627
// aux-build:dummy.rs
2728
// aux-build:wrapper.rs

src/test/codegen/panic-abort-windows.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@
1313
// This test is for *-windows-msvc only.
1414
// ignore-android
1515
// ignore-bitrig
16-
// ignore-macos
16+
// ignore-cloudabi
1717
// ignore-dragonfly
18+
// ignore-emscripten
1819
// ignore-freebsd
1920
// ignore-haiku
2021
// ignore-ios
2122
// ignore-linux
23+
// ignore-macos
2224
// ignore-netbsd
2325
// ignore-openbsd
2426
// ignore-solaris
25-
// ignore-emscripten
2627

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

src/test/compile-fail/E0277.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-cloudabi no std::path
12+
1113
use std::path::Path;
1214

1315
trait Foo {

src/test/compile-fail/cdylib-deps-must-be-static.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// error-pattern: crate `cdylib_dep` required to be available in rlib format, but was not found
1212
// aux-build:cdylib-dep.rs
1313
// ignore-musl
14+
// ignore-cloudabi
1415
// ignore-emscripten
1516

1617
#![crate_type = "cdylib"]

src/test/compile-fail/issue-13352.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-cloudabi no std::process
12+
1113
fn foo(_: Box<FnMut()>) {}
1214

1315
fn main() {

src/test/compile-fail/issue-37665.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

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

1314
use std::path::MAIN_SEPARATOR;
1415

src/test/compile-fail/panic-runtime/abort-link-to-unwind-dylib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

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

src/test/parse-fail/mod_file_not_exist_windows.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-gnu
1211
// ignore-android
1312
// ignore-bitrig
14-
// ignore-macos
13+
// ignore-cloudabi
1514
// ignore-dragonfly
15+
// ignore-emscripten
1616
// ignore-freebsd
17+
// ignore-gnu
1718
// ignore-haiku
1819
// ignore-ios
1920
// ignore-linux
21+
// ignore-macos
2022
// ignore-netbsd
2123
// ignore-openbsd
2224
// ignore-solaris
23-
// ignore-emscripten
2425

2526
// compile-flags: -Z parse-only
2627

src/test/run-fail/mir_dynamic_drops_1.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10+
1011
// error-pattern:drop 1
1112
// error-pattern:drop 2
12-
13+
// ignore-cloudabi no std::process
1314

1415
/// Structure which will not allow to be dropped twice.
1516
struct Droppable<'a>(&'a mut bool, u32);

src/test/run-fail/mir_dynamic_drops_2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
// error-pattern:drop 1
12-
12+
// ignore-cloudabi no std::process
1313

1414
/// Structure which will not allow to be dropped twice.
1515
struct Droppable<'a>(&'a mut bool, u32);

src/test/run-fail/mir_dynamic_drops_3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// error-pattern:drop 3
1313
// error-pattern:drop 2
1414
// error-pattern:drop 1
15-
15+
// ignore-cloudabi no std::process
1616

1717
/// Structure which will not allow to be dropped twice.
1818
struct Droppable<'a>(&'a mut bool, u32);

src/test/run-fail/mir_trans_no_landing_pads.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// compile-flags: -Z no-landing-pads -C codegen-units=1
1212
// error-pattern:converging_fn called
13+
// ignore-cloudabi no std::process
14+
1315
use std::io::{self, Write};
1416

1517
struct Droppable;

src/test/run-fail/mir_trans_no_landing_pads_diverging.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// compile-flags: -Z no-landing-pads -C codegen-units=1
1212
// error-pattern:diverging_fn called
13+
// ignore-cloudabi no std::process
14+
1315
use std::io::{self, Write};
1416

1517
struct Droppable;

src/test/run-fail/tls-exit-status.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
// error-pattern:nonzero
1212
// exec-env:RUST_NEWRT=1
13+
// ignore-cloudabi no std::env
1314

1415
use std::env;
1516

src/test/run-pass-valgrind/exit-flushes.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
// except according to those terms.
1010

1111
// no-prefer-dynamic
12+
// ignore-cloudabi
13+
// ignore-emscripten
1214
// ignore-macos this needs valgrind 3.11 or higher; see
1315
// https://github.com/rust-lang/rust/pull/30365#issuecomment-165763679
14-
// ignore-emscripten
1516

1617
use std::env;
1718
use std::process::{exit, Command};

src/test/run-pass/abort-on-c-abi.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// Since we mark some ABIs as "nounwind" to LLVM, we must make sure that
1212
// we never unwind through them.
1313

14+
// ignore-cloudabi no env and process
1415
// ignore-emscripten no processes
1516

1617
use std::{env, panic};

src/test/run-pass/atomic-print.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-cloudabi no process support
1112
// ignore-emscripten no threads support
1213

1314
use std::{env, fmt, process, sync, thread};

src/test/run-pass/backtrace-debuginfo.rs

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

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

2223
use std::env;

src/test/run-pass/backtrace.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// ignore-android FIXME #17520
12+
// ignore-cloudabi spawning processes is not supported
1213
// ignore-emscripten spawning processes is not supported
1314
// ignore-openbsd no support for libbacktrace without filename
1415
// compile-flags:-g

src/test/run-pass/cfg-family.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// pretty-expanded FIXME #23616
12+
// ignore-cloudabi no target_family
1213
// ignore-wasm32-bare no target_family
1314

1415
#[cfg(windows)]

src/test/run-pass/cfg-target-family.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-cloudabi no target_family
1112
// ignore-wasm32-bare no target_family
1213

1314
// pretty-expanded FIXME #23616

src/test/run-pass/cleanup-shortcircuit.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// Test that cleanups for the RHS of shortcircuiting operators work.
1212

1313
// pretty-expanded FIXME #23616
14+
// ignore-cloudabi no std::env support
1415

1516
use std::env;
1617

src/test/run-pass/command-before-exec.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// ignore-windows - this is a unix-specific test
12+
// ignore-cloudabi no processes
1213
// ignore-emscripten no processes
1314

1415
#![feature(process_exec, libc)]

src/test/run-pass/command-exec.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
// ignore-windows - this is a unix-specific test
1212
// ignore-pretty issue #37199
13+
// ignore-cloudabi no processes
1314
// ignore-emscripten no processes
1415

1516
#![feature(process_exec)]

src/test/run-pass/core-run-destroy.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags:--test
12+
// ignore-cloudabi no processes
1213
// ignore-emscripten no processes
1314

1415
// NB: These tests kill child processes. Valgrind sees these children as leaking

src/test/run-pass/env-args-reverse-iterator.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-cloudabi no processes
1112
// ignore-emscripten no processes
1213

1314
use std::env::args;

src/test/run-pass/env-funky-keys.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
// ignore-android
1414
// ignore-windows
15+
// ignore-cloudabi no execve
1516
// ignore-emscripten no execve
1617
// no-prefer-dynamic
1718

src/test/run-pass/env-home-dir.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

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

1314
#![feature(path)]

src/test/run-pass/env-vars.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-cloudabi no env vars
1112
// ignore-wasm32-bare no env vars
1213

1314
use std::env::*;

src/test/run-pass/exec-env.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// exec-env:TEST_EXEC_ENV=22
12+
// ignore-cloudabi no env vars
1213
// ignore-emscripten FIXME: issue #31622
1314

1415
use std::env;

src/test/run-pass/fds-are-cloexec.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
// ignore-windows
1212
// ignore-android
13+
// ignore-cloudabi no processes
1314
// ignore-emscripten no processes
1415
// ignore-haiku
1516

src/test/run-pass/intrinsic-alignment.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ mod rusti {
1919
}
2020
}
2121

22-
#[cfg(any(target_os = "linux",
23-
target_os = "macos",
24-
target_os = "freebsd",
22+
#[cfg(any(target_os = "cloudabi",
2523
target_os = "dragonfly",
24+
target_os = "emscripten",
25+
target_os = "freebsd",
26+
target_os = "linux",
27+
target_os = "macos",
2628
target_os = "netbsd",
2729
target_os = "openbsd",
28-
target_os = "solaris",
29-
target_os = "emscripten"))]
30+
target_os = "solaris"))]
3031
mod m {
3132
#[main]
3233
#[cfg(target_arch = "x86")]

src/test/run-pass/issue-10626.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-cloudabi no processes
1112
// ignore-emscripten no processes
1213

1314
// Make sure that if a process doesn't have its stdio/stderr descriptors set up

src/test/run-pass/issue-12133-3.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
// aux-build:issue-12133-rlib.rs
1212
// aux-build:issue-12133-dylib.rs
1313
// aux-build:issue-12133-dylib2.rs
14-
// ignore-musl
14+
// ignore-cloudabi no dylib support
1515
// ignore-emscripten no dylib support
16+
// ignore-musl
1617

1718
// pretty-expanded FIXME #23616
1819

src/test/run-pass/issue-13304.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-cloudabi no processes
1112
// ignore-emscripten no processes
1213

1314
#![feature(io, process_capture)]

src/test/run-pass/issue-14456.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-cloudabi no processes
1112
// ignore-emscripten no processes
1213

1314
#![feature(io, process_capture)]

src/test/run-pass/issue-14940.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-cloudabi no processes
1112
// ignore-emscripten no processes
1213

1314
use std::env;

src/test/run-pass/issue-16272.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-cloudabi no processes
1112
// ignore-emscripten no processes
1213

1314
use std::process::Command;

0 commit comments

Comments
 (0)