From 5e1d6b7d76591580114504d248fadc193ec71939 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 26 Sep 2023 08:39:22 +0200 Subject: [PATCH] fix 'cargo test' --- tests/integration.rs | 7 +++++-- .../basic-fail/tests/actual_tests/rustc_ice.rs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index a39a15ee..2c7b63af 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -56,8 +56,11 @@ fn main() -> Result<()> { .stdout_filters .insert(0, (Match::Exact(b"\\\\".to_vec()), b"\\")); config.stdout_filter(r#"(panic.*)\.rs:[0-9]+:[0-9]+"#, "$1.rs"); - config.filter("(\\+)? +[0-9]+: .*\n", ""); - config.filter("(\\+)? +at /.*\n", ""); + // We don't want to normalize lines starting with `+`, those are diffs of the inner ui_test + // and normalizing these here doesn't make the "actual output differed from expected" go + // away, it just makes it impossible to diagnose. + config.filter(" +[0-9]+: .*\n", ""); + config.filter(" +at \\.?/.*\n", ""); config.filter(" running on .*", ""); config.stdout_filter("/target/[^/]+/[^/]+/debug", "/target/$$TMP/$$TRIPLE/debug"); config.stdout_filter("/target/.tmp[^/ \"]+", "/target/$$TMP"); diff --git a/tests/integrations/basic-fail/tests/actual_tests/rustc_ice.rs b/tests/integrations/basic-fail/tests/actual_tests/rustc_ice.rs index 576192e7..ac29508d 100644 --- a/tests/integrations/basic-fail/tests/actual_tests/rustc_ice.rs +++ b/tests/integrations/basic-fail/tests/actual_tests/rustc_ice.rs @@ -1,7 +1,7 @@ //@compile-flags: -Ztreat-err-as-bug //@rustc-env: RUSTC_BOOTSTRAP=1 //@normalize-stderr-test: " +[0-9]+: .*\n" -> "" -//@normalize-stderr-test: " +at /.*\n" -> "" +//@normalize-stderr-test: " +at \.?/.*\n" -> "" //@normalize-stderr-test: " running on .*" -> "" //@normalize-stderr-test: "note: rustc 1\..*" -> "" use basic_fail::add;