From e3da5c10c472ece03828b076a9240b735295a42e Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Tue, 12 Sep 2017 12:31:02 -0600 Subject: [PATCH] Update for os-testr 1.0.0 / stestr Note: .testr.conf is still necessary for cover target. Closes-Bug: #1716743 Change-Id: I567d84d0f1109a4809e1ac69e0d54c73a22b9706 --- .gitignore | 1 + .stestr.conf | 3 +++ neutron_vpnaas/tests/contrib/post_test_hook.sh | 10 +++++----- test-requirements.txt | 1 - 4 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 .stestr.conf diff --git a/.gitignore b/.gitignore index 1e48339ea..2aeb83d07 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ subunit.log !/.mailmap !/.pylintrc !/.testr.conf +!/.stestr.conf # Files created by releasenotes build releasenotes/build diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 000000000..5355f34b3 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${OS_TEST_PATH:-./neutron_vpnaas/tests/unit} +top_dir=./ diff --git a/neutron_vpnaas/tests/contrib/post_test_hook.sh b/neutron_vpnaas/tests/contrib/post_test_hook.sh index 8e73ec349..f56164332 100755 --- a/neutron_vpnaas/tests/contrib/post_test_hook.sh +++ b/neutron_vpnaas/tests/contrib/post_test_hook.sh @@ -11,11 +11,11 @@ VENV=${1:-"dsvm-functional"} function generate_testr_results { # Give job user rights to access tox logs sudo -H -u $owner chmod o+rw . - sudo -H -u $owner chmod o+rw -R .testrepository - if [ -f ".testrepository/0" ] ; then - .tox/$VENV/bin/subunit-1to2 < .testrepository/0 > ./testrepository.subunit - $SCRIPTS_DIR/subunit2html ./testrepository.subunit testr_results.html - gzip -9 ./testrepository.subunit + sudo -H -u $owner chmod o+rw -R .stestr + if [ -f ".stestr/0" ] ; then + .tox/$VENV/bin/subunit-1to2 < .stestr/0 > ./stestr.subunit + $SCRIPTS_DIR/subunit2html ./stestr.subunit testr_results.html + gzip -9 ./stestr.subunit gzip -9 ./testr_results.html sudo mv ./*.gz /opt/stack/logs/ fi diff --git a/test-requirements.txt b/test-requirements.txt index 679912bb6..aea2d49fd 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -13,7 +13,6 @@ python-subunit>=0.0.18 # Apache-2.0/BSD requests-mock>=1.1.0 # Apache-2.0 sphinx>=1.6.2 # BSD openstackdocstheme>=1.16.0 # Apache-2.0 -testrepository>=0.0.18 # Apache-2.0/BSD tempest>=16.1.0 # Apache-2.0 testtools>=1.4.0 # MIT testresources>=0.2.4 # Apache-2.0/BSD