diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-06-24 09:00:20 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-06-24 09:06:47 +0000 |
| commit | 77232fb9350dbe09821df27f184301475829f1e4 (patch) | |
| tree | e396959e6ef1e19b8035ced8b258b235187e3258 | |
| parent | 99b18d6c5062449db8e7ccded4cb69b555a239c3 (diff) | |
| download | rust-77232fb9350dbe09821df27f184301475829f1e4.tar.gz rust-77232fb9350dbe09821df27f184301475829f1e4.zip | |
Fix normalization in linker-warning
Ensure rustc_codegen_cranelift doesn't get normalized to rustc. And handle -Cpanic=abort.
| -rwxr-xr-x | compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh | 14 | ||||
| -rw-r--r-- | tests/run-make/linker-warning/rmake.rs | 3 |
2 files changed, 2 insertions, 15 deletions
diff --git a/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh b/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh index 32c71f433b0..7e356b4b462 100755 --- a/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh +++ b/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh @@ -151,20 +151,6 @@ rm tests/ui/process/process-panic-after-fork.rs # same cp ../dist/bin/rustdoc-clif ../dist/bin/rustdoc # some tests expect bin/rustdoc to exist cat <<EOF | git apply - -diff --git a/tests/run-make/linker-warning/rmake.rs b/tests/run-make/linker-warning/rmake.rs -index 30387af428c..f7895b12961 100644 ---- a/tests/run-make/linker-warning/rmake.rs -+++ b/tests/run-make/linker-warning/rmake.rs -@@ -57,7 +57,8 @@ fn main() { - .actual_text("(linker error)", out.stderr()) -- .normalize(r#"/rustc[^/]*/"#, "/rustc/") -+ .normalize(r#"/tmp/rustc[^/]*/"#, "/tmp/rustc/") -+ .normalize("libpanic_abort", "libpanic_unwind") - .normalize( - regex::escape(run_make_support::build_root().to_str().unwrap()), - "/build-root", - ) - .normalize(r#""[^"]*\/symbols.o""#, "\\"/symbols.o\\"") diff --git a/src/tools/compiletest/src/runtest/run_make.rs b/src/tools/compiletest/src/runtest/run_make.rs index 073116933bd..c3e4578204d 100644 --- a/src/tools/compiletest/src/runtest/run_make.rs diff --git a/tests/run-make/linker-warning/rmake.rs b/tests/run-make/linker-warning/rmake.rs index 344b880faab..26d03fd2d70 100644 --- a/tests/run-make/linker-warning/rmake.rs +++ b/tests/run-make/linker-warning/rmake.rs @@ -57,7 +57,8 @@ fn main() { diff() .expected_file("short-error.txt") .actual_text("(linker error)", out.stderr()) - .normalize(r#"/rustc[^/]*/"#, "/rustc/") + .normalize(r#"/rustc[^/_-]*/"#, "/rustc/") + .normalize("libpanic_abort", "libpanic_unwind") .normalize( regex::escape(run_make_support::build_root().to_str().unwrap()), "/build-root", |
