Skip to content

Commit 9e7c646

Browse files
committed
Merge branch 'staging'
2 parents aea3bd6 + b88e129 commit 9e7c646

File tree

2 files changed

+8
-32
lines changed

2 files changed

+8
-32
lines changed

build_system/tests.rs

+6-30
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@ const BASE_SYSROOT_SUITE: &[TestCase] = &[
9494
TestCase::build_bin_and_run("aot.issue-72793", "example/issue-72793.rs", &[]),
9595
];
9696

97+
// FIXME(rust-random/rand#1293): Newer rand versions fail to test on Windows. Update once this is
98+
// fixed.
9799
pub(crate) static RAND_REPO: GitRepo =
98-
GitRepo::github("rust-random", "rand", "0f933f9c7176e53b2a3c7952ded484e1783f0bf1", "rand");
100+
GitRepo::github("rust-random", "rand", "50b9a447410860af8d6db9a208c3576886955874", "rand");
99101

100102
pub(crate) static RAND: CargoProject = CargoProject::new(&RAND_REPO.source_dir(), "rand");
101103

102104
pub(crate) static REGEX_REPO: GitRepo =
103-
GitRepo::github("rust-lang", "regex", "341f207c1071f7290e3f228c710817c280c8dca1", "regex");
105+
GitRepo::github("rust-lang", "regex", "a9b2e02352db92ce1f6e5b7ecd41b8bbffbe161a", "regex");
104106

105107
pub(crate) static REGEX: CargoProject = CargoProject::new(&REGEX_REPO.source_dir(), "regex");
106108

@@ -123,12 +125,11 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
123125
RAND.clean(&runner.dirs);
124126

125127
if runner.is_native {
126-
eprintln!("[TEST] rust-random/rand");
127128
let mut test_cmd = RAND.test(&runner.target_compiler, &runner.dirs);
128129
test_cmd.arg("--workspace").arg("--").arg("-q");
129130
spawn_and_wait(test_cmd);
130131
} else {
131-
eprintln!("[AOT] rust-random/rand");
132+
eprintln!("Cross-Compiling: Not running tests");
132133
let mut build_cmd = RAND.build(&runner.target_compiler, &runner.dirs);
133134
build_cmd.arg("--workspace").arg("--tests");
134135
spawn_and_wait(build_cmd);
@@ -151,18 +152,13 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
151152
TestCase::custom("test.regex-shootout-regex-dna", &|runner| {
152153
REGEX.clean(&runner.dirs);
153154

154-
// newer aho_corasick versions throw a deprecation warning
155-
let lint_rust_flags = format!("{} --cap-lints warn", runner.target_compiler.rustflags);
156-
157155
let mut build_cmd = REGEX.build(&runner.target_compiler, &runner.dirs);
158156
build_cmd.arg("--example").arg("shootout-regex-dna");
159-
build_cmd.env("RUSTFLAGS", lint_rust_flags.clone());
160157
spawn_and_wait(build_cmd);
161158

162159
if runner.is_native {
163160
let mut run_cmd = REGEX.run(&runner.target_compiler, &runner.dirs);
164161
run_cmd.arg("--example").arg("shootout-regex-dna");
165-
run_cmd.env("RUSTFLAGS", lint_rust_flags);
166162

167163
let input = fs::read_to_string(
168164
REGEX.source_dir(&runner.dirs).join("examples").join("regexdna-input.txt"),
@@ -174,13 +170,6 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
174170
.unwrap();
175171

176172
let output = spawn_and_wait_with_input(run_cmd, input);
177-
// Make sure `[codegen mono items] start` doesn't poison the diff
178-
let output = output
179-
.lines()
180-
.filter(|line| !line.contains("codegen mono items"))
181-
.chain(Some("")) // This just adds the trailing newline
182-
.collect::<Vec<&str>>()
183-
.join("\r\n");
184173

185174
let output_matches = expected.lines().eq(output.lines());
186175
if !output_matches {
@@ -195,27 +184,14 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
195184
TestCase::custom("test.regex", &|runner| {
196185
REGEX.clean(&runner.dirs);
197186

198-
// newer aho_corasick versions throw a deprecation warning
199-
let lint_rust_flags = format!("{} --cap-lints warn", runner.target_compiler.rustflags);
200-
201187
if runner.is_native {
202188
let mut run_cmd = REGEX.test(&runner.target_compiler, &runner.dirs);
203-
run_cmd.args([
204-
"--tests",
205-
"--",
206-
"--exclude-should-panic",
207-
"--test-threads",
208-
"1",
209-
"-Zunstable-options",
210-
"-q",
211-
]);
212-
run_cmd.env("RUSTFLAGS", lint_rust_flags);
189+
run_cmd.args(["--workspace", "--", "-q"]);
213190
spawn_and_wait(run_cmd);
214191
} else {
215192
eprintln!("Cross-Compiling: Not running tests");
216193
let mut build_cmd = REGEX.build(&runner.target_compiler, &runner.dirs);
217194
build_cmd.arg("--tests");
218-
build_cmd.env("RUSTFLAGS", lint_rust_flags.clone());
219195
spawn_and_wait(build_cmd);
220196
}
221197
}),

patches/0003-rand-Disable-rand-tests-on-mingw.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ index 217899e..9cedeb7 100644
1919
+ // This is broken on x86_64-pc-windows-gnu presumably due to a broken powf implementation
2020
+ #[cfg_attr(all(target_os = "windows", target_env = "gnu"), ignore)]
2121
fn value_stability() {
22-
fn test_samples<F: Float + core::fmt::Debug, D: Distribution<F>>(
23-
distr: D, zero: F, expected: &[F],
22+
fn test_samples<F: Float + Debug + Display + LowerExp, D: Distribution<F>>(
23+
distr: D, thresh: F, expected: &[F],
2424
diff --git a/rand_distr/tests/value_stability.rs b/rand_distr/tests/value_stability.rs
2525
index 192ba74..0101ace 100644
2626
--- a/rand_distr/tests/value_stability.rs

0 commit comments

Comments
 (0)