Address review comments
This commit is contained in:
parent
4b0842f3ce
commit
c9cb3280f3
@ -3463,7 +3463,7 @@ fn run_rmake_v2_test(&self) {
|
||||
// to the `rmake_out` directory.
|
||||
for path in walkdir::WalkDir::new(&self.testpaths.file).min_depth(1) {
|
||||
let path = path.unwrap().path().to_path_buf();
|
||||
if path.file_name().map(|s| s != OsStr::new("rmake.rs")).unwrap_or(false) {
|
||||
if path.file_name().is_some_and(|s| s != "rmake.rs") {
|
||||
let target = rmake_out_dir.join(path.strip_prefix(&self.testpaths.file).unwrap());
|
||||
if path.is_dir() {
|
||||
copy_dir_all(&path, target).unwrap();
|
||||
|
@ -21,7 +21,7 @@ fn main() {
|
||||
run("bar");
|
||||
|
||||
let expected_extension = dynamic_lib_extension();
|
||||
read_dir(std::env::current_dir().unwrap(), |path| {
|
||||
read_dir(cwd(), |path| {
|
||||
if path.is_file()
|
||||
&& path.extension().is_some_and(|ext| ext == expected_extension)
|
||||
&& path.file_name().and_then(|name| name.to_str()).is_some_and(|name| {
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
use std::fs;
|
||||
|
||||
use run_make_support::rustc;
|
||||
use run_make_support::{cwd, rustc};
|
||||
|
||||
fn main() {
|
||||
rustc().input("input.rs").run_fail_assert_exit_code(1);
|
||||
|
||||
for entry in fs::read_dir(std::env::current_dir().unwrap()).unwrap() {
|
||||
for entry in fs::read_dir(cwd()).unwrap() {
|
||||
let entry = entry.unwrap();
|
||||
let path = entry.path();
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
// See <https://internals.rust-lang.org/t/easier-access-to-files-generated-by-emit-foo/20477>
|
||||
extern crate run_make_support;
|
||||
|
||||
use run_make_support::rustc;
|
||||
use run_make_support::{cwd, rustc};
|
||||
|
||||
fn main() {
|
||||
// With single codegen unit files are renamed to match the source file name
|
||||
@ -17,7 +17,7 @@ fn main() {
|
||||
.codegen_units(1)
|
||||
.json("artifacts")
|
||||
.error_format("json")
|
||||
.incremental(&std::env::current_dir().unwrap())
|
||||
.incremental(cwd())
|
||||
.run();
|
||||
let stderr = String::from_utf8_lossy(&output.stderr);
|
||||
for file in &["lib.o", "lib.ll", "lib.bc", "lib.s"] {
|
||||
@ -33,7 +33,7 @@ fn main() {
|
||||
.codegen_units(2)
|
||||
.json("artifacts")
|
||||
.error_format("json")
|
||||
.incremental(&std::env::current_dir().unwrap())
|
||||
.incremental(cwd())
|
||||
.run();
|
||||
let stderr = String::from_utf8_lossy(&output.stderr);
|
||||
for file in &["rcgu.o", "rcgu.ll", "rcgu.bc", "rcgu.s"] {
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ ignore-cross-compile
|
||||
|
||||
use run_make_support::{htmldocck, rustc, rustdoc};
|
||||
use run_make_support::{htmldocck, rustc, rustdoc, rust_lib_name};
|
||||
|
||||
fn main() {
|
||||
let out_dir = "rustdoc";
|
||||
@ -40,7 +40,7 @@ fn main() {
|
||||
.crate_name("ex")
|
||||
.crate_type("bin")
|
||||
.output(&out_dir)
|
||||
.extern_(crate_name, format!("lib{crate_name}.rlib"))
|
||||
.extern_(crate_name, rust_lib_name(crate_name))
|
||||
.extern_(proc_crate_name, dylib_name.trim())
|
||||
.arg("-Zunstable-options")
|
||||
.arg("--scrape-examples-output-path")
|
||||
|
Loading…
Reference in New Issue
Block a user