summaryrefslogtreecommitdiff
path: root/hack/bats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-01 03:36:11 -0400
committerGitHub <noreply@github.com>2021-10-01 03:36:11 -0400
commit317e20a8d5a39088ea112f8321630aacfe27ddbc (patch)
tree934f83cc105ca3f619d07f7b41384c3d4c31a534 /hack/bats
parentf96c281f53cff68ac0715dac5da0f53eefa95b8b (diff)
parentbf94ebf423931f6cd848126372fe558c8b956dcc (diff)
downloadpodman-317e20a8d5a39088ea112f8321630aacfe27ddbc.tar.gz
podman-317e20a8d5a39088ea112f8321630aacfe27ddbc.tar.bz2
podman-317e20a8d5a39088ea112f8321630aacfe27ddbc.zip
Merge pull request #11776 from edsantiago/bats_is_cleanup
System tests: tighten 'is' operator
Diffstat (limited to 'hack/bats')
-rwxr-xr-xhack/bats9
1 files changed, 7 insertions, 2 deletions
diff --git a/hack/bats b/hack/bats
index 45b8cf6f2..7cc3b9bde 100755
--- a/hack/bats
+++ b/hack/bats
@@ -19,6 +19,8 @@ $0 is a wrapper for invoking podman system tests.
version of bats installed, runs with '--filter pattern'
which runs only subtests that match 'pattern'
+ -T Passed on to bats, which will then show timing data
+
--help display usage message
By default, tests ./bin/podman. To test a different podman, do:
@@ -60,6 +62,8 @@ REMOTE=
ROOT_ONLY=
ROOTLESS_ONLY=
+declare -a bats_opts=()
+
declare -a bats_filter=()
for i;do
@@ -69,6 +73,7 @@ for i;do
--root) ROOT_ONLY=1 ;;
--rootless) ROOTLESS_ONLY=1 ;;
--remote) REMOTE=remote; echo "--remote is TBI"; exit 1;;
+ --ts|-T) bats_opts+=("-T") ;;
*/*.bats) TESTS=$i ;;
*)
if [[ $i =~ : ]]; then
@@ -94,7 +99,7 @@ if [ -z "$ROOTLESS_ONLY" ]; then
sudo --preserve-env=PODMAN \
--preserve-env=PODMAN_TEST_DEBUG \
--preserve-env=OCI_RUNTIME \
- bats "${bats_filter[@]}" $TESTS
+ bats "${bats_opts[@]}" "${bats_filter[@]}" $TESTS
rc=$?
fi
@@ -102,7 +107,7 @@ fi
echo "--------------------------------------------------"
if [ -z "$ROOT_ONLY" ]; then
echo "\$ bats ${bats_filter[@]} $TESTS"
- bats "${bats_filter[@]}" $TESTS
+ bats "${bats_opts[@]}" "${bats_filter[@]}" $TESTS
rc=$((rc | $?))
fi