Skip to content

Commit 636be91

Browse files
committed
tests: update for renamed fs module in run_make_support
1 parent e1569fd commit 636be91

File tree

80 files changed

+225
-239
lines changed

Some content is hidden

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

80 files changed

+225
-239
lines changed

tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
use std::path::PathBuf;
77

8-
use run_make_support::{aux_build, fs_wrapper, rustc, source_root};
8+
use run_make_support::{aux_build, fs as rfs, rustc, source_root};
99

1010
fn main() {
1111
aux_build().input("stable.rs").emit("metadata").run();
1212

1313
let output =
1414
rustc().input("main.rs").emit("metadata").extern_("stable", "libstable.rmeta").run();
15-
let version = fs_wrapper::read_to_string(source_root().join("src/version"));
15+
let version = rfs::read_to_string(source_root().join("src/version"));
1616
let expected_string = format!("stable since {}", version.trim());
1717
output.assert_stderr_contains(expected_string);
1818
}

tests/run-make/c-link-to-rust-dylib/rmake.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
//@ ignore-cross-compile
55

6-
use run_make_support::{
7-
cc, cwd, dynamic_lib_extension, fs_wrapper, is_msvc, read_dir, run, run_fail, rustc,
8-
};
6+
use run_make_support::{cc, cwd, dynamic_lib_extension, fs as rfs, is_msvc, run, run_fail, rustc};
97

108
fn main() {
119
rustc().input("foo.rs").run();
@@ -21,14 +19,14 @@ fn main() {
2119
run("bar");
2220

2321
let expected_extension = dynamic_lib_extension();
24-
read_dir(cwd(), |path| {
22+
rfs::read_dir_entries(cwd(), |path| {
2523
if path.is_file()
2624
&& path.extension().is_some_and(|ext| ext == expected_extension)
2725
&& path.file_name().and_then(|name| name.to_str()).is_some_and(|name| {
2826
name.ends_with(".so") || name.ends_with(".dll") || name.ends_with(".dylib")
2927
})
3028
{
31-
fs_wrapper::remove_file(path);
29+
rfs::remove_file(path);
3230
}
3331
});
3432
run_fail("bar");

tests/run-make/c-link-to-rust-staticlib/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
//@ ignore-cross-compile
55

6-
use run_make_support::fs_wrapper::remove_file;
6+
use run_make_support::fs::remove_file;
77
use run_make_support::{cc, extra_c_flags, run, rustc, static_lib_name};
88
use std::fs;
99

tests/run-make/cdylib/rmake.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//@ ignore-cross-compile
1212

13-
use run_make_support::{cc, cwd, dynamic_lib_name, fs_wrapper, is_msvc, run, rustc};
13+
use run_make_support::{cc, cwd, dynamic_lib_name, fs as rfs, is_msvc, run, rustc};
1414

1515
fn main() {
1616
rustc().input("bar.rs").run();
@@ -23,7 +23,7 @@ fn main() {
2323
}
2424

2525
run("foo");
26-
fs_wrapper::remove_file(dynamic_lib_name("foo"));
26+
rfs::remove_file(dynamic_lib_name("foo"));
2727

2828
rustc().input("foo.rs").arg("-Clto").run();
2929
run("foo");

tests/run-make/comment-section/rmake.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99

1010
use std::path::PathBuf;
1111

12+
use run_make_support::fs as rfs;
1213
use run_make_support::llvm_readobj;
1314
use run_make_support::rustc;
14-
use run_make_support::{cwd, env_var, read_dir, run_in_tmpdir};
15+
use run_make_support::{cwd, env_var, run_in_tmpdir};
1516

1617
fn main() {
1718
let target = env_var("TARGET");
@@ -33,7 +34,7 @@ fn main() {
3334

3435
// Check all object files (including temporary outputs) have a `.comment`
3536
// section with the expected content.
36-
read_dir(cwd(), |f| {
37+
rfs::read_dir_entries(cwd(), |f| {
3738
if !f.extension().is_some_and(|ext| ext == "o") {
3839
return;
3940
}

tests/run-make/compiler-builtins/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#![deny(warnings)]
1616

17-
use run_make_support::fs_wrapper::{read, read_dir};
17+
use run_make_support::fs::{read, read_dir};
1818
use run_make_support::object::read::archive::ArchiveFile;
1919
use run_make_support::object::read::Object;
2020
use run_make_support::object::ObjectSection;

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
//@ ignore-wasm64
1010
// Reason: a C compiler is required for build_native_static_lib
1111

12-
use run_make_support::{build_native_static_lib, fs_wrapper, rustc, static_lib_name};
12+
use run_make_support::{build_native_static_lib, fs as rfs, rustc, static_lib_name};
1313

1414
fn main() {
1515
build_native_static_lib("native");
1616
let lib_native = static_lib_name("native");
17-
fs_wrapper::create_dir_all("crate");
18-
fs_wrapper::create_dir_all("native");
19-
fs_wrapper::rename(&lib_native, format!("native/{}", &lib_native));
17+
rfs::create_dir_all("crate");
18+
rfs::create_dir_all("native");
19+
rfs::rename(&lib_native, format!("native/{}", &lib_native));
2020
rustc().input("a.rs").run();
21-
fs_wrapper::rename("liba.rlib", "crate/liba.rlib");
21+
rfs::rename("liba.rlib", "crate/liba.rlib");
2222
rustc().input("b.rs").specific_library_search_path("native", "crate").run_fail();
2323
rustc().input("b.rs").specific_library_search_path("dependency", "crate").run_fail();
2424
rustc().input("b.rs").specific_library_search_path("crate", "crate").run();
@@ -35,8 +35,8 @@ fn main() {
3535
rustc().input("d.rs").specific_library_search_path("all", "native").run();
3636

3737
// Deduplication tests.
38-
fs_wrapper::create_dir_all("e1");
39-
fs_wrapper::create_dir_all("e2");
38+
rfs::create_dir_all("e1");
39+
rfs::create_dir_all("e2");
4040

4141
rustc().input("e.rs").output("e1/libe.rlib").run();
4242
rustc().input("e.rs").output("e2/libe.rlib").run();

tests/run-make/const-prop-lint/rmake.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Tests that const prop lints interrupting codegen don't leave `.o` files around.
22

3-
use run_make_support::{cwd, fs_wrapper, rustc};
3+
use run_make_support::{cwd, fs as rfs, rustc};
44

55
fn main() {
66
rustc().input("input.rs").run_fail().assert_exit_code(1);
77

8-
for entry in fs_wrapper::read_dir(cwd()) {
8+
for entry in rfs::read_dir(cwd()) {
99
let entry = entry.unwrap();
1010
let path = entry.path();
1111

tests/run-make/crate-name-priority/rmake.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
// and the compiler flags, and checks that the flag is favoured each time.
55
// See https://github.com/rust-lang/rust/pull/15518
66

7-
use run_make_support::{bin_name, fs_wrapper, rustc};
7+
use run_make_support::{bin_name, fs as rfs, rustc};
88

99
fn main() {
1010
rustc().input("foo.rs").run();
11-
fs_wrapper::remove_file(bin_name("foo"));
11+
rfs::remove_file(bin_name("foo"));
1212
rustc().input("foo.rs").crate_name("bar").run();
13-
fs_wrapper::remove_file(bin_name("bar"));
13+
rfs::remove_file(bin_name("bar"));
1414
rustc().input("foo1.rs").run();
15-
fs_wrapper::remove_file(bin_name("foo"));
15+
rfs::remove_file(bin_name("foo"));
1616
rustc().input("foo1.rs").output(bin_name("bar1")).run();
17-
fs_wrapper::remove_file(bin_name("bar1"));
17+
rfs::remove_file(bin_name("bar1"));
1818
}

tests/run-make/doctests-keep-binaries/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Check that valid binaries are persisted by running them, regardless of whether the
22
// --run or --no-run option is used.
33

4-
use run_make_support::fs_wrapper::{create_dir, remove_dir_all};
4+
use run_make_support::fs::{create_dir, remove_dir_all};
55
use run_make_support::{run, rustc, rustdoc};
66
use std::path::Path;
77

0 commit comments

Comments
 (0)