From bcd001aba593a6f55585e93289ebadd7c623c6f4 Mon Sep 17 00:00:00 2001 From: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com> Date: Sat, 7 Dec 2024 17:26:36 -0500 Subject: [PATCH] Remove more kinds of `cargo` output related to blocking on file locks. (#1025) Encountered a new `cargo` output line while streaming with @orhun: > Blocking waiting for file lock on build directory Let's eliminate it from our snapshots, since it isn't relevant to what we're testing. --- src/snapshot_tests.rs | 2 +- tests/integration_snapshots.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/snapshot_tests.rs b/src/snapshot_tests.rs index e2a5106b..25a5f370 100644 --- a/src/snapshot_tests.rs +++ b/src/snapshot_tests.rs @@ -171,7 +171,7 @@ fn assert_integration_test(test_name: &str, invocation: &[&str]) { settings.add_filter(®ex::escape(&repo_root.to_string_lossy()), "[ROOT]"); // Remove cargo blocking lines (e.g. from `cargo doc` output) as the amount of blocks // is not reproducible. - settings.add_filter(" Blocking waiting for file lock on package cache\n", ""); + settings.add_filter(" Blocking waiting for file lock on [^\n]+\n", ""); // Filter out the current `cargo-semver-checks` version in links to lint references, // as this will break across version changes. settings.add_filter( diff --git a/tests/integration_snapshots.rs b/tests/integration_snapshots.rs index 6c00e646..e482100a 100644 --- a/tests/integration_snapshots.rs +++ b/tests/integration_snapshots.rs @@ -175,7 +175,7 @@ fn set_snapshot_filters(settings: &mut insta::Settings) { settings.add_filter(®ex::escape(&repo_root.to_string_lossy()), "[ROOT]"); // Remove cargo blocking lines (e.g. from `cargo doc` output) as the amount of blocks // is not reproducible. - settings.add_filter(" Blocking waiting for file lock on package cache\n", ""); + settings.add_filter(" Blocking waiting for file lock on [^\n]+\n", ""); // Filter out the current `cargo-semver-checks` version in links to lint references, // as this will break across version changes. settings.add_filter(