forked from koding/koding
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-test
More file actions
executable file
·39 lines (26 loc) · 929 Bytes
/
Copy pathrun-test
File metadata and controls
executable file
·39 lines (26 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
:<<EOF
This script executes client/test/run.sh script over ssh.
First option passed to this script is HOST to run test suite. Rest of
the command line options are passed to test suite runner script on
HOST.
EOF
set -o errexit
HOST=$1
shift # Remove HOST option from positional parameter array.
OPTIONS=$*
ssh -o 'StrictHostKeyChecking no' \
-i $(dirname $0)/koding-test-instances-2015-06.pem \
ubuntu@$HOST \
IGNORED_TEST_CASES="'$IGNORED_TEST_CASES'" \
NIGHTWATCH_OPTIONS="'$NIGHTWATCH_OPTIONS'" \
CI="'$CI'" \
WERCKER_BUILD_URL="'$WERCKER_BUILD_URL'" \
WERCKER_GIT_BRANCH="'$WERCKER_GIT_BRANCH'" \
WERCKER_STARTED_BY="'$WERCKER_STARTED_BY'" \
"sudo -E /opt/koding/run exec /opt/koding/client/test/run.sh $OPTIONS" &
PID=$!
trap 'kill -TERM $PID' TERM
wait $PID # Wait until child process is exited
trap - TERM INT
wait $PID # In case an interrupt signal is received