Skip to content

Commit 38b8db1

Browse files
author
Kimmo Lepikkö
authored
Merge pull request #279 from ARMmbed/fix-smoke
Fixed smoke test
2 parents 3260b4b + dc6fb88 commit 38b8db1

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

Jenkinsfile

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
properties ([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [
22
[$class: 'StringParameterDefinition', name: 'mbed_os_revision', defaultValue: '', description: 'Revision of mbed-os to build. Use format "pull/PR-NUMBER/head" to access mbed-os PR'],
3-
[$class: 'BooleanParameterDefinition', name: 'smoke_test', defaultValue: false, description: 'Enable to run HW smoke test after building']
3+
[$class: 'BooleanParameterDefinition', name: 'smoke_test', defaultValue: true, description: 'Enable to run HW smoke test after building']
44
]]])
55

66
if (params.mbed_os_revision == '') {
@@ -20,16 +20,8 @@ echo "Run smoke tests: ${params.smoke_test}"
2020
// Radios: Atmel & MCR20A
2121
// configurations: 6LP + Thread
2222
def raas = [
23-
"lowpan_mesh_minimal_smoke_k64f_atmel.json": "8001",
24-
// "lowpan_mesh_minimal_smoke_k64f_mcr20.json": "8034",
25-
// "lowpan_mesh_minimal_smoke_429zi_atmel.json": "8030",
26-
// "lowpan_mesh_minimal_smoke_429zi_mcr20.json": "8033",
27-
// "lowpan_mesh_minimal_smoke_ublox_atmel.json": "8031",
28-
// "thread_mesh_minimal_smoke_k64f_atmel.json": "8007"
29-
"thread_mesh_minimal_smoke_k64f_mcr20.json": "8034",
30-
// "thread_mesh_minimal_smoke_429zi_atmel.json": "8030",
31-
// "thread_mesh_minimal_smoke_429zi_mcr20.json": "8033",
32-
// "thread_mesh_minimal_smoke_ublox_atmel.json": "8031"
23+
"lowpan_mesh_minimal_smoke_k64f_atmel.json": "rauni",
24+
"thread_mesh_minimal_smoke_k64f_mcr20.json": "rauni"
3325
]
3426

3527
// List of targets with supported RF shields to compile
@@ -98,10 +90,10 @@ if ( params.smoke_test == true ) {
9890
// Generate smoke tests based on suite amount
9991
for(int i = 0; i < raas.size(); i++) {
10092
def suite_to_run = raas.keySet().asList().get(i)
101-
def raasPort = raas.get(suite_to_run)
93+
def raasName = raas.get(suite_to_run)
10294
// Parallel execution needs unique step names. Remove .json file ending.
103-
def smokeStep = "${raasPort} ${suite_to_run.substring(0, suite_to_run.indexOf('.'))}"
104-
parallelRunSmoke[smokeStep] = run_smoke(targets, toolchains, radioshields, meshinterfaces, raasPort, suite_to_run)
95+
def smokeStep = "${raasName} ${suite_to_run.substring(0, suite_to_run.indexOf('.'))}"
96+
parallelRunSmoke[smokeStep] = run_smoke(targets, toolchains, radioshields, meshinterfaces, raasName, suite_to_run)
10597
}
10698
}
10799

@@ -186,11 +178,11 @@ def buildStep(target, compilerLabel, toolchain, radioShield, meshInterface) {
186178
}
187179
}
188180

189-
def run_smoke(targets, toolchains, radioshields, meshinterfaces, raasPort, suite_to_run) {
181+
def run_smoke(targets, toolchains, radioshields, meshinterfaces, raasName, suite_to_run) {
190182
return {
191183
// Remove .json from suite name
192184
def suiteName = suite_to_run.substring(0, suite_to_run.indexOf('.'))
193-
stage ("smoke_${raasPort}_${suiteName}") {
185+
stage ("smoke_${raasName}_${suiteName}") {
194186
node ("mesh-test") {
195187
deleteDir()
196188
dir("mbed-clitest") {
@@ -218,8 +210,9 @@ def run_smoke(targets, toolchains, radioshields, meshinterfaces, raasPort, suite
218210
def toolchain = toolchains.keySet().asList().get(j)
219211
def radioshield = radioshields.get(k)
220212
def meshInterface = meshinterfaces.get(l)
221-
// Skip unwanted combination
222-
if (target == "NUCLEO_F401RE" && toolchain == "IAR") {
213+
// Skip unwanted combination & Wi-SUN compiled only with SL2P shield and vice versa
214+
if ((target == "NUCLEO_F401RE" && toolchain == "IAR") || ("${meshInterface}" == "ws" && "${radioshield}" != "S2LP")
215+
|| ("${meshInterface}" != "ws" && "${radioshield}" == "S2LP")) {
223216
continue
224217
}
225218
if(allowed_shields.contains(radioshield)) {
@@ -229,10 +222,12 @@ def run_smoke(targets, toolchains, radioshields, meshinterfaces, raasPort, suite
229222
}
230223
}
231224
}
232-
env.RAAS_USERNAME = "user"
233-
env.RAAS_PASSWORD = "user"
234-
execute("./mbed-clitest/clitest.py --tcdir testcases --suitedir testcases/suites/ --suite ${suite_to_run} --type hardware --reset --raas http://rauni.mbedcloudtesting.com/ --raas_share_allocs --failure_return_value -vvv -w --log log_${raasPort}_${suiteName}")
235-
archive "log_${raasPort}_${suiteName}/**/*"
225+
env.RAAS_USERNAME = "ci"
226+
env.RAAS_PASSWORD = "ci"
227+
execute("./mbed-clitest/clitest.py --tcdir testcases --suitedir testcases/suites/ --suite ${suite_to_run} --type hardware --reset \
228+
--raas https://${raasName}.mbedcloudtesting.com:443 --raas_share_allocs --raas_queue --raas_queue_timeout 1800 --failure_return_value \
229+
-v -w --log log_${raasName}_${suiteName}")
230+
archive "log_${raasName}_${suiteName}/**/*"
236231
}
237232
}
238233
}

0 commit comments

Comments
 (0)