Skip to content

Commit 85f6232

Browse files
author
Hasnain Virk
authored
Merge pull request #4 from ARMmbed/minor_changes
Updating jenkins file
2 parents 237cbf7 + 561bcca commit 85f6232

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

Jenkinsfile

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ if ( params.smoke_test == true ) {
7070
def raasPort = raas.get(suite_to_run)
7171
// Parallel execution needs unique step names. Remove .json file ending.
7272
def smokeStep = "${raasPort} ${suite_to_run.substring(0, suite_to_run.indexOf('.'))}"
73-
parallelRunSmoke[smokeStep] = run_smoke(targets, toolchains, raasPort, suite_to_run, modems)
73+
parallelRunSmoke[smokeStep] = run_smoke(target_families, raasPort, suite_to_run, toolchains, targets)
7474
}
7575
}
7676

@@ -110,7 +110,7 @@ def buildStep(target_family, target, compilerLabel, toolchain) {
110110
}
111111
}
112112

113-
def run_smoke(targets, toolchains, raasPort, suite_to_run, modems) {
113+
def run_smoke(target_families, raasPort, suite_to_run, toolchains, targets) {
114114
return {
115115
// Remove .json from suite name
116116
def suiteName = suite_to_run.substring(0, suite_to_run.indexOf('.'))
@@ -124,19 +124,26 @@ def run_smoke(targets, toolchains, raasPort, suite_to_run, modems) {
124124

125125
dir("testcases") {
126126
execute("git checkout master")
127-
dir("6lowpan") {
127+
dir("cellular") {
128128
execute("git checkout master")
129129
}
130130
}
131-
132-
for (int i = 0; i < targets.size(); i++) {
133-
for(int j = 0; j < toolchains.size(); j++) {
134-
def target = targets.keySet().asList().get(i)
135-
def allowed_modems = targets.get(target)
136-
def toolchain = toolchains.keySet().asList().get(j)
131+
132+
for (int i = 0; i < target_families.size(); i++) {
133+
for(int j = 0; j < toolchains.size(); j++) {
134+
for(int k = 0; k < targets.size(); k++) {
135+
def target_family = target_families.keySet().asList().get(i)
136+
def allowed_target_type = target_families.get(target_family)
137+
def target = targets.get(k)
138+
def toolchain = toolchains.keySet().asList().get(j)
139+
140+
if(allowed_target_type.contains(target)) {
141+
unstash "${target}_${toolchain}"
137142
}
138-
}
139-
143+
}
144+
}
145+
}
146+
140147
env.RAAS_USERNAME = "user"
141148
env.RAAS_PASSWORD = "user"
142149
execute("python clitest.py --suitedir testcases/suites/ --suite ${suite_to_run} --type hardware --reset --raas 193.208.80.31:${raasPort} --tcdir testcases/cellular --failure_return_value -vvv -w --log log_${raasPort}_${suiteName}")

0 commit comments

Comments
 (0)