Skip to content

Commit 9963066

Browse files
author
Hasnain Virk
committed
Counter-measures against proposed testcases/ deletion
mbed-clitest will soon get rid of testcases/ folder which contains various test cases and test suites. New location as a submodule will be inside nanomesh-applications. However, in order to keep cellular work seperate and transparent, we have changed the jenkins file to clone mbed-clitest-suites directly and then updating the paths accordingly.
1 parent f209eaa commit 9963066

File tree

2 files changed

+32
-33
lines changed

2 files changed

+32
-33
lines changed

Jenkinsfile

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

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

2323
// List of targets with supported modem families
@@ -85,7 +85,7 @@ def buildStep(target_family, target, compilerLabel, toolchain) {
8585
stage ("${target_family}_${target}_${compilerLabel}") {
8686
node ("${compilerLabel}") {
8787
deleteDir()
88-
dir("mbed-os-example-cellular-minimal") {
88+
dir("mbed-os-example-cellular") {
8989
checkout scm
9090
def config_file = "mbed_app.json"
9191

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

104104
execute ("mbed compile --build out/${target}_${toolchain}/ -m ${target} -t ${toolchain} -c --app-config ${config_file}")
105105
}
106-
stash name: "${target}_${toolchain}", includes: '**/mbed-os-example-cellular-minimal.bin'
107-
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'
108108
step([$class: 'WsCleanup'])
109109
}
110110
}
@@ -113,6 +113,8 @@ def buildStep(target_family, target, compilerLabel, toolchain) {
113113

114114
def run_smoke(target_families, raasPort, suite_to_run, toolchains, targets) {
115115
return {
116+
env.RAAS_USERNAME = "user"
117+
env.RAAS_PASSWORD = "user"
116118
// Remove .json from suite name
117119
def suiteName = suite_to_run.substring(0, suite_to_run.indexOf('.'))
118120
stage ("smoke_${raasPort}_${suiteName}") {
@@ -122,36 +124,33 @@ def run_smoke(target_families, raasPort, suite_to_run, toolchains, targets) {
122124
dir("mbed-clitest") {
123125
git "[email protected]:ARMmbed/mbed-clitest.git"
124126
execute("git checkout master")
125-
execute("git submodule update --init --recursive testcases")
126-
127-
dir("testcases") {
127+
dir("mbed-clitest-suites") {
128+
git "[email protected]:ARMmbed/mbed-clitest-suites.git"
129+
execute("git submodule update --init --recursive")
128130
execute("git all checkout master")
129-
execute("git submodule update --init --recursive cellular")
130-
execute("git all checkout master")
131-
}
132-
133-
for (int i = 0; i < target_families.size(); i++) {
134-
for(int j = 0; j < toolchains.size(); j++) {
135-
for(int k = 0; k < targets.size(); k++) {
136-
def target_family = target_families.keySet().asList().get(i)
137-
def allowed_target_type = target_families.get(target_family)
138-
def target = targets.get(k)
139-
def toolchain = toolchains.keySet().asList().get(j)
140-
141-
if(allowed_target_type.contains(target)) {
142-
unstash "${target}_${toolchain}"
131+
dir("cellular") {
132+
execute("git checkout master")
143133
}
144-
}
145-
}
146-
}
147-
148-
env.RAAS_USERNAME = "user"
149-
env.RAAS_PASSWORD = "user"
150-
if (target == "MTS_DRAGONFLY_F411RE") {
151-
execute("python clitest.py --suitedir testcases/suites/ --suite ${suite_to_run} --type hardware --reset hard --raas 193.208.80.31:${raasPort} --tcdir testcases/cellular --failure_return_value -vvv -w --log log_${raasPort}_${suiteName}")
152134
}
153-
else {
154-
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}")
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+
}
148+
}
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}")
155154
}
156155
archive "log_${raasPort}_${suiteName}/**/*"
157156
}

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)