-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Convert all Makefile tests to rmake tests with legacy-makefile-test
#131598
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ use tracing::*; | |
|
||
use crate::common::{ | ||
Assembly, Codegen, CodegenUnits, CompareMode, Config, CoverageMap, CoverageRun, Crashes, | ||
DebugInfo, Debugger, FailMode, Incremental, JsDocTest, MirOpt, PassMode, Pretty, RunMake, | ||
DebugInfo, Debugger, FailMode, Incremental, JsDocTest, MirOpt, Mode, PassMode, Pretty, RunMake, | ||
Rustdoc, RustdocJson, TestPaths, UI_EXTENSIONS, UI_FIXED, UI_RUN_STDERR, UI_RUN_STDOUT, | ||
UI_STDERR, UI_STDOUT, UI_SVG, UI_WINDOWS_SVG, Ui, expected_output_path, incremental_dir, | ||
output_base_dir, output_base_name, output_testname_unique, | ||
|
@@ -128,7 +128,13 @@ pub fn run(config: Arc<Config>, testpaths: &TestPaths, revision: Option<&str>) { | |
print!("\n\n"); | ||
} | ||
debug!("running {:?}", testpaths.file.display()); | ||
let mut props = TestProps::from_file(&testpaths.file, revision, &config); | ||
let mut props = { | ||
let file = match config.mode { | ||
Mode::RunMake => &testpaths.file.join("rmake.rs"), | ||
_ => &testpaths.file, | ||
}; | ||
TestProps::from_file(file, revision, &config) | ||
}; | ||
Comment on lines
+131
to
+137
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the future I'd like to experiment with making the canonical name of a run-make test be the path of its But when I tried, there were enough little complications that I didn't want to do so immediately in this PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have found working with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That sounds reasonable to me. Yeah, there are some quirks with a specific primary test file vs directory, but I haven't done an extensive survey on that yet. |
||
|
||
// For non-incremental (i.e. regular UI) tests, the incremental directory | ||
// takes into account the revision name, since the revisions are independent | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//@ legacy-makefile-test | ||
|
||
//@ only-x86_64 | ||
|
||
//@ ignore-test | ||
// FIXME(jieyouxu): This test never runs because the `ifeq` check in the Makefile | ||
// compares `x86` to `x86_64`, which always evaluates to false. | ||
// When the test does run, the compilation does not include `.note.gnu.property`. | ||
// See https://github.com/rust-lang/rust/pull/126720 for more information. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//@ legacy-makefile-test |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//@ legacy-makefile-test | ||
|
||
//@ ignore-cross-compile | ||
//@ ignore-windows-msvc |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//@ legacy-makefile-test | ||
|
||
//@ ignore-cross-compile | ||
|
||
// This test uses `ln -s` rather than copying to save testing time, but its | ||
// usage doesn't work on windows. So ignore windows. | ||
//@ ignore-windows |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//@ legacy-makefile-test | ||
|
||
//@ needs-force-clang-based-tests |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//@ legacy-makefile-test | ||
|
||
//@ only-linux | ||
//@ ignore-cross-compile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//@ legacy-makefile-test | ||
|
||
//@ ignore-cross-compile | ||
//@ ignore-windows |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//@ legacy-makefile-test | ||
|
||
//@ ignore-cross-compile | ||
//@ ignore-riscv64 On this platform only `-Csplit-debuginfo=off` is supported, see #120518 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//@ legacy-makefile-test | ||
|
||
//@ ignore-cross-compile | ||
//@ only-linux | ||
//@ only-x86_64 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//@ legacy-makefile-test | ||
|
||
// This test uses `ln -s` rather than copying to save testing time, but its | ||
// usage doesn't work on Windows. | ||
//@ ignore-windows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turns out that
line_directive
is also called by debugger tests to parse its own “directives” with a//
prefix. But I hope to be able to eventually split that off to use its own separate parsing function.