From de0c8e29a4af8fe34f3e25955162ae533f2c68db Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Tue, 6 Mar 2018 07:50:40 +0200 Subject: [PATCH] migrate to stestr ostestr is no longer installed by default by infra and will be totally removed longer term; stestr [1] is its replacement. This is the reason out gate is failing with the following today: nsx/tools/ostestr_compat_shim.sh: ostestr: not found This patch moves us to stestr by: - Updating tox.ini to use stestr rather than call ostestr_compat_shim.sh and in turn ostestr. - Removing ostestr_compat_shim.sh as its no longer used. Change-Id: I1f97df69500058a7d330f7be5735a54c68f35559 --- .stestr.conf | 3 +++ tools/ostestr_compat_shim.sh | 9 --------- tox.ini | 3 ++- 3 files changed, 5 insertions(+), 10 deletions(-) create mode 100644 .stestr.conf delete mode 100755 tools/ostestr_compat_shim.sh diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..69354e55 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./vmware_nsxlib/tests/unit +top_dir=./ diff --git a/tools/ostestr_compat_shim.sh b/tools/ostestr_compat_shim.sh deleted file mode 100755 index cffeac5c..00000000 --- a/tools/ostestr_compat_shim.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# Copied from neutron/tools. Otherwise no units tests are found. -# 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 58d82be1..ffdf8697 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,8 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt whitelist_externals = sh commands = - {toxinidir}/tools/ostestr_compat_shim.sh {posargs} + stestr run {posargs} + stestr slowest # 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.