From dfb3e5edc4813870feb3cd47615cc9eadadddee1 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sun, 12 Sep 2021 19:17:33 +0200 Subject: [PATCH] tests: Work around podman run ignoring exit code 125 meson commonly exits with code 125, but `podman run` silently ignores that particular value. Rewrite all non-successful error codes to 1 to work around this. This has hidden failing builds for a while already. See https://github.com/containers/podman/issues/11540 --- tests/run-alpine | 2 ++ tests/run-apt | 3 +++ tests/run-dnf | 4 ++++ tests/run-nix | 3 +++ 4 files changed, 12 insertions(+) diff --git a/tests/run-alpine b/tests/run-alpine index 675004d5..025a84be 100755 --- a/tests/run-alpine +++ b/tests/run-alpine @@ -11,6 +11,8 @@ else fi $RUNC run --interactive ${OPTS:-} --volume `pwd`:/source:ro ${1:-docker.io/alpine} /bin/sh < /etc/apt/apt.conf.d/90nolanguages diff --git a/tests/run-dnf b/tests/run-dnf index e242883b..1dfebe8e 100755 --- a/tests/run-dnf +++ b/tests/run-dnf @@ -12,6 +12,10 @@ fi $RUNC run --interactive ${RUNC_OPTIONS:-} ${OPTS:-} --volume `pwd`:/source:ro ${1:-registry.fedoraproject.org/fedora} /bin/sh << EOF set -eu + +# avoid meson exit code 125; https://github.com/containers/podman/issues/11540 +trap '[ \$? -eq 0 ] || exit 1' EXIT + dnf -y update if grep -q ID=.*centos /etc/os-release; then diff --git a/tests/run-nix b/tests/run-nix index ddc3cddf..8de9cc40 100755 --- a/tests/run-nix +++ b/tests/run-nix @@ -9,6 +9,9 @@ fi # sandboxing requires privileged container; https://github.com/NixOS/docker#limitations $RUNC run --interactive ${DEBUG:+--tty} --privileged --volume `pwd`:/source:ro ${1:-docker.io/nixos/nix} /bin/sh < /tmp/default.nix