Skip to content

Commit e83ca06

Browse files
authored
Rollup merge of rust-lang#142414 - folkertdev:ignore-nostd-tests, r=jieyouxu
ignore `run-make` tests that need `std` on targets without `std` In particular, anything that includes `none` in the target triple, and `nvptx64-nvidia-cuda`. Right now we don't cross-compile the `run-make` tests, but we want to in the future. This uses `//@ needs-target-std` introduced in rust-lang#142297. Useful for rust-lang#139244 and rust-lang#141856. The modified files are based on running rust-lang#141856 locally. It might be that rust-lang#139244 uncovers some additional files, but that PR needs to be rebased (though actually I'd advice to rebase the non-test changes onto this PR, probably faster that way). r? ``@jieyouxu`` <details> <summary>vim notes for future me</summary> Make a file with lines like this ``` /home/folkertdev/rust/rust/tests/run-make/export/disambiguator/rmake.rs:1:1 /home/folkertdev/rust/rust/tests/run-make/invalid-so/rmake.rs:1:1 /home/folkertdev/rust/rust/tests/run-make/no-builtins-attribute/rmake.rs:1:1 /home/folkertdev/rust/rust/tests/run-make/export/extern-opt/rmake.rs:1:1 /home/folkertdev/rust/rust/tests/run-make/link-dedup/rmake.rs:1:1 ``` then ``` :set errorformat=%f:%l:%c :cfile /tmp/files-to-fix.txt ``` ``` :copen :cnext :cprev ``` are your friends </details>
2 parents d68432a + efaf3eb commit e83ca06

File tree

108 files changed

+184
-21
lines changed

Some content is hidden

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

108 files changed

+184
-21
lines changed

tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ needs-target-std
12
// ignore-tidy-linelength
23

34
// Check that the `CURRENT_RUSTC_VERSION` placeholder is correctly replaced by the current

tests/run-make/allow-warnings-cmdline-stability/rmake.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ needs-target-std
12
// Test that `-Awarnings` suppresses warnings for unstable APIs.
23

34
use run_make_support::rustc;

tests/run-make/artifact-incr-cache-no-obj/rmake.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//@ needs-target-std
2+
//
13
// emitting an object file is not necessary if user didn't ask for one
24
//
35
// This test is similar to run-make/artifact-incr-cache but it doesn't

tests/run-make/artifact-incr-cache/rmake.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//@ needs-target-std
2+
//
13
// rustc should be able to emit required files (asm, llvm-*, etc) during incremental
24
// compilation on the first pass by running the code gen as well as on subsequent runs -
35
// extracting them from the cache

tests/run-make/bin-emit-no-symbols/rmake.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//@ needs-target-std
2+
//
13
// When setting the crate type as a "bin" (in app.rs),
24
// this could cause a bug where some symbols would not be
35
// emitted in the object files. This has been fixed, and

tests/run-make/box-struct-no-segfault/rmake.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//@ needs-target-std
2+
//
13
// The crate "foo" tied to this test executes a very specific function,
24
// which involves boxing an instance of the struct Foo. However,
35
// this once caused a segmentation fault in cargo release builds due to an LLVM

tests/run-make/checksum-freshness/rmake.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ needs-target-std
12
use run_make_support::{rfs, rustc};
23

34
fn main() {

tests/run-make/compiler-lookup-paths-2/rmake.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//@ needs-target-std
2+
//
13
// This test checks that extern crate declarations in Cargo without a corresponding declaration
24
// in the manifest of a dependency are NOT allowed. The last rustc call does it anyways, which
35
// should result in a compilation failure.

tests/run-make/compiler-lookup-paths/rmake.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//@ needs-target-std
2+
//
13
// Since #19941, rustc can accept specifications on its library search paths.
24
// This test runs Rust programs with varied library dependencies, expecting them
35
// to succeed or fail depending on the situation.

tests/run-make/const-trait-stable-toolchain/rmake.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//@ needs-target-std
2+
//
13
// Test output of const super trait errors in both stable and nightly.
24
// We don't want to provide suggestions on stable that only make sense in nightly.
35

0 commit comments

Comments
 (0)