From 9c34bd21cf0f6587ea956218b1133e485c8a0562 Mon Sep 17 00:00:00 2001 From: Takashi NATSUME Date: Fri, 4 Sep 2015 11:04:04 +0900 Subject: [PATCH] Update path to subunit2html in post_test_hook Per: http://lists.openstack.org/pipermail/openstack-dev/2015-August/072982.html The location of subunit2html changed on the images in the gate so update the path used in the post_test_hook. Long-term we should just use what's in devstack-gate. Closes-Bug: #1491646 (cherry picked from commit d75f79f67c176a38d41fcc5f8794d5956ac65ace) This also adds a gate_hook to invoke d-g for env prepping. It merely triggers main devstack-gate script. We need the hook because our new neutronclient jobs define gate_hook function that points to it, and in that case devstack-gate does NOT trigger its main script, leaving it up to the hook. Depends-on: I8549db52fa5b752202ac7f019b3e1931a697e337 Change-Id: If37743547f739e494501bbc5dc3bb214293919fa --- neutronclient/tests/functional/hooks/gate_hook.sh | 5 +++++ neutronclient/tests/functional/hooks/post_test_hook.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 neutronclient/tests/functional/hooks/gate_hook.sh diff --git a/neutronclient/tests/functional/hooks/gate_hook.sh b/neutronclient/tests/functional/hooks/gate_hook.sh new file mode 100644 index 000000000..4b04fdde1 --- /dev/null +++ b/neutronclient/tests/functional/hooks/gate_hook.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -ex + +$BASE/new/devstack-gate/devstack-vm-gate.sh diff --git a/neutronclient/tests/functional/hooks/post_test_hook.sh b/neutronclient/tests/functional/hooks/post_test_hook.sh index 68f906a24..bdc7ef356 100755 --- a/neutronclient/tests/functional/hooks/post_test_hook.sh +++ b/neutronclient/tests/functional/hooks/post_test_hook.sh @@ -18,7 +18,7 @@ function generate_testr_results { if [ -f .testrepository/0 ]; then sudo .tox/functional/bin/testr last --subunit > $WORKSPACE/testrepository.subunit sudo mv $WORKSPACE/testrepository.subunit $BASE/logs/testrepository.subunit - sudo .tox/functional/bin/python /usr/local/jenkins/slave_scripts/subunit2html.py $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html + sudo /usr/os-testr-env/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html sudo gzip -9 $BASE/logs/testrepository.subunit sudo gzip -9 $BASE/logs/testr_results.html sudo chown jenkins:jenkins $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz