From d4504e6f53895e9f0125b560d0e01e697e96ac2e Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Thu, 18 Jun 2020 15:12:07 -0600 Subject: system tests: new rm, build tests - rm: confirm 'rm' and 'rm -f' on running container - build: shotgun test of workdir, cmd, env, labels The new build test cd's to a temporary directory, which broke test invocations using a relative path (./bin/podman). Added code to detect relative paths and convert them to absolute. Signed-off-by: Ed Santiago --- test/system/helpers.bash | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/system/helpers.bash') diff --git a/test/system/helpers.bash b/test/system/helpers.bash index 7ec2105d1..7e6f1c1ca 100644 --- a/test/system/helpers.bash +++ b/test/system/helpers.bash @@ -2,6 +2,12 @@ # Podman command to run; may be podman-remote PODMAN=${PODMAN:-podman} +# If it's a relative path, convert to absolute; otherwise tests can't cd out +if [[ "$PODMAN" =~ / ]]; then + if [[ ! "$PODMAN" =~ ^/ ]]; then + PODMAN=$(realpath $PODMAN) + fi +fi # Standard image to use for most tests PODMAN_TEST_IMAGE_REGISTRY=${PODMAN_TEST_IMAGE_REGISTRY:-"quay.io"} -- cgit v1.2.3-54-g00ecf