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 b3c093d36d..142d9f57e2 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,10 +24,13 @@ fi function post_test_hook {{ - /opt/stack/new/devstack/unstack.sh + $BASE/new/devstack/unstack.sh export OS_SUDO_TESTING=1 - cd /opt/stack/new/neutron - tox -e functional + cd $BASE/new/neutron + # Run tests as the stack user to allow sudo. + sudo chown -R stack:stack $BASE/new/neutron + echo "Running neutron functional test suite" + sudo -H -u stack tox -e functional }} export -f post_test_hook cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh