Allow nohup running of tests remotely
This commit is contained in:
parent
c8934a07a0
commit
4440c1d066
@ -8,7 +8,7 @@ INSTANCE_NAME="$2"
|
|||||||
TEST_PROJECT="${3:-nova}"
|
TEST_PROJECT="${3:-nova}"
|
||||||
TEST_REF="${3:-refs/changes/97/66597/4}"
|
TEST_REF="${3:-refs/changes/97/66597/4}"
|
||||||
APPLIANCE_NAME="devstack"
|
APPLIANCE_NAME="devstack"
|
||||||
RUN_TESTS_SCRIPT="$THISDIR/run_tests.sh"
|
RUN_TESTS_SCRIPT="run_tests.sh"
|
||||||
|
|
||||||
. $THISDIR/functions
|
. $THISDIR/functions
|
||||||
|
|
||||||
@ -20,14 +20,15 @@ eval $(ssh-agent)
|
|||||||
|
|
||||||
ssh-add $KEY_PATH
|
ssh-add $KEY_PATH
|
||||||
|
|
||||||
set +x
|
ssh -i $KEY_PATH jenkins@$IP '[ -e xenapi-os-testing ] || git clone https://github.com/citrix-openstack/xenapi-os-testing -b bob'
|
||||||
|
new_env="INSTANCE_NAME=$INSTANCE_NAME ZUUL_URL=https://review.openstack.org ZUUL_PROJECT=$TEST_PROJECT ZUUL_REF=$TEST_REF"
|
||||||
|
new_env="$new_env APPLIANCE_NAME=$APPLIANCE_NAME"
|
||||||
|
ssh -i $KEY_PATH jenkins@$IP "echo '#!/bin/bash' > run_tests_env.sh"
|
||||||
|
ssh -i $KEY_PATH jenkins@$IP "echo $new_env ~/xenapi-os-testing/run_tests.sh >> run_tests_env.sh"
|
||||||
|
ssh -i $KEY_PATH jenkins@$IP "chmod +x run_tests_env.sh"
|
||||||
|
|
||||||
new_env="INSTANCE_NAME=$INSTANCE_NAME; ZUUL_URL=https://review.openstack.org; ZUUL_PROJECT=$TEST_PROJECT; ZUUL_REF=$TEST_REF"
|
ssh -i $KEY_PATH jenkins@$IP "nohup ./run_tests_env.sh &"
|
||||||
new_env="$new_env; APPLIANCE_NAME=$APPLIANCE_NAME"
|
|
||||||
cat $RUN_TESTS_SCRIPT | sed -e "s@#REPLACE_ENV@$new_env@" | remote-bash jenkins@$IP
|
|
||||||
|
|
||||||
RESULT="$?"
|
|
||||||
set -x
|
|
||||||
|
|
||||||
ssh-agent -k
|
ssh-agent -k
|
||||||
exit $RESULT
|
|
||||||
|
echo "Tests are now running remotely."
|
||||||
|
Loading…
Reference in New Issue
Block a user