diff --git a/test-requirements.txt b/test-requirements.txt index c4a6774d..40402aa8 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -14,7 +14,7 @@ PyMySQL>=0.6.2 # MIT License WebOb>=1.2.3 WebTest>=2.0 oslotest>=1.10.0 # Apache-2.0 -testrepository>=0.0.18 +os-testr>=0.7.0 # Apache-2.0 testresources>=0.2.4 # Apache-2.0/BSD testscenarios>=0.4 testtools>=1.4.0 diff --git a/tools/ostestr_compat_shim.sh b/tools/ostestr_compat_shim.sh new file mode 100755 index 00000000..a483ed1a --- /dev/null +++ b/tools/ostestr_compat_shim.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# preserve old behavior of using an arg as a regex when '--' is not present +case $@ in + (*--*) ostestr $@;; + ('') ostestr;; + (*) ostestr --regex "$@" +esac diff --git a/tox.ini b/tox.ini index 2fa2ddce..37aaca2c 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ setenv = PYTHONWARNINGS=default::DeprecationWarning deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = python setup.py testr --slowest --testr-args='{posargs}' +commands = {toxinidir}/tools/ostestr_compat_shim.sh {posargs} python {toxinidir}/tools/django-manage.py test bgpvpn_dashboard.test.api_tests.bgpvpn_tests [testenv:releasenotes]