diff options
| author | Afonso Bordado <afonsobordado@az8.co> | 2022-07-30 16:35:35 +0100 |
|---|---|---|
| committer | Afonso Bordado <afonsobordado@az8.co> | 2022-07-30 20:02:28 +0100 |
| commit | 8ec3d20882f434b9cdbca5c8ed4f3630883b32aa (patch) | |
| tree | c6984192724b69f12482f55fd734638ed46708e2 | |
| parent | aa2f4072f60c5c129a5597cc59ad908aa502868e (diff) | |
| download | rust-8ec3d20882f434b9cdbca5c8ed4f3630883b32aa.tar.gz rust-8ec3d20882f434b9cdbca5c8ed4f3630883b32aa.zip | |
Fix test.regex test
| -rw-r--r-- | build_system/tests.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/build_system/tests.rs b/build_system/tests.rs index 20d600effd3..22c8c8a4605 100644 --- a/build_system/tests.rs +++ b/build_system/tests.rs @@ -186,7 +186,6 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[ let mut build_cmd = runner.cargo_command(["build", "--example", "shootout-regex-dna", "--target", &runner.target_triple]); build_cmd.env("RUSTFLAGS", lint_rust_flags.clone()); - spawn_and_wait(build_cmd); if runner.host_triple == runner.target_triple { @@ -233,11 +232,18 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[ runner.in_dir(["regex"], |runner| { runner.run_cargo(["clean"]); + // newer aho_corasick versions throw a deprecation warning + let lint_rust_flags = format!("{} --cap-lints warn", runner.rust_flags); + if runner.host_triple == runner.target_triple { - runner.run_cargo(["test", "--tests", "--", "--exclude-should-panic", "--test-threads", "1", "-Zunstable-options", "-q"]); + let mut run_cmd = runner.cargo_command(["test", "--tests", "--", "--exclude-should-panic", "--test-threads", "1", "-Zunstable-options", "-q"]); + run_cmd.env("RUSTFLAGS", lint_rust_flags); + spawn_and_wait(run_cmd); } else { eprintln!("Cross-Compiling: Not running tests"); - runner.run_cargo(["build", "--tests", "--target", &runner.target_triple]); + let mut build_cmd = runner.cargo_command(["build", "--tests", "--target", &runner.target_triple]); + build_cmd.env("RUSTFLAGS", lint_rust_flags.clone()); + spawn_and_wait(build_cmd); } }); }), |
