Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 8ec3d20

Browse files
committed
Fix test.regex test
1 parent aa2f407 commit 8ec3d20

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

build_system/tests.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
186186

187187
let mut build_cmd = runner.cargo_command(["build", "--example", "shootout-regex-dna", "--target", &runner.target_triple]);
188188
build_cmd.env("RUSTFLAGS", lint_rust_flags.clone());
189-
190189
spawn_and_wait(build_cmd);
191190

192191
if runner.host_triple == runner.target_triple {
@@ -233,11 +232,18 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
233232
runner.in_dir(["regex"], |runner| {
234233
runner.run_cargo(["clean"]);
235234

235+
// newer aho_corasick versions throw a deprecation warning
236+
let lint_rust_flags = format!("{} --cap-lints warn", runner.rust_flags);
237+
236238
if runner.host_triple == runner.target_triple {
237-
runner.run_cargo(["test", "--tests", "--", "--exclude-should-panic", "--test-threads", "1", "-Zunstable-options", "-q"]);
239+
let mut run_cmd = runner.cargo_command(["test", "--tests", "--", "--exclude-should-panic", "--test-threads", "1", "-Zunstable-options", "-q"]);
240+
run_cmd.env("RUSTFLAGS", lint_rust_flags);
241+
spawn_and_wait(run_cmd);
238242
} else {
239243
eprintln!("Cross-Compiling: Not running tests");
240-
runner.run_cargo(["build", "--tests", "--target", &runner.target_triple]);
244+
let mut build_cmd = runner.cargo_command(["build", "--tests", "--target", &runner.target_triple]);
245+
build_cmd.env("RUSTFLAGS", lint_rust_flags.clone());
246+
spawn_and_wait(build_cmd);
241247
}
242248
});
243249
}),

0 commit comments

Comments
 (0)