From 82e701a8ee67fb4a9e2954add4f5b32adde3bd62 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 5 Mar 2024 05:46:34 -0700 Subject: [PATCH] logformatter: strip "--url xxx" from bats podman-remote ...it's useless clutter. Signed-off-by: Ed Santiago --- contrib/cirrus/logformatter | 7 ++++--- contrib/cirrus/logformatter.t | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/cirrus/logformatter b/contrib/cirrus/logformatter index 78ac1850d7..901242f62c 100755 --- a/contrib/cirrus/logformatter +++ b/contrib/cirrus/logformatter @@ -426,9 +426,10 @@ END_HTML } # Readability: /long/path/to/podman -> podman (hover for full path) - # Also make it boldface, to make commands stand out - $line =~ s{^(#\s+(#|\$)\s+)(\S+/)(podman\S*)(\s.*)} - {$1$4$5}; + # Also make it boldface, to make commands stand out, and strip --url + # 1 2 2 13 345 56 6 47 7 + $line =~ s{^(#\s+(#|\$)\s+)(\S+/)((podman\S*)(\s+--url\s+\S+)?)(\s.*)} + {$1$5$7}; if ($line =~ /^ok\s.*\s# skip/) { $css = 'skipped' } elsif ($line =~ /^ok\s/) { $css = 'passed' } diff --git a/contrib/cirrus/logformatter.t b/contrib/cirrus/logformatter.t index 0387b8bf48..ed6b962137 100755 --- a/contrib/cirrus/logformatter.t +++ b/contrib/cirrus/logformatter.t @@ -96,6 +96,7 @@ not ok 3 fail # (from function `assert' in file ./helpers.bash, line 343, # from function `expect_output' in file ./helpers.bash, line 370, # in test file ./run.bats, line 786) +# $ /path/to/podman-remote --url /this/should/be-stripped blah blah # $ /path/to/podman foo -bar # time="2023-01-05T15:15:20Z" level=debug msg="this is debug" # time="2023-01-05T15:15:20Z" level=warning msg="this is warning" @@ -109,6 +110,7 @@ ok 4 blah # (from function `assert' in file ./helpers.bash, line 343, # from function `expect_output' in file ./helpers.bash, line 370, # in test file ./run.bats, line 786) +# $ podman-remote blah blah # $ podman foo -bar # time="2023-01-05T15:15:20Z" level=debug msg="this is debug" # time="2023-01-05T15:15:20Z" level=warning msg="this is warning"