forked from h2oai/h2o-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunner_164_simple.sh
executable file
·94 lines (77 loc) · 3.13 KB
/
runner_164_simple.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
# This is critical:
# Ensure that all your children are truly dead when you yourself are killed.
# trap "kill -- -$BASHPID" INT TERM EXIT
# leave out EXIT for now
trap "kill -- -$BASHPID" INT TERM
echo "BASHPID: $BASHPID"
echo "current PID: $$"
source ./runner_setup.sh
rm -f h2o-nodes.json
if [[ $USER == "jenkins" ]]
then
# clean out old ice roots from 0xcust.** (assuming we're going to run as 0xcust..
# only do this if you're jenksin
echo "If we use more machines, expand this cleaning list."
echo "The possibilities should be relatively static over time"
echo "Could be problems if other threads also using that user on these machines at same time"
echo "Could make the rm pattern match a "sourcing job", not just 0xcustomer"
ssh -i ~/.0xcustomer/0xcustomer_id_rsa 0xcustomer@192.168.1.164 rm -f -r /home/0xcustomer/ice*
python ../four_hour_cloud.py -cj pytest_config-jenkins.json &
else
if [[ $USER == "kevin" ]]
then
python ../four_hour_cloud.py -cj pytest_config-kevin.json &
else
python ../four_hour_cloud.py &
fi
fi
CLOUD_PID=$!
jobs -l
echo ""
echo "Have to wait until h2o-nodes.json is available from the cloud build. Deleted it above."
echo "spin loop here waiting for it. Since the h2o.jar copy slows each node creation"
echo "it might be 12 secs per node"
while [ ! -f ./h2o-nodes.json ]
do
sleep 5
done
ls -lt ./h2o-nodes.json
# We now have the h2o-nodes.json, that means we started the jvms
# Shouldn't need to wait for h2o cloud here..
# the test should do the normal cloud-stabilize before it does anything.
# n0.doit uses nosetests so the xml gets created on completion. (n0.doit is a single test thing)
# A little '|| true' hack to make sure we don't fail out if this subtest fails
# test_c1_rel has 1 subtest
# This could be a runner, that loops thru a list of tests.
echo "If it exists, pytest_config-<username>.json in this dir will be used"
echo "i.e. pytest_config-jenkins.json"
echo "Used to run as 0xcust.., with multi-node targets (possibly)"
DOIT=../testdir_single_jvm/n0.doit
# $DOIT c5/test_c5_KMeans_sphere15_180GB.py || true
$DOIT c1/test_c1_rel.py || true
# $DOIT c2/test_c2_rel.py || true
# $DOIT c3/test_c3_rel.py || true
# $DOIT c4/test_c4_four_billion_rows.py || true
# $DOIT c6/test_c6_hdfs.py || true
# $DOIT c8/test_c8_rf_airlines_hdfs.py || true
# fails with summary
# $DOIT c7/test_c7_rel.py || true
# If this one fails, fail this script so the bash dies
# We don't want to hang waiting for the cloud to terminate.
../testdir_single_jvm/n0.doit test_shutdown.py
if ps -p $CLOUD_PID > /dev/null
then
echo "$CLOUD_PID is still running after shutdown. Will kill"
kill $CLOUD_PID
fi
ps aux | grep four_hour_cloud
# test_c2_rel has about 11 subtests inside it, that will be tracked individually by jenkins
# ../testdir_single_jvm/n0.doit test_c2_rel || true
# We don't want the jenkins job to complete until we kill it, so the cloud stays alive for debug
# also prevents us from overrunning ourselves with cloud building
# If we don't wait, the cloud will get torn down.
jobs -l
echo ""
echo "You can stop this jenkins job now if you want. It's all done"
#