summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2017-10-23 19:26:33 +0000
committerGerrit Code Review <review@openstack.org>2017-10-23 19:26:33 +0000
commitc5d3d9b318be847a491769626644fead20081ca4 (patch)
treedc6f7ca35511ef06279ac3449018d9ad58329b84
parente83a0941a3221f0fa0d72b5c512c3222122b1f77 (diff)
parentef595fcfc4b42d2a7baeeddee9b804541b81637f (diff)
downloadpython-openstackclient-c5d3d9b318be847a491769626644fead20081ca4.tar.gz
Merge "Add wrapper around ostestr"
-rwxr-xr-xopenstackclient/tests/functional/run_ostestr.sh16
-rw-r--r--tox.ini4
2 files changed, 20 insertions, 0 deletions
diff --git a/openstackclient/tests/functional/run_ostestr.sh b/openstackclient/tests/functional/run_ostestr.sh
new file mode 100755
index 00000000..a6adad96
--- /dev/null
+++ b/openstackclient/tests/functional/run_ostestr.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# This is a script that runs ostestr with the openrc OS_ variables sourced.
+# Do not run this script unless you know what you're doing.
+# For more information refer to:
+# https://docs.openstack.org/python-openstackclient/latest/
+
+# Source environment variables to kick things off
+if [ -f ~stack/devstack/openrc ] ; then
+ source ~stack/devstack/openrc admin admin
+fi
+
+echo 'Running tests with:'
+env | grep OS
+
+ostestr $*
diff --git a/tox.ini b/tox.ini
index 3c1b3c38..a16f0eb8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -56,6 +56,10 @@ commands =
[testenv:functional]
setenv = OS_TEST_PATH=./openstackclient/tests/functional
passenv = OS_*
+# Enable this when running Zuul v3 jobs
+#whitelist_externals = openstackclient/tests/functional/run_ostestr.sh
+#commands =
+# {toxinidir}/openstackclient/tests/functional/run_ostestr.sh {posargs}
[testenv:functional-tips]
setenv = OS_TEST_PATH=./openstackclient/tests/functional