Skip to content

ignore run-make tests that need std on targets without std #142414

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
// ignore-tidy-linelength

// Check that the `CURRENT_RUSTC_VERSION` placeholder is correctly replaced by the current
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/allow-warnings-cmdline-stability/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
// Test that `-Awarnings` suppresses warnings for unstable APIs.

use run_make_support::rustc;
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/artifact-incr-cache-no-obj/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// emitting an object file is not necessary if user didn't ask for one
//
// This test is similar to run-make/artifact-incr-cache but it doesn't
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/artifact-incr-cache/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// rustc should be able to emit required files (asm, llvm-*, etc) during incremental
// compilation on the first pass by running the code gen as well as on subsequent runs -
// extracting them from the cache
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/bin-emit-no-symbols/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// When setting the crate type as a "bin" (in app.rs),
// this could cause a bug where some symbols would not be
// emitted in the object files. This has been fixed, and
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/box-struct-no-segfault/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// The crate "foo" tied to this test executes a very specific function,
// which involves boxing an instance of the struct Foo. However,
// this once caused a segmentation fault in cargo release builds due to an LLVM
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/checksum-freshness/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
use run_make_support::{rfs, rustc};

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/compiler-lookup-paths-2/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// This test checks that extern crate declarations in Cargo without a corresponding declaration
// in the manifest of a dependency are NOT allowed. The last rustc call does it anyways, which
// should result in a compilation failure.
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/compiler-lookup-paths/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Since #19941, rustc can accept specifications on its library search paths.
// This test runs Rust programs with varied library dependencies, expecting them
// to succeed or fail depending on the situation.
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/const-trait-stable-toolchain/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Test output of const super trait errors in both stable and nightly.
// We don't want to provide suggestions on stable that only make sense in nightly.

Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/crate-circular-deps-link/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Test that previously triggered a linker failure with root cause
// similar to one found in the issue #69368.
//
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/cross-lang-lto-upstream-rlibs/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// When using the flag -C linker-plugin-lto, static libraries could lose their upstream object
// files during compilation. This bug was fixed in #53031, and this test compiles a staticlib
// dependent on upstream, checking that the upstream object file still exists after no LTO and
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/cross-lang-lto/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// This test checks that the object files we generate are actually
// LLVM bitcode files (as used by linker LTO plugins) when compiling with
// -Clinker-plugin-lto.
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/debugger-visualizer-dep-info/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// This test checks that files referenced via #[debugger_visualizer] are
// included in `--emit dep-info` output.
// See https://github.com/rust-lang/rust/pull/111641
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/dep-info/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// This is a simple smoke test for rustc's `--emit dep-info` feature. It prints out
// information about dependencies in a Makefile-compatible format, as a `.d` file.
// Note that this test does not check that the `.d` file is Makefile-compatible.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Non-regression test for issue #132920 where multiple versions of the same crate are present in
// the dependency graph, and an unexpected error in a dependent crate caused an ICE in the
// unsatisfied bounds diagnostics for traits present in multiple crate versions.
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/doctests-merge/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
use std::path::Path;

use run_make_support::{cwd, diff, rustc, rustdoc};
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/doctests-runtool/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Tests behavior of rustdoc `--test-runtool`.

use std::path::PathBuf;
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/dump-mono-stats/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// A flag named dump-mono-stats was added to the compiler in 2022, which
// collects stats on instantiation of items and their associated costs.
// This test checks that the output stat file exists, and that it contains
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/duplicate-output-flavors/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
use run_make_support::rustc;

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/embed-metadata/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Tests the -Zembed-metadata compiler flag.
// Tracking issue: https://github.com/rust-lang/rust/issues/139165

Expand Down
1 change: 1 addition & 0 deletions tests/run-make/embed-source-dwarf/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
//@ ignore-windows
//@ ignore-apple

Expand Down
1 change: 1 addition & 0 deletions tests/run-make/emit-named-files/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
use std::path::Path;

use run_make_support::{rfs, rustc};
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/emit-path-unhashed/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Specifying how rustc outputs a file can be done in different ways, such as
// the output flag or the KIND=NAME syntax. However, some of these methods used
// to result in different hashes on output files even though they yielded the
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/emit-stack-sizes/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// this diagnostics information should be located.
// See https://github.com/rust-lang/rust/pull/51946

//@ needs-target-std
//@ ignore-windows
//@ ignore-apple
// Reason: this feature only works when the output object format is ELF.
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/emit-to-stdout/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
//! If `-o -` or `--emit KIND=-` is provided, output should be written to stdout
//! instead. Binary output (`obj`, `llvm-bc`, `link` and `metadata`)
//! being written this way will result in an error if stdout is a tty.
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/env-dep-info/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Inside dep-info emit files, #71858 made it so all accessed environment
// variables are usefully printed. This test checks that this feature works
// as intended by checking if the environment variables used in compilation
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/error-found-staticlib-instead-crate/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// When rustc is looking for a crate but is given a staticlib instead,
// the error message should be helpful and indicate precisely the cause
// of the compilation failure.
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/exit-code/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Test that we exit with the correct exit code for successful / unsuccessful / ICE compilations

use run_make_support::{rustc, rustdoc};
Expand Down
11 changes: 3 additions & 8 deletions tests/run-make/export/disambiguator/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
//@ needs-target-std
use run_make_support::rustc;

fn main() {
rustc()
.env("RUSTC_FORCE_RUSTC_VERSION", "1")
.input("libr.rs")
.run();
rustc()
.env("RUSTC_FORCE_RUSTC_VERSION", "2")
.input("app.rs")
.run();
rustc().env("RUSTC_FORCE_RUSTC_VERSION", "1").input("libr.rs").run();
rustc().env("RUSTC_FORCE_RUSTC_VERSION", "2").input("app.rs").run();
}
8 changes: 3 additions & 5 deletions tests/run-make/export/extern-opt/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use run_make_support::{rustc, dynamic_lib_name};
//@ needs-target-std
use run_make_support::{dynamic_lib_name, rustc};

fn main() {
rustc()
.env("RUSTC_FORCE_RUSTC_VERSION", "1")
.input("libr.rs")
.run();
rustc().env("RUSTC_FORCE_RUSTC_VERSION", "1").input("libr.rs").run();

rustc()
.env("RUSTC_FORCE_RUSTC_VERSION", "2")
Expand Down
11 changes: 3 additions & 8 deletions tests/run-make/export/simple/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
//@ needs-target-std
use run_make_support::rustc;

fn main() {
rustc()
.env("RUSTC_FORCE_RUSTC_VERSION", "1")
.input("libr.rs")
.run();
rustc()
.env("RUSTC_FORCE_RUSTC_VERSION", "2")
.input("app.rs")
.run();
rustc().env("RUSTC_FORCE_RUSTC_VERSION", "1").input("libr.rs").run();
rustc().env("RUSTC_FORCE_RUSTC_VERSION", "2").input("app.rs").run();
}
2 changes: 2 additions & 0 deletions tests/run-make/extern-diff-internal-name/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// In the following scenario:
// 1. The crate foo, is referenced multiple times
// 2. --extern foo=./path/to/libbar.rlib is specified to rustc
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/extern-flag-fun/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// The --extern flag can override the default crate search of
// the compiler and directly fetch a given path. There are a few rules
// to follow: for example, there can't be more than one rlib, the crates must
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/extern-flag-rename-transitive/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// In this test, baz.rs is looking for an extern crate "a" which
// does not exist, and can only run through the --extern rustc flag
// defining that the "a" crate is in fact just "foo". This test
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/extern-multiple-copies/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// In this test, the rust library foo1 exists in two different locations, but only one
// is required by the --extern flag. This test checks that the copy is ignored (as --extern
// demands fetching only the original instance of foo1) and that no error is emitted, resulting
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/extern-multiple-copies2/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Almost identical to `extern-multiple-copies`, but with a variation in the --extern calls
// and the addition of #[macro_use] in the rust code files, which used to break --extern
// until #33625.
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/ice-static-mir/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Trying to access mid-level internal representation (MIR) in statics
// used to cause an internal compiler error (ICE), now handled as a proper
// error since #100211. This test checks that the correct error is printed
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/include-all-symbols-linking/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// See https://github.com/rust-lang/rust/pull/95604
// See https://github.com/rust-lang/rust/issues/47384

//@ needs-target-std
//@ ignore-wasm differences in object file formats causes errors in the llvm_objdump step.
//@ ignore-windows differences in object file formats causes errors in the llvm_objdump step.

Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/include-bytes-deps/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// include_bytes! and include_str! in `main.rs`
// should register the included file as of #24423,
// and this test checks that this is still the case.
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/incremental-debugger-visualizer/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// This test ensures that changes to files referenced via #[debugger_visualizer]
// (in this case, foo.py and foo.natvis) are picked up when compiling incrementally.
// See https://github.com/rust-lang/rust/pull/111641
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/inline-always-many-cgu/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
use std::ffi::OsStr;

use run_make_support::regex::Regex;
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/invalid-so/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// When a fake library was given to the compiler, it would
// result in an obscure and unhelpful error message. This test
// creates a false "foo" dylib, and checks that the standard error
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/invalid-staticlib/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// If the static library provided is not valid (in this test,
// created as an empty file),
// rustc should print a normal error message and not throw
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/invalid-symlink-search-path/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//
// See https://github.com/rust-lang/rust/issues/26006

//@ needs-target-std
//@ needs-symlink
//Reason: symlink requires elevated permission in Windows

Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/invalid-tmpdir-env-var/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// When the TMP (on Windows) or TMPDIR (on Unix) variable is set to an invalid
// or non-existing directory, this used to cause an internal compiler error (ICE). After the
// addition of proper error handling in #28430, this test checks that the expected message is
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/issue-107495-archive-permissions/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
#[cfg(unix)]
use std::os::unix::fs::PermissionsExt;
use std::path::Path;
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/issue-125484-used-dependencies/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Non-regression test for issues #125474, #125484, #125646, with the repro taken from #125484. Some
// queries use "used dependencies" while others use "speculatively loaded dependencies", and an
// indexing ICE appeared in some cases when these were unexpectedly used in the same context.
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/json-error-no-offset/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// The byte positions in json format error logging used to have a small, difficult
// to predict offset. This was changed to be the top of the file every time in #42973,
// and this test checks that the measurements appearing in the standard error are correct.
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/lib-trait-for-trait-no-ice/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Inside a library, implementing a trait for another trait
// with a lifetime used to cause an internal compiler error (ICE).
// This test checks that this bug does not make a resurgence -
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/link-arg/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// In 2016, the rustc flag "-C link-arg" was introduced - it can be repeatedly used
// to add single arguments to the linker. This test passes 2 arguments to the linker using it,
// then checks that the compiler's output contains the arguments passed to it.
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/link-args-order/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Passing linker arguments to the compiler used to be lost or reordered in a messy way
// as they were passed further to the linker. This was fixed in #70665, and this test
// checks that linker arguments remain intact and in the order they were originally passed in.
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/link-dedup/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// When native libraries are passed to the linker, there used to be an annoyance
// where multiple instances of the same library in a row would cause duplication in
// outputs. This has been fixed, and this test checks that it stays fixed.
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/linker-warning/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
use run_make_support::{Rustc, diff, regex, rustc};

fn run_rustc() -> Rustc {
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/llvm-outputs/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
// test that directories get created when emitting llvm bitcode and IR

use std::path::PathBuf;
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/lto-avoid-object-duplication/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// This test makes sure that functions defined in the upstream crates do not
// appear twice in the final staticlib when listing all the symbols from it.

//@ needs-target-std
//@ ignore-windows
// Reason: `llvm-objdump`'s output looks different on windows than on other platforms.
// Only checking on Unix platforms should suffice.
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/manual-crate-name/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
use run_make_support::{path, rustc};

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/many-crates-but-no-match/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// An extended version of the ui/changing-crates.rs test, this test puts
// multiple mismatching crates into the search path of crateC (A2 and A3)
// and checks that the standard error contains helpful messages to indicate
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/metadata-dep-info/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// Emitting dep-info alongside metadata would present subtle discrepancies
// in the output file, such as the filename transforming underscores_ into hyphens-.
// After the fix in #114750, this test checks that the emitted files are identical
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/metadata-only-crate-no-ice/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// In a dependency hierarchy, metadata-only crates could cause an Internal
// Compiler Error (ICE) due to a compiler bug - not correctly fetching sources for
// metadata-only crates. This test is a minimal reproduction of a program that triggered
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/missing-crate-dependency/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// A simple smoke test to check that rustc fails compilation
// and outputs a helpful message when a dependency is missing
// in a dependency chain.
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/multiple-emits/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ needs-target-std
use run_make_support::{path, rustc};

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/native-lib-alt-naming/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ needs-target-std
//
// On MSVC the alternative naming format for static libraries (`libfoo.a`) is accepted in addition
// to the default format (`foo.lib`).

Expand Down
Loading
Loading