aboutsummaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-23 15:31:02 -0400
committerGitHub <noreply@github.com>2020-06-23 15:31:02 -0400
commit0d961a40ba40b3fbd69090c49ee3cec7151f8a8e (patch)
treecf726cb2aa427d330f568977987f55810f1f49ab /test/system
parentaa6881dd1474506610a85926f58893efe67eb98d (diff)
parentaa16a0aab1576cc8ea21d7407ff64b597e79f10c (diff)
downloadpodman-0d961a40ba40b3fbd69090c49ee3cec7151f8a8e.tar.gz
podman-0d961a40ba40b3fbd69090c49ee3cec7151f8a8e.tar.bz2
podman-0d961a40ba40b3fbd69090c49ee3cec7151f8a8e.zip
Merge pull request #6726 from edsantiago/bats
system tests: invoke with abs path to podman
Diffstat (limited to 'test/system')
-rw-r--r--test/system/helpers.bash14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index 7e6f1c1ca..5301644d6 100644
--- a/test/system/helpers.bash
+++ b/test/system/helpers.bash
@@ -2,12 +2,6 @@
# 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"}
@@ -22,6 +16,12 @@ IMAGE=$PODMAN_TEST_IMAGE_FQN
# Default timeout for a podman command.
PODMAN_TIMEOUT=${PODMAN_TIMEOUT:-60}
+# Prompt to display when logging podman commands; distinguish root/rootless
+_LOG_PROMPT='$'
+if [ $(id -u) -eq 0 ]; then
+ _LOG_PROMPT='#'
+fi
+
###############################################################################
# BEGIN setup/teardown tools
@@ -138,7 +138,7 @@ function run_podman() {
esac
# stdout is only emitted upon error; this echo is to help a debugger
- echo "\$ $PODMAN $*"
+ echo "$_LOG_PROMPT $PODMAN $*"
# BATS hangs if a subprocess remains and keeps FD 3 open; this happens
# if podman crashes unexpectedly without cleaning up subprocesses.
run timeout --foreground -v --kill=10 $PODMAN_TIMEOUT $PODMAN "$@" 3>/dev/null