@@ -32,214 +32,190 @@ supported_builds="full"
32
32
# Supported tests
33
33
supported_tests=" external_custom camel criu-portable-checkpoint criu-portable-restore criu-ubi-portable-checkpoint criu-ubi-portable-restore derby elasticsearch jacoco jenkins functional-test kafka lucene-solr openliberty-mp-tck payara-mp-tck quarkus quarkus_quickstarts scala system-test tomcat tomee wildfly wycheproof netty spring zookeeper"
34
34
35
- function check_version() {
36
- version=$1
37
-
38
- for current_version in ${supported_versions}
39
- do
40
- if [[ " ${version} " == " ${current_version} " ]]; then
41
- return 1
42
- fi
43
- done
44
-
45
- return 0
46
- }
47
-
48
- # Set a valid version
49
- function set_version() {
50
- version=$1
51
-
52
- if (check_version ${version} ); then
53
- echo " ERROR: Invalid Version: ${version} "
54
- echo " Usage: $0 [${supported_versions} ]"
55
- exit 1
56
- fi
57
- }
58
-
59
35
function check_os() {
60
- os=$1
36
+ os=$1
61
37
62
- for current_os in ${supported_os}
63
- do
64
- if [[ " ${os} " == " ${current_os} " ]]; then
65
- return 1
66
- fi
67
- done
38
+ for current_os in ${supported_os}
39
+ do
40
+ if [[ " ${os} " == " ${current_os} " ]]; then
41
+ return 1
42
+ fi
43
+ done
68
44
69
- return 0
45
+ return 0
70
46
}
71
47
72
48
# Set a valid os
73
49
function set_os() {
74
- os=$1
75
- if (check_os ${os} ); then
76
- echo " ERROR: Invalid OS: ${os} "
77
- echo " Usage: $0 [${supported_os} ]"
78
- exit 1
79
- fi
50
+ os=$1
51
+ if (check_os ${os} ); then
52
+ echo " ERROR: Invalid OS: ${os} "
53
+ echo " Usage: $0 [${supported_os} ]"
54
+ exit 1
55
+ fi
80
56
}
81
57
82
58
function check_test() {
83
- test=$1
59
+ test=$1
84
60
85
- for current_test in ${supported_tests}
86
- do
87
- if [[ " ${test} " == " ${current_test} " ]]; then
88
- return 1
89
- fi
90
- done
61
+ for current_test in ${supported_tests}
62
+ do
63
+ if [[ " ${test} " == " ${current_test} " ]]; then
64
+ return 1
65
+ fi
66
+ done
91
67
92
- return 0
68
+ return 0
93
69
}
94
70
95
71
# Set a valid test
96
72
function set_test() {
97
- test=$1
98
- if (check_test ${test} ); then
99
- echo " ERROR: Invalid Test: ${test} "
100
- echo " Usage: $0 [${supported_tests} ]"
101
- exit 1
102
- fi
73
+ test=$1
74
+ if (check_test ${test} ); then
75
+ echo " ERROR: Invalid Test: ${test} "
76
+ echo " Usage: $0 [${supported_tests} ]"
77
+ exit 1
78
+ fi
103
79
}
104
80
105
81
function check_vm() {
106
- vm=$1
82
+ vm=$1
107
83
108
- for current_vm in ${supported_jvms}
109
- do
110
- if [[ " ${vm} " == " ${current_vm} " ]]; then
111
- return 1
112
- fi
113
- done
84
+ for current_vm in ${supported_jvms}
85
+ do
86
+ if [[ " ${vm} " == " ${current_vm} " ]]; then
87
+ return 1
88
+ fi
89
+ done
114
90
115
- return 0
91
+ return 0
116
92
}
117
93
118
94
# Set a valid vm
119
95
function set_vm() {
120
- vm=$1
121
- if (check_vm ${vm} ); then
122
- echo " ERROR: Invalid VM: ${vm} "
123
- echo " Usage: $0 [${supported_jvms} ]"
124
- exit 1
125
- fi
96
+ vm=$1
97
+ if (check_vm ${vm} ); then
98
+ echo " ERROR: Invalid VM: ${vm} "
99
+ echo " Usage: $0 [${supported_jvms} ]"
100
+ exit 1
101
+ fi
126
102
}
127
103
128
104
function check_package() {
129
- package=$1
105
+ package=$1
130
106
131
- for current_package in ${supported_packages}
132
- do
133
- if [[ " ${package} " == " ${current_package} " ]]; then
134
- return 1
135
- fi
136
- done
107
+ for current_package in ${supported_packages}
108
+ do
109
+ if [[ " ${package} " == " ${current_package} " ]]; then
110
+ return 1
111
+ fi
112
+ done
137
113
138
- return 0
114
+ return 0
139
115
}
140
116
141
117
# Set a valid package
142
118
function set_package() {
143
- package=$1
144
- if (check_package ${package} ); then
145
- echo " ERROR: Invalid Package: ${package} "
146
- echo " Usage: $0 [${supported_packages} ]"
147
- exit 1
148
- fi
119
+ package=$1
120
+ if (check_package ${package} ); then
121
+ echo " ERROR: Invalid Package: ${package} "
122
+ echo " Usage: $0 [${supported_packages} ]"
123
+ exit 1
124
+ fi
149
125
}
150
126
151
127
function check_build() {
152
- build=$1
128
+ build=$1
153
129
154
- for current_build in ${supported_builds}
155
- do
156
- if [[ " ${build} " == " ${current_build} " ]]; then
157
- return 1
158
- fi
159
- done
130
+ for current_build in ${supported_builds}
131
+ do
132
+ if [[ " ${build} " == " ${current_build} " ]]; then
133
+ return 1
134
+ fi
135
+ done
160
136
161
- return 0
137
+ return 0
162
138
}
163
139
164
140
# Set a valid build
165
141
function set_build() {
166
- build=$1
167
- if (check_build ${build} ); then
168
- echo " ERROR: Invalid Build: ${build} "
169
- echo " Usage: $0 [${supported_builds} ]"
170
- exit 1
171
- fi
142
+ build=$1
143
+ if (check_build ${build} ); then
144
+ echo " ERROR: Invalid Build: ${build} "
145
+ echo " Usage: $0 [${supported_builds} ]"
146
+ exit 1
147
+ fi
172
148
}
173
149
174
150
# Set a platform
175
151
function set_platform() {
176
- # TO-DO: Add supported_platforms when portable tests support more platforms
177
- platform=$1
152
+ # TO-DO: Add supported_platforms when portable tests support more platforms
153
+ platform=$1
178
154
}
179
155
180
156
# Set base_docker_registry_url
181
157
function set_base_docker_registry_url() {
182
- base_docker_registry_url=" $1 "
158
+ base_docker_registry_url=" $1 "
183
159
}
184
160
185
161
# Set base_docker_registry_dir
186
162
function set_base_docker_registry_dir() {
187
- base_docker_registry_dir=" $1 "
163
+ base_docker_registry_dir=" $1 "
188
164
}
189
165
190
166
# Reading properties of test.properties file
191
167
function getProperty() {
192
- PROP_KEY=$1
193
- PROP_VALUE=` cat $PROPERTY_FILE | grep " $PROP_KEY " | cut -d' =' -f 2-`
194
- echo ` sed -e ' s/^"//' -e ' s/"$//' <<< " $PROP_VALUE" `
168
+ PROP_KEY=$1
169
+ PROP_VALUE=` cat $PROPERTY_FILE | grep " $PROP_KEY " | cut -d' =' -f 2-`
170
+ echo ` sed -e ' s/^"//' -e ' s/"$//' <<< " $PROP_VALUE" `
195
171
}
196
172
197
173
# Used for external_custom tests
198
174
function set_external_custom_test_info(){
199
- test=$1
200
- check_external_custom_test=$2
201
- github_url=" ${EXTERNAL_CUSTOM_REPO} "
202
- test_command=" ${EXTERNAL_TEST_CMD} "
203
- test_results=" testResults"
204
- tag_version=" ${EXTERNAL_REPO_BRANCH} "
205
- environment_variable=" MODE=java"
206
- ubuntu_packages=" git"
207
- maven_version=" 3.8.5"
175
+ test=$1
176
+ check_external_custom_test=$2
177
+ github_url=" ${EXTERNAL_CUSTOM_REPO} "
178
+ test_command=" ${EXTERNAL_TEST_CMD} "
179
+ test_results=" testResults"
180
+ tag_version=" ${EXTERNAL_REPO_BRANCH} "
181
+ environment_variable=" MODE=java"
182
+ ubuntu_packages=" git"
183
+ maven_version=" 3.8.5"
208
184
}
209
185
210
186
# Set the valid OSes for the current architectures.
211
187
function set_test_info() {
212
- test=$1
213
- check_external_custom_test=$2
214
- cd ../
215
- path_to_file=$( pwd)
216
- echo ${path_to_file}
217
- PROPERTY_FILE=${path_to_file} /${test} /test.properties
218
- github_url=$( getProperty " github_url" )
219
- test_options=$( getProperty " test_options" )
220
- test_results=$( getProperty " test_results" )
221
- ant_version=$( getProperty " ant_version" )
222
- ant_contrib_version=$( getProperty " ant_contrib_version" )
223
- ivy_version=$( getProperty " ivy_version" )
224
- jdk_install=$( getProperty " jdk_install" )
225
- tag_version=$( getProperty " tag_version" )
226
- gradle_version=$( getProperty " gradle_version" )
227
- sbt_version=$( getProperty " sbt_version" )
228
- bazel_version=$( getProperty " bazel_version" )
229
- openssl_version=$( getProperty " openssl_version" )
230
- python_version=$( getProperty " python_version" )
231
- criu_version=$( getProperty " criu_version" )
232
- maven_version=$( getProperty " maven_version" )
233
- environment_variable=$( getProperty " environment_variable" )
234
- localPropertyFile=$( getProperty " localPropertyFile" )
235
- ubuntu_packages=$( getProperty " ubuntu_packages" )
236
- ubi_packages=$( getProperty " ubi_packages" )
188
+ test=$1
189
+ check_external_custom_test=$2
190
+ cd ../
191
+ path_to_file=$( pwd)
192
+ echo ${path_to_file}
193
+ PROPERTY_FILE=${path_to_file} /${test} /test.properties
194
+ github_url=$( getProperty " github_url" )
195
+ test_options=$( getProperty " test_options" )
196
+ test_results=$( getProperty " test_results" )
197
+ ant_version=$( getProperty " ant_version" )
198
+ ant_contrib_version=$( getProperty " ant_contrib_version" )
199
+ ivy_version=$( getProperty " ivy_version" )
200
+ jdk_install=$( getProperty " jdk_install" )
201
+ tag_version=$( getProperty " tag_version" )
202
+ gradle_version=$( getProperty " gradle_version" )
203
+ sbt_version=$( getProperty " sbt_version" )
204
+ bazel_version=$( getProperty " bazel_version" )
205
+ openssl_version=$( getProperty " openssl_version" )
206
+ python_version=$( getProperty " python_version" )
207
+ criu_version=$( getProperty " criu_version" )
208
+ maven_version=$( getProperty " maven_version" )
209
+ environment_variable=$( getProperty " environment_variable" )
210
+ localPropertyFile=$( getProperty " localPropertyFile" )
211
+ ubuntu_packages=$( getProperty " ubuntu_packages" )
212
+ ubi_packages=$( getProperty " ubi_packages" )
237
213
}
238
214
239
215
function cleanup_images() {
240
- # Delete any old containers that have exited.
241
- docker rm $( docker ps -a | grep " Exited" | awk ' { print $1 }' ) 2> /dev/null
216
+ # Delete any old containers that have exited.
217
+ docker rm $( docker ps -a | grep " Exited" | awk ' { print $1 }' ) 2> /dev/null
242
218
243
- # Delete any old images for our target_repo on localhost.
244
- docker rmi -f $( docker images | grep -e " adoptopenjdk" | awk ' { print $3 }' | sort | uniq) 2> /dev/null
219
+ # Delete any old images for our target_repo on localhost.
220
+ docker rmi -f $( docker images | grep -e " adoptopenjdk" | awk ' { print $3 }' | sort | uniq) 2> /dev/null
245
221
}
0 commit comments