From c5a7236f78dc9a5a81cf58d8f13041cd657b585e Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Tue, 12 Dec 2017 13:36:08 +0530 Subject: [PATCH] Switch to stestr for generating subunit results * https://review.openstack.org/#/c/504345/ moves the tempest run cli to stestr. In order to avoid breakage switch to stestr from testr. * Check for .testresposity and .stestr folder and then use respective test runner. It will avoid the breakage in CI. Change-Id: Ic6c5fb4bdf883708cf4fc08486db7e89e0a76c6a --- run_tests.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index a6e1453fc..c95c3b86d 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -250,7 +250,7 @@ $SUDO chown -R "$(id -u):$(id -g)" /tmp/openstack/tempest/ # install from source now on ubuntu until packaged if uses_debs; then cd /tmp/openstack/tempest-horizon; $SUDO python setup.py install - $SUDO pip install -U testrepository os-testr + $SUDO pip install -U stestr os-testr fi set +e @@ -327,7 +327,11 @@ $tempest_binary run --whitelist_file=/tmp/openstack/tempest/test-whitelist.txt - RESULT=$? set -e $tempest_binary list-plugins -testr last --subunit > /tmp/openstack/tempest/testrepository.subunit +if [ -d .testrepository ]; then + testr last --subunit > /tmp/openstack/tempest/testrepository.subunit +elif [ -d .stestr ]; then + stestr last --subunit > /tmp/openstack/tempest/testrepository.subunit +fi subunit2html /tmp/openstack/tempest/testrepository.subunit /tmp/openstack/tempest/testr_results.html print_header 'SELinux Alerts (Tempest)' catch_selinux_alerts