diff options
author | Ed Santiago <santiago@redhat.com> | 2020-06-23 06:06:48 -0600 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-08-11 15:10:51 +0200 |
commit | 3f2cab86433859a1facf1996ad68dac23c9899b9 (patch) | |
tree | 394020b1a48f76cd283e450d6952cf08a4f53dde /contrib | |
parent | ca00601b14f2253e5b9f89280d39c5d498efc9f3 (diff) | |
download | podman-3f2cab86433859a1facf1996ad68dac23c9899b9.tar.gz podman-3f2cab86433859a1facf1996ad68dac23c9899b9.tar.bz2 podman-3f2cab86433859a1facf1996ad68dac23c9899b9.zip |
system tests: invoke with abs path to podman
Reversion of one part of #6679: my handling of 'realpath'
would not work when $PODMAN is 'podman-remote --url etc'.
Trying to handle that case got unmaintainable; so instead
let's just force 'make {local,remote}system' to invoke
with a full PODMAN path. This breaks down if someone
runs the tests with a manual 'bats' invocation, but I
think I'm the only one who ever does that.
Since podman path will now be very long in the logs,
add code to logformatter to abbreviate it like we do
for the ginkgo logs.
And, one thing that has bugged me for a long time:
in the error logs, show a different prompt ('#' vs '$')
to distinguish root vs rootless. This should make it
much easier to see at-a-glance whether a log file
is root or not. Add tests for it.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/cirrus/logformatter | 4 | ||||
-rwxr-xr-x | contrib/cirrus/logformatter.t | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/contrib/cirrus/logformatter b/contrib/cirrus/logformatter index 4bfe7b97f..60c1e5985 100755 --- a/contrib/cirrus/logformatter +++ b/contrib/cirrus/logformatter @@ -231,6 +231,10 @@ END_HTML if ($looks_like_bats) { my $css; + # Readability: /long/path/to/podman -> podman (hover for full path) + $line =~ s{^(#\s+(#|\$)\s+)(\S+/)(podman\S*)\s} + {$1<span title="$3$4">$4</span> }; + if ($line =~ /^ok\s.*\s# skip/) { $css = 'skipped' } elsif ($line =~ /^ok\s/) { $css = 'passed' } elsif ($line =~ /^not\s+ok\s/) { $css = 'failed' } diff --git a/contrib/cirrus/logformatter.t b/contrib/cirrus/logformatter.t index 79c4563c2..d2193cc6c 100755 --- a/contrib/cirrus/logformatter.t +++ b/contrib/cirrus/logformatter.t @@ -88,12 +88,16 @@ __END__ ok 1 hi ok 2 bye # skip no reason not ok 3 fail +# $ /path/to/podman foo -bar +# #| FAIL: exit code is 123; expected 321 ok 4 blah >>> 1..4 <span class='bats-passed'><a name='t--00001'>ok 1 hi</a></span> <span class='bats-skipped'><a name='t--00002'>ok 2 bye # skip no reason</a></span> <span class='bats-failed'><a name='t--00003'>not ok 3 fail</a></span> +<span class='bats-log'># $ <span title="/path/to/podman">podman</span> foo -bar</span> +<span class='bats-log-esm'># #| FAIL: exit code is 123; expected 321</span> <span class='bats-passed'><a name='t--00004'>ok 4 blah</a></span> <hr/><span class='bats-summary'>Summary: <span class='bats-passed'>2 Passed</span>, <span class='bats-failed'>1 Failed</span>, <span class='bats-skipped'>1 Skipped</span>. Total tests: 4</span> |