From 289ba867d51391f9ce715a250948e02472e70447 Mon Sep 17 00:00:00 2001 From: Maru Newby Date: Tue, 18 Mar 2014 23:57:32 +0000 Subject: [PATCH] Run neutron functional job as tempest user Previously, invoking tox on the cloned neutron repo was resulting in a permission error because the default user did not have permission to write to /opt/stack/new/neutron. This change ensures the tempest user can write to that path and is the one that executes tox. Change-Id: I18fbaf5fc0acc85dd0b39ae26c008e634c118730 --- .../jenkins_job_builder/config/neutron-functional.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 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 1b63788ed9..241456b332 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 @@ -23,10 +23,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