From 7689ea4ac69318b22371a867efe17164e33fde22 Mon Sep 17 00:00:00 2001 From: Paul Michali Date: Tue, 16 Feb 2016 21:59:59 +0000 Subject: [PATCH] Switch from testr to ostestr Was seeing py34 (and DSVM) tests failing with an Invocation error, even though the test passed. Switched to ostestr, as is done in Neutron under commit 240facf9e67aa5b205679f397107abfe059a869a, and the test passes (not sure what the root cause is here). Change-Id: If85987865e0393892c52f319d7cef526c021e0df --- tools/ostestr_compat_shim.sh | 8 ++++++++ tox.ini | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 tools/ostestr_compat_shim.sh diff --git a/tools/ostestr_compat_shim.sh b/tools/ostestr_compat_shim.sh new file mode 100755 index 000000000..a483ed1a1 --- /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 9925a166b..417f84d5e 100644 --- a/tox.ini +++ b/tox.ini @@ -13,8 +13,8 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt whitelist_externals = sh commands = - sh tools/pretty_tox.sh '{posargs}' -# there is also secret magic in pretty_tox.sh which lets you run in a fail only + {toxinidir}/tools/ostestr_compat_shim.sh {posargs} +# there is also secret magic in ostestr which lets you run in a fail only # mode. To do this define the TRACE_FAILONLY environmental variable. [testenv:common-constraints]