From e250eb2f342539626140a6dc38ff54e3f3ae4fca Mon Sep 17 00:00:00 2001 From: Maru Newby Date: Fri, 22 Aug 2014 23:48:44 -0700 Subject: [PATCH] Externalize hooks for neutron functional jobs Maintaining hook behavior in the config repo has the drawback of being hard to test. This change externalizes the hook definitions for the neutron functional jobs so they can be maintained and gated on via the neutron repo. The supporting neutron change to master: https://review.openstack.org/#/c/114717/ Change-Id: If5192cb22b5613c5ebcab63316c646ea3ab482df --- .../config/neutron-functional.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/openstack_project/files/jenkins_job_builder/config/neutron-functional.yaml b/modules/openstack_project/files/jenkins_job_builder/config/neutron-functional.yaml index 67ee036eb1..3316d1485a 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/neutron-functional.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/neutron-functional.yaml @@ -24,15 +24,16 @@ export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE fi + function gate_hook {{ + bash -xe $BASE/new/neutron/neutron/tests/functional/contrib/gate_hook.sh + }} + export -f gate_hook + function post_test_hook {{ - $BASE/new/devstack/unstack.sh - cd $BASE/new/neutron - # Run tests as the stack user to allow sudo+rootwrap. - sudo chown -R stack:stack $BASE/new/neutron - echo "Running neutron functional test suite" - sudo -H -u stack tox -e dsvm-functional + bash -xe $BASE/new/neutron/neutron/tests/functional/contrib/post_test_hook.sh }} export -f post_test_hook + cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh