Skip to content

Commit 7a9f8d2

Browse files
author
Hasnain Virk
authored
Merge pull request #10 from ARMmbed/update
Adding Dragonfly HW smoke test
2 parents ff77541 + 9963066 commit 7a9f8d2

File tree

2 files changed

+35
-30
lines changed

2 files changed

+35
-30
lines changed

Jenkinsfile

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ try {
1616

1717
// Map RaaS instances to corresponding test suites
1818
def raas = [
19-
"cellular_minimal_smoke_ublox_c027.json": "8072"
19+
"cellular_smoke_ublox_c027.json": "8072",
20+
"cellular_smoke_mts_dragonfly.json": "8072"
2021
]
2122

2223
// List of targets with supported modem families
@@ -51,7 +52,7 @@ for (int i = 0; i < target_families.size(); i++) {
5152
def toolchain = toolchains.keySet().asList().get(j)
5253
def compilerLabel = toolchains.get(toolchain)
5354

54-
def stepName = "${target_family} ${toolchain}"
55+
def stepName = "${target} ${toolchain}"
5556
if(allowed_target_type.contains(target)) {
5657
stepsForParallel[stepName] = buildStep(target_family, target, compilerLabel, toolchain)
5758
}
@@ -84,7 +85,7 @@ def buildStep(target_family, target, compilerLabel, toolchain) {
8485
stage ("${target_family}_${target}_${compilerLabel}") {
8586
node ("${compilerLabel}") {
8687
deleteDir()
87-
dir("mbed-os-example-cellular-minimal") {
88+
dir("mbed-os-example-cellular") {
8889
checkout scm
8990
def config_file = "mbed_app.json"
9091

@@ -102,8 +103,8 @@ def buildStep(target_family, target, compilerLabel, toolchain) {
102103

103104
execute ("mbed compile --build out/${target}_${toolchain}/ -m ${target} -t ${toolchain} -c --app-config ${config_file}")
104105
}
105-
stash name: "${target}_${toolchain}", includes: '**/mbed-os-example-cellular-minimal.bin'
106-
archive '**/mbed-os-example-cellular-minimal.bin'
106+
stash name: "${target}_${toolchain}", includes: '**/mbed-os-example-cellular.bin'
107+
archive '**/mbed-os-example-cellular.bin'
107108
step([$class: 'WsCleanup'])
108109
}
109110
}
@@ -112,6 +113,8 @@ def buildStep(target_family, target, compilerLabel, toolchain) {
112113

113114
def run_smoke(target_families, raasPort, suite_to_run, toolchains, targets) {
114115
return {
116+
env.RAAS_USERNAME = "user"
117+
env.RAAS_PASSWORD = "user"
115118
// Remove .json from suite name
116119
def suiteName = suite_to_run.substring(0, suite_to_run.indexOf('.'))
117120
stage ("smoke_${raasPort}_${suiteName}") {
@@ -121,33 +124,35 @@ def run_smoke(target_families, raasPort, suite_to_run, toolchains, targets) {
121124
dir("mbed-clitest") {
122125
git "[email protected]:ARMmbed/mbed-clitest.git"
123126
execute("git checkout master")
124-
execute("git submodule update --init --recursive testcases")
125-
126-
dir("testcases") {
127-
execute("git all checkout master")
128-
execute("git submodule update --init --recursive cellular")
127+
dir("mbed-clitest-suites") {
128+
git "[email protected]:ARMmbed/mbed-clitest-suites.git"
129+
execute("git submodule update --init --recursive")
129130
execute("git all checkout master")
131+
dir("cellular") {
132+
execute("git checkout master")
133+
}
130134
}
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}"
135+
136+
for (int i = 0; i < target_families.size(); i++) {
137+
for(int j = 0; j < toolchains.size(); j++) {
138+
for(int k = 0; k < targets.size(); k++) {
139+
def target_family = target_families.keySet().asList().get(i)
140+
def allowed_target_type = target_families.get(target_family)
141+
def target = targets.get(k)
142+
def toolchain = toolchains.keySet().asList().get(j)
143+
144+
if(allowed_target_type.contains(target)) {
145+
unstash "${target}_${toolchain}"
146+
}
147+
}
142148
}
143-
}
144-
}
145-
}
146-
147-
env.RAAS_USERNAME = "user"
148-
env.RAAS_PASSWORD = "user"
149-
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}")
150-
archive "log_${raasPort}_${suiteName}/**/*"
149+
}
150+
if ("${suiteName}" == "cellular_smoke_mts_dragonfly") {
151+
execute("python clitest.py --suitedir mbed-clitest-suites/suites/ --suite ${suite_to_run} --type hardware --reset hard --raas 193.208.80.31:${raasPort} --tcdir mbed-clitest-suites/cellular --failure_return_value -vvv -w --log log_${raasPort}_${suiteName}")
152+
} else {
153+
execute("python clitest.py --suitedir mbed-clitest-suites/suites/ --suite ${suite_to_run} --type hardware --reset --raas 193.208.80.31:${raasPort} --tcdir mbed-clitest-suites/cellular --failure_return_value -vvv -w --log log_${raasPort}_${suiteName}")
154+
}
155+
archive "log_${raasPort}_${suiteName}/**/*"
151156
}
152157
}
153158
}

main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int do_ntp()
127127
}
128128

129129
#if MBED_CONF_APP_PLATFORM == UBLOX
130-
UbloxCellularInterface my_iface(false, true);
130+
UbloxCellularInterface my_iface(false);
131131
#elif MBED_CONF_APP_PLATFORM == MTS_DRAGONFLY
132132
DragonFlyCellularInterface my_iface(false);
133133
#endif

0 commit comments

Comments
 (0)