summaryrefslogtreecommitdiff
path: root/contrib/python/podman/test/test_runner.sh
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2018-07-27 15:09:07 -0700
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-05 11:06:18 +0000
commit47620961fe8eb9ec859b33bd0480a698e655af69 (patch)
treebf16c8cbed80701c54971a2b420066607c973536 /contrib/python/podman/test/test_runner.sh
parenta1e3e542fff562d885354c55f04e0b7f5097a39b (diff)
downloadpodman-47620961fe8eb9ec859b33bd0480a698e655af69.tar.gz
podman-47620961fe8eb9ec859b33bd0480a698e655af69.tar.bz2
podman-47620961fe8eb9ec859b33bd0480a698e655af69.zip
Port to MacOS
* Refactor Tunnel to support selecting port for remote sshd * Refactor ssh tunnel to support MacOS version of ssh * Refactor Tunnel.close() to find and kill off zombie siblings * Add psutil dependency * Add logging setup, letting library produce debugging records * Clean up Tunnel API * Fix test_runner.sh to propagate returncode to caller Signed-off-by: Jhon Honce <jhonce@redhat.com> Closes: #1199 Approved by: rhatdan
Diffstat (limited to 'contrib/python/podman/test/test_runner.sh')
-rwxr-xr-xcontrib/python/podman/test/test_runner.sh25
1 files changed, 16 insertions, 9 deletions
diff --git a/contrib/python/podman/test/test_runner.sh b/contrib/python/podman/test/test_runner.sh
index b3d2ba15b..4771709ff 100755
--- a/contrib/python/podman/test/test_runner.sh
+++ b/contrib/python/podman/test/test_runner.sh
@@ -19,9 +19,9 @@ function usage {
while getopts "vh" arg; do
case $arg in
- v ) VERBOSE='-v' ;;
- h ) usage ; exit 0;;
- \? ) usage ; exit 2;;
+ v ) VERBOSE='-v'; export LOG_LEVEL=debug ;;
+ h ) usage ; exit 0 ;;
+ \? ) usage ; exit 2 ;;
esac
done
shift $((OPTIND -1))
@@ -113,29 +113,36 @@ PODMAN_ARGS="--storage-driver=vfs \
--cni-config-dir=$CNI_CONFIG_PATH \
"
if [[ -n $VERBOSE ]]; then
- PODMAN_ARGS="$PODMAN_ARGS --log-level=debug"
+ PODMAN_ARGS="$PODMAN_ARGS --log-level=$LOG_LEVEL"
fi
PODMAN="podman $PODMAN_ARGS"
-# document what we're about to do...
-$PODMAN --version
+# Run podman in background without systemd for test purposes
+cat >/tmp/test_podman.output <<-EOT
+$($PODMAN --version)
+$PODMAN varlink --timeout=0 ${PODMAN_HOST}
+==========================================
+EOT
set -x
-# Run podman in background without systemd for test purposes
-$PODMAN varlink --timeout=0 ${PODMAN_HOST} >/tmp/test_runner.output 2>&1 &
+$PODMAN varlink --timeout=0 ${PODMAN_HOST} >>/tmp/test_podman.output 2>&1 &
if [[ -z $1 ]]; then
export PYTHONPATH=.
python3 -m unittest discover -s . $VERBOSE
+ RETURNCODE=$?
else
export PYTHONPATH=.:./test
python3 -m unittest $1 $VERBOSE
+ RETURNCODE=$?
fi
set +x
pkill -9 podman
pkill -9 conmon
-showlog /tmp/test_runner.output
+showlog /tmp/test_podman.output
showlog /tmp/alpine.log
showlog /tmp/busybox.log
+
+exit $RETURNCODE