From 2ecb4c5aa211dab29936a4ca32842e5266965170 Mon Sep 17 00:00:00 2001
From: Valeriy Ponomaryov <vponomaryov@mirantis.com>
Date: Sat, 31 May 2014 11:40:55 +0300
Subject: [PATCH] Fixed config of manila's jobs

Env vars from separate script were exported only
for child process and were not available for other subprocesses.
https://jenkins07.openstack.org/job/gate-manila-tempest-dsvm-neutron/122/console

Set all external scripts to be called in parent process.
Because there is no need to use subprocesses.

Call of setup.sh is intended to be in pre_test_hook:
https://review.openstack.org/#/c/97003/

Also added 'export DEVSTACK_GATE_NEUTRON=1' to the config,
because name of job supposes using of neutron, so enable it
by default.

Change-Id: Ia211526d63c172b5c9f700d59c143ad78694348b
---
 .../files/jenkins_job_builder/config/manila.yaml   | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/modules/openstack_project/files/jenkins_job_builder/config/manila.yaml b/modules/openstack_project/files/jenkins_job_builder/config/manila.yaml
index ce4aeb42b1..cf8886205e 100644
--- a/modules/openstack_project/files/jenkins_job_builder/config/manila.yaml
+++ b/modules/openstack_project/files/jenkins_job_builder/config/manila.yaml
@@ -16,19 +16,18 @@
           #!/bin/bash -xe
           export PYTHONUNBUFFERED=true
           export DEVSTACK_GATE_TIMEOUT=60
+          export DEVSTACK_GATE_NEUTRON=1
           export ENABLED_SERVICES=manila,m-api,m-shr,m-sch,tempest
           export PROJECTS="stackforge/manila $PROJECTS"
           export PROJECTS="stackforge/python-manilaclient $PROJECTS"
 
           function pre_test_hook {
-              # Run setup script with exports of env vars
-              $BASE/new/manila/contrib/ci/setup.sh
-              $BASE/new/manila/contrib/ci/pre_test_hook.sh
+              source $BASE/new/manila/contrib/ci/pre_test_hook.sh
           }
           export -f pre_test_hook
 
           function post_test_hook {
-              $BASE/new/manila/contrib/ci/post_test_hook.sh
+              source $BASE/new/manila/contrib/ci/post_test_hook.sh
           }
           export -f post_test_hook
 
@@ -58,19 +57,18 @@
           #!/bin/bash -xe
           export PYTHONUNBUFFERED=true
           export DEVSTACK_GATE_TIMEOUT=60
+          export DEVSTACK_GATE_NEUTRON=1
           export ENABLED_SERVICES=manila,m-api,m-shr,m-sch,tempest
           export PROJECTS="stackforge/manila $PROJECTS"
           export PROJECTS="stackforge/python-manilaclient $PROJECTS"
 
           function pre_test_hook {
-              # Run setup script with exports of env vars
-              $BASE/new/manila/contrib/ci/multi_backend/setup.sh
-              $BASE/new/manila/contrib/ci/multi_backend/pre_test_hook.sh
+              source $BASE/new/manila/contrib/ci/multi_backend/pre_test_hook.sh
           }
           export -f pre_test_hook
 
           function post_test_hook {
-              $BASE/new/manila/contrib/ci/multi_backend/post_test_hook.sh
+              source $BASE/new/manila/contrib/ci/multi_backend/post_test_hook.sh
           }
           export -f post_test_hook