Updated to allow disowning of the run_tests process
This commit is contained in:
parent
d6f6a4359f
commit
4b4441390c
5
disown_child.sh
Executable file
5
disown_child.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
THISDIR=$(dirname $(readlink -f $0))
|
||||
$THISDIR/$1 </dev/null &
|
||||
disown
|
25
run_tests.sh
Normal file → Executable file
25
run_tests.sh
Normal file → Executable file
@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec > run_tests.log 2>&1
|
||||
|
||||
set -ex
|
||||
|
||||
#REPLACE_ENV
|
||||
@ -59,8 +61,8 @@ export SKIP_DEVSTACK_GATE_PROJECT=1
|
||||
sudo pip install -i https://pypi.python.org/simple/ XenAPI
|
||||
|
||||
# These came from the Readme
|
||||
export REPO_URL=https://review.openstack.org/p
|
||||
export ZUUL_URL=/home/jenkins/workspace-cache
|
||||
export ZUUL_URL=https://review.openstack.org/p
|
||||
export REPO_URL=/home/jenkins/workspace-cache
|
||||
export WORKSPACE=/home/jenkins/workspace/testing
|
||||
|
||||
# Check out a custom branch
|
||||
@ -107,4 +109,21 @@ git clone https://github.com/matelakat/devstack-gate -b xenserver-integration
|
||||
#( sudo mkdir -p /opt/stack/new && sudo chown -R jenkins:jenkins /opt/stack/new && cd /opt/stack/new && git clone https://github.com/matelakat/devstack-gate -b xenserver-integration )
|
||||
|
||||
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
|
||||
./safe-devstack-vm-gate-wrap.sh
|
||||
|
||||
# Trap the exit code + log a final message
|
||||
function trapexit {
|
||||
exit_code=$?
|
||||
if [ $exit_code -eq 0 ]; then
|
||||
echo "Final result: Tests passed"
|
||||
else
|
||||
echo "Final result: Tests failed"
|
||||
fi
|
||||
|
||||
# Do not use 'exit' - bash will preserve the status
|
||||
}
|
||||
|
||||
trap trapexit EXIT
|
||||
|
||||
# OpenStack doesn't care much about unset variables...
|
||||
set +ue
|
||||
source ./safe-devstack-vm-gate-wrap.sh
|
||||
|
Loading…
Reference in New Issue
Block a user