-
Notifications
You must be signed in to change notification settings - Fork 3
/
integrationtest.sh
executable file
·121 lines (80 loc) · 2.56 KB
/
integrationtest.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/bin/bash
set -ex
echo "_______________________IN PROCESS PLUGIN__________________________________"
echo ${BUILDNUM}
echo ${JOBNAME}
echo "Using Loom Build ${loom_build}"
echo "Using Etherboy Build ${etherboy_build}"
echo "Cleaning up tmp files"
rm -rf /tmp/loom
mkdir -p /tmp/loom/contracts
echo "Downloading loom sdk"
gsutil cp gs://private.delegatecall.com/loom/linux/build-${loom_build}/loom /tmp/loom/loom-linux
echo "Downloading etherboy plugin"
echo "Downloading etherboy plugin"
gsutil cp gs://private.delegatecall.com/etherboy/linux/build-${etherboy_build}/etherboycore.so /tmp/loom/contracts/etherboycore.so
echo "Downloading etherboy cli"
gsutil cp gs://private.delegatecall.com/etherboy/linux/build-${etherboy_build}/etherboycli /tmp/loom/etherboycli
cd /tmp/loom
chmod +x loom-linux
chmod +x etherboycli
./loom-linux init --force
rm -f genesis.json
echo "{
\"contracts\": [
{
\"vm\": \"plugin\",
\"name\": \"etherboycore\",
\"format\": \"plugin\",
\"location\": \"etherboycore:0.0.1\",
\"init\": {
}
}
]
}
" >> genesis.json
./loom-linux run > loom_run_${etherboy_build}_${loom_build}.log 2>&1 &
sleep 5
./etherboycli genkey -k key
./etherboycli create-acct -k key
./etherboycli set -k key
./etherboycli get -k key
pkill -f loom-linux
cat loom_run_${etherboy_build}_${loom_build}.log
rm *.log
echo "_______________________OUT PROCESS PLUGIN__________________________________"
mkdir -p external_test
cd external_test
gsutil cp gs://private.delegatecall.com/loom/linux/build-${loom_build}/loom loom
chmod +x loom
./loom init --force
mkdir -p contracts
rm -f genesis.json
echo "{
\"contracts\": [
{
\"vm\": \"plugin\",
\"name\": \"etherboycore\",
\"format\": \"plugin\",
\"location\": \"etherboycore:0.0.1\",
\"init\": {
}
}
]
}
" >> genesis.json
gsutil cp gs://private.delegatecall.com/etherboy/linux/build-${etherboy_build}/etherboycore.0.0.1 contracts/etherboycore.0.0.1
gsutil cp gs://private.delegatecall.com/etherboy/linux/build-${etherboy_build}/etherboycli etherboycli
chmod +x etherboycli
chmod +x contracts/etherboycore.0.0.1
./loom run > loom_run_${etherboy_build}_${loom_build}.log 2>&1 &
sleep 5
./etherboycli genkey -k key
./etherboycli create-acct -k key
./etherboycli set -k key
./etherboycli get -k key
# jenkins will clean up processes started as part of this script
#pkill -f loom
#pkill -f etherboycore
cat loom_run_${etherboy_build}_${loom_build}.log
rm *.log