-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Migrate issue-37839
, track-path-dep-info
and track-pgo-dep-info
run-make
tests to rmake
#127378
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// A compiler bug caused the following issue: | ||
// If a crate A depends on crate B, and crate B | ||
// depends on crate C, and crate C contains a procedural | ||
// macro, compiling crate A would fail. | ||
// This was fixed in #37846, and this test checks | ||
// that this bug does not make a resurgence. | ||
|
||
use run_make_support::{bare_rustc, cwd, rust_lib_name, rustc}; | ||
|
||
fn main() { | ||
rustc().input("a.rs").run(); | ||
rustc().input("b.rs").run(); | ||
let curr_dir = cwd().display().to_string(); | ||
bare_rustc() | ||
.input("c.rs") | ||
.arg(format!("-Ldependency={curr_dir}")) | ||
.extern_("b", cwd().join(rust_lib_name("b"))) | ||
.out_dir(cwd()) | ||
.run(); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// This test checks the functionality of `tracked_path::path`, a procedural macro | ||
// feature that adds a dependency to another file inside the procmacro. In this case, | ||
// the text file is added through this method, and the test checks that the compilation | ||
// output successfully added the file as a dependency. | ||
// See https://github.com/rust-lang/rust/pull/84029 | ||
|
||
use run_make_support::{fs_wrapper, rustc}; | ||
|
||
fn main() { | ||
rustc().input("macro_def.rs").run(); | ||
rustc().env("EXISTING_PROC_MACRO_ENV", "1").emit("dep-info").input("macro_use.rs").run(); | ||
assert!(fs_wrapper::read_to_string("macro_use.d").contains("emojis.txt:")); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Emitting dep-info files used to not have any mention of PGO profiles used | ||
// in compilation, which meant these profiles could be changed without consequence. | ||
// After changing this in #100801, this test checks that the profile data is successfully | ||
// included in dep-info emit files. | ||
// See https://github.com/rust-lang/rust/pull/100801 | ||
|
||
//@ ignore-cross-compile | ||
// Reason: the binary is executed | ||
//@ needs-profiler-support | ||
|
||
use run_make_support::{fs_wrapper, llvm_profdata, run, rustc}; | ||
|
||
fn main() { | ||
// Generate the profile-guided-optimization (PGO) profiles | ||
rustc().profile_generate("profiles").input("main.rs").run(); | ||
// Merge the profiles | ||
run("main"); | ||
llvm_profdata().merge().output("merged.profdata").input("profiles").run(); | ||
// Use the profiles in compilation | ||
rustc().profile_use("merged.profdata").emit("dep-info").input("main.rs").run(); | ||
// Check that the profile file is in the dep-info emit file | ||
assert!(fs_wrapper::read_to_string("main.d").contains("merged.profdata")); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Question: does this need
//@ ignore-cross-compile
? Or is that kinda implied by//@ needs-profiler-support
(even if it is, maybe having the ignore is clearer?)?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.
I believe that it's indeed getting implied by //@ needs-profiler-support (you can see the
ignored, ignored when profiler support is disabled
in the test log), but I added the ignore + reason for clarity. @rustbot review