This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 260
/
stage-test-sgx.jenkinsfile
148 lines (145 loc) · 5 KB
/
stage-test-sgx.jenkinsfile
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
stage('test-sgx') {
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/python
make ${MAKEOPTS}
make ${MAKEOPTS} check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/bash
make ${MAKEOPTS}
make ${MAKEOPTS} regression
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/curl
make ${MAKEOPTS}
make ${MAKEOPTS} check
'''
}
timeout(time: 10, unit: 'MINUTES') {
sh '''
cd Examples/gcc
make ${MAKEOPTS}
make ${MAKEOPTS} check
'''
}
timeout(time: 15, unit: 'MINUTES') {
sh '''
cd Examples/memcached
make ${MAKEOPTS}
make SGX=1 start-graphene-server &
../../Scripts/wait_for_server 60 127.0.0.1 11211
# memcslap populates server but doesn't report errors, use
# memcached-tool for this (must return two lines of stats)
memcslap --servers=127.0.0.1 --concurrency=8
src/scripts/memcached-tool 127.0.0.1 | wc -l | grep -w "2"
'''
}
timeout(time: 15, unit: 'MINUTES') {
sh '''
# TODO this logic is to check both epoll and select varants, and probably
# should be split to check both of those separately and on all distros
if .ci/isdistro xenial
then
USE_SELECT=1
export USE_SELECT
fi
cd Examples/redis
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
../../Scripts/wait_for_server 60 127.0.0.1 6379
./src/src/redis-benchmark
'''
}
timeout(time: 15, unit: 'MINUTES') {
sh '''
cd Examples/lighttpd
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
../../Scripts/wait_for_server 60 127.0.0.1 8003
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8003
'''
}
timeout(time: 15, unit: 'MINUTES') {
sh '''
cd Examples/nginx
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
../../Scripts/wait_for_server 60 127.0.0.1 8002
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002
'''
}
/*
timeout(time: 25, unit: 'MINUTES') {
sh '''
cd Examples/apache
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
../../Scripts/wait_for_server 60 127.0.0.1 8001
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8001
../../Scripts/wait_for_server 60 127.0.0.1 8443
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh https://127.0.0.1:8443
'''
}
*/
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/blender
make ${MAKEOPTS}
make ${MAKEOPTS} check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/r
make ${MAKEOPTS}
make ${MAKEOPTS} check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/sqlite
make ${MAKEOPTS} all
make ${MAKEOPTS} regression
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
# test SGX remote attestation only on Ubuntu 18.04 to keep internet requests to minimum
.ci/isdistro bionic || exit 0
cd Examples/ra-tls-mbedtls
if [ "${ra_client_spid}" != "" ] && [ "${ra_client_key}" != "" ]; \
then \
make check_epid RA_CLIENT_SPID=${ra_client_spid} \
RA_TLS_EPID_API_KEY=${ra_client_key} \
RA_CLIENT_LINKABLE=0; \
make check_epid_fail RA_CLIENT_SPID=${ra_client_spid} \
RA_TLS_EPID_API_KEY=${ra_client_key} \
RA_CLIENT_LINKABLE=0; \
else \
echo "Failure: no ra_client_spid and/or ra_client_key!"; \
exit 1; \
fi
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
# test SGX remote attestation only on Ubuntu 18.04 to keep internet requests to minimum
.ci/isdistro bionic || exit 0
cd Examples/ra-tls-secret-prov
if [ "${ra_client_spid}" != "" ] && [ "${ra_client_key}" != "" ]; \
then \
make SGX=1 check_epid RA_CLIENT_SPID=${ra_client_spid} \
RA_TLS_EPID_API_KEY=${ra_client_key} \
RA_CLIENT_LINKABLE=0; \
else \
echo "Failure: no ra_client_spid and/or ra_client_key!"; \
exit 1; \
fi
'''
}
}