diff options
author | Ed Santiago <santiago@redhat.com> | 2021-01-12 11:46:23 -0700 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2021-01-13 10:14:10 -0700 |
commit | 34304df2815762fcdc29d7b09685e5122cbe0b3b (patch) | |
tree | 7a7d623bb662eff9bf0402b896273d437acf6c78 | |
parent | 9473dda87c10513527bb083719d642d493b6b356 (diff) | |
download | podman-34304df2815762fcdc29d7b09685e5122cbe0b3b.tar.gz podman-34304df2815762fcdc29d7b09685e5122cbe0b3b.tar.bz2 podman-34304df2815762fcdc29d7b09685e5122cbe0b3b.zip |
CI: fix broken diagnostic message for -dev check
There's a CI check for the presence of "-dev" in podman-info output
(it should not appear). This test is unlikely to fail, but if it
ever does, the diagnostic output is unhelpful. This makes it helpful.
Tested via:
$ ln -s /bin/echo ~/bin/msg
$ ln -s /bin/echo ~/bin/die
$ TEST_FLAVOR=release ./contrib/cirrus/runner.sh
...
Releases must never contain '-dev' in output of 'podman info' ( buildahVersion: 1.19.0-dev
Version: 3.0.0-dev)
Signed-off-by: Ed Santiago <santiago@redhat.com>
-rwxr-xr-x | contrib/cirrus/runner.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index 2f909876a..b0060163e 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -203,16 +203,18 @@ function _run_altbuild() { function _run_release() { # TODO: These tests should come from code external to the podman repo. - # to allow test-changes (and re-runs) in the case of a correctible test + # to allow test-changes (and re-runs) in the case of a correctable test # flaw or flake at release tag-push time. For now, the test is here - # given it's simplicity. + # given its simplicity. + msg "podman info:" + bin/podman info msg "Checking podman release (or potential release) criteria." - info_output=$(bin/podman info 2>&1) - if grep -q -- '-dev'<<<"$info_output"; then - die "Releases must never contain '-dev' in output of 'podman info': -$info_output" + dev=$(bin/podman info |& grep -- -dev) + if [[ -n "$dev" ]]; then + die "Releases must never contain '-dev' in output of 'podman info' ($dev)" fi + msg "All OK" } logformatter() { |