Skip to content

Commit 77232fb

Browse files
committed
Fix normalization in linker-warning
Ensure rustc_codegen_cranelift doesn't get normalized to rustc. And handle -Cpanic=abort.
1 parent 99b18d6 commit 77232fb

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,6 @@ rm tests/ui/process/process-panic-after-fork.rs # same
151151
cp ../dist/bin/rustdoc-clif ../dist/bin/rustdoc # some tests expect bin/rustdoc to exist
152152

153153
cat <<EOF | git apply -
154-
diff --git a/tests/run-make/linker-warning/rmake.rs b/tests/run-make/linker-warning/rmake.rs
155-
index 30387af428c..f7895b12961 100644
156-
--- a/tests/run-make/linker-warning/rmake.rs
157-
+++ b/tests/run-make/linker-warning/rmake.rs
158-
@@ -57,7 +57,8 @@ fn main() {
159-
.actual_text("(linker error)", out.stderr())
160-
- .normalize(r#"/rustc[^/]*/"#, "/rustc/")
161-
+ .normalize(r#"/tmp/rustc[^/]*/"#, "/tmp/rustc/")
162-
+ .normalize("libpanic_abort", "libpanic_unwind")
163-
.normalize(
164-
regex::escape(run_make_support::build_root().to_str().unwrap()),
165-
"/build-root",
166-
)
167-
.normalize(r#""[^"]*\/symbols.o""#, "\\"/symbols.o\\"")
168154
diff --git a/src/tools/compiletest/src/runtest/run_make.rs b/src/tools/compiletest/src/runtest/run_make.rs
169155
index 073116933bd..c3e4578204d 100644
170156
--- a/src/tools/compiletest/src/runtest/run_make.rs

tests/run-make/linker-warning/rmake.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ fn main() {
5757
diff()
5858
.expected_file("short-error.txt")
5959
.actual_text("(linker error)", out.stderr())
60-
.normalize(r#"/rustc[^/]*/"#, "/rustc/")
60+
.normalize(r#"/rustc[^/_-]*/"#, "/rustc/")
61+
.normalize("libpanic_abort", "libpanic_unwind")
6162
.normalize(
6263
regex::escape(run_make_support::build_root().to_str().unwrap()),
6364
"/build-root",

0 commit comments

Comments
 (0)