Skip to content

Commit 72ce874

Browse files
Update sqa pipelines for 25q4 release (SiliconLabsSoftware#188)
* Update sanity tests variables
1 parent f2fed05 commit 72ce874

2 files changed

Lines changed: 34 additions & 38 deletions

File tree

jenkins_integration/Jenkinsfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,23 +112,23 @@ pipeline
112112
pipelineFunctions.actionWithRetry {
113113
failed_tests_mg24 = pipelineFunctions.execute_sanity_tests(
114114
'gsdkMontrealNode','utf-matter-thread-4187c-ci',
115-
'3251', 'matter_thread_template', 'lighting-app','thread','BRD4187C',"",
115+
'3251', 'lighting-app','thread','BRD4187C',"",
116116
branch_name, env.BUILD_NUMBER)
117117
}
118118
}
119119

120120
parallelNodes['SIWX Lighting-App'] = {
121121
pipelineFunctions.actionWithRetry {
122122
failed_tests_917 = pipelineFunctions.execute_sanity_tests(
123-
'gsdkMontrealNode','utf-matter-wifi-917soc-4338a-ci', '3249', 'matter_wifi_soc_template',
123+
'gsdkMontrealNode','utf-matter-wifi-917soc-4338a-ci', '3249',
124124
'lighting-app','wifi','BRD4338A','917_soc', branch_name, env.BUILD_NUMBER)
125125
}
126126
}
127127
parallelNodes['SiMG301 Lighting-App'] = {
128128
pipelineFunctions.actionWithRetry {
129129
failed_tests_4407a = pipelineFunctions.execute_sanity_tests(
130130
'gsdkMontrealNode','utf-matter-thread-4407a-ci',
131-
'4878', 'matter_thread_template', 'lighting-app','thread','BRD4407A',"",
131+
'4878', 'lighting-app','thread','BRD4407A',"",
132132
branch_name, env.BUILD_NUMBER)
133133
}
134134
}
@@ -183,7 +183,7 @@ pipeline
183183
}
184184
steps {
185185
script {
186-
pipelineFunctions.trigger_sqa_pipelines("smoke", env.BUILD_NUMBER)
186+
pipelineFunctions.trigger_sqa_pipelines("smoke")
187187
}
188188
}
189189
}
@@ -204,11 +204,11 @@ pipeline
204204
stage('Trigger SQA Regression Pipelines')
205205
{
206206
when {
207-
expression { env.BRANCH_NAME == "main" || env.BRANCH_NAME.startsWith("release_") }
207+
expression { env.BRANCH_NAME.startsWith("release_") }
208208
}
209209
steps {
210210
script {
211-
pipelineFunctions.trigger_sqa_pipelines("regression", env.BUILD_NUMBER)
211+
pipelineFunctions.trigger_sqa_pipelines("regression")
212212
}
213213
}
214214
}

jenkins_integration/jenkinsFunctions.groovy

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def send_test_results_to_github(commit_sha, sqa_tests_result, sqa_tests_summary)
5959
}
6060
}
6161

62-
def execute_sanity_tests(nomadNode, deviceGroup, deviceGroupId, harnessTemplate, appName, matterType, board, wifi_module, branchName, formattedBuildNumber)
62+
def execute_sanity_tests(nomadNode, deviceGroup, deviceGroupId, appName, matterType, board, wifi_module, branchName, buildNumber)
6363
{
6464
def failed_test_results = [failedTests: [], failedCount: 0]
6565
globalLock(credentialsId: 'hwmux_token_matterci', deviceGroup: deviceGroup) {
@@ -112,12 +112,11 @@ def execute_sanity_tests(nomadNode, deviceGroup, deviceGroupId, harnessTemplate,
112112
"SDK_URL=N/A", // ?
113113
"STUDIO_URL=N/A", // ?
114114
"BRANCH_NAME=$branchName", // ?
115-
"SDK_BUILD_NUM=\"${formattedBuildNumber}\"",
115+
"SDK_BUILD_NUM=${buildNumber}",
116116
"TESTBED_NAME=${deviceGroup}",
117117
"GROUP_ID=${deviceGroupId}",
118-
"HARNESS_TEMPLATE=${harnessTemplate}",
119118
"BUILD_URL=$BUILD_URL",
120-
"JENKIN_RUN_NUM=\"${formattedBuildNumber}\"",
119+
"JENKIN_RUN_NUM=${buildNumber}",
121120
"JENKINS_JOB_NAME=$JOB_NAME",
122121
"JENKINS_SERVER_NAME=$JENKINS_URL",
123122
"JENKINS_TEST_RESULTS_URL=$JOB_URL$BUILD_NUMBER/testReport",
@@ -145,7 +144,7 @@ def execute_sanity_tests(nomadNode, deviceGroup, deviceGroupId, harnessTemplate,
145144
echo ${TESTBED_NAME}
146145
${commanderPath} --version
147146
./workspace_setup.sh
148-
executor/launch_utf_tests.sh --publish_test_results true --hwmux_token ${HW_MUX_TOKEN} --hwmux_group_id ${GROUP_ID} --harness ${HARNESS_TEMPLATE}.yaml --render_harness_template --executor_type local --pytest_command "pytest --tb=native -m ${matterType} tests/test_matter_ci.py" > ${test_log_file} 2>&1 || true
147+
executor/launch_utf_tests.sh --publish_test_results true --hwmux_token ${HW_MUX_TOKEN} --hwmux_group_id ${GROUP_ID} --harness matter_harness_template.yaml --render_harness_template --executor_type local --pytest_command "pytest --tb=native -m ${matterType} tests/ci/test_matter_ci.py" > ${test_log_file} 2>&1 || true
149148
""", returnStdout: true).trim()
150149
def output = readFile(test_log_file).trim()
151150
echo "Test log file output:\n ${output}"
@@ -174,7 +173,7 @@ def parse_test_results_failures(output) {
174173
def failedCount = 0
175174
echo "Parse test results"
176175
output.toString().eachLine { line ->
177-
def matcher = line =~ /(FAILED|ERROR)\s+tests\/test_matter(?:_(?:wifi|thread))?_ci\.py::(test_tc[\w\d_]+)\s+-\s+(.*)/
176+
def matcher = line =~ /(FAILED|ERROR)\s+tests\/ci\/test_matter_ci\.py::(test_tc[\w\d_]+)\s+-\s+(.*)/
178177
if (matcher.find()) {
179178
def testCase = "${matcher[0][2]} - ${matcher[0][3]}"
180179
unstable("Failed test: ${testCase}")
@@ -189,44 +188,41 @@ def parse_test_results_failures(output) {
189188
return [failedTests: failedTests, failedCount: failedCount]
190189
}
191190

192-
// TODO Verify if the pipelines are correct
193-
def trigger_sqa_pipelines(pipeline_type, formatted_build_number)
191+
def trigger_sqa_pipelines(pipeline_type)
194192
{
195193
if(sqaFunctions.isProductionJenkinsServer())
196194
{
197-
def regression_list_main = ['timed-regression-slc', 'timed-regression-ota', 'timed-regression-cmp', 'timed-regression-performance']
198-
def regression_list = ['regression-slc', 'regression-weekly-slc', 'regression-ota', 'regression-cmp', 'regression-endurance', 'regression-power', 'regression-rf', 'smoke-rf']
195+
def smoke_list = ['smoke-thread', 'smoke-wifi', 'smoke-cmp']
196+
def regression_list = ['feature-thread', 'feature-wifi', 'regression-thread', 'regression-wifi', 'regression-cmp',
197+
'regression-ota-thread', 'regression-ota-wifi', 'regression-ota-cmp', 'regression-metrics',
198+
'ext-regression-thread', 'ext-regression-wifi', 'ext-regression-cmp',
199+
'ext-smoke-thread', 'ext-smoke-wifi', 'ext-smoke-cmp',
200+
'endurance-thread', 'endurance-wifi', 'endurance-cmp']
199201
def errorOccurred = false
200202
try{
201203
sshagent(['svc_gsdk-ssh']) {
202204
if (!fileExists('sqa-pipelines')) {
203205
sh 'git clone ssh://git@stash.silabs.com/wmn_sqa/sqa-pipelines.git'
204206
}
205207
if(pipeline_type == "smoke") {
206-
dir('sqa-pipelines') {
207-
sqaFunctions.commitToMatterSqaPipelines("slc", "smoke", "${env.BRANCH_NAME}", "${formatted_build_number}")
208-
}
209-
} else {
210-
if(env.BRANCH_NAME.startsWith("release")){
211-
regression_list.each { regression_type ->
212-
dir('sqa-pipelines') {
213-
try{
214-
sqaFunctions.commitToMatterSqaPipelines("slc", "regression", "${env.BRANCH_NAME}", "${formatted_build_number}")
215-
} catch (e) {
216-
unstable("Error when triggering ${regression_type}: ${e.message}")
217-
errorOccurred = true
218-
}
208+
smoke_list.each { smoke_type ->
209+
dir('sqa-pipelines') {
210+
try{
211+
sqaFunctions.commitToMatterSqaPipelines(smoke_type, "${env.BRANCH_NAME}", "${env.BUILD_NUMBER}")
212+
} catch (e) {
213+
unstable("Error when triggering ${smoke_type}: ${e.message}")
214+
errorOccurred = true
219215
}
220216
}
221-
} else {
222-
regression_list_main.each { regression_type ->
223-
dir('sqa-pipelines') {
224-
try{
225-
sqaFunctions.commitToMatterSqaPipelines("slc", "regression", "${env.BRANCH_NAME}", "${formatted_build_number}")
226-
} catch (e) {
227-
unstable("Error when triggering ${regression_type}: ${e.message}")
228-
errorOccurred = true
229-
}
217+
}
218+
} else {
219+
regression_list.each { regression_type ->
220+
dir('sqa-pipelines') {
221+
try{
222+
sqaFunctions.commitToMatterSqaPipelines(regression_type, "${env.BRANCH_NAME}", "${env.BUILD_NUMBER}")
223+
} catch (e) {
224+
unstable("Error when triggering ${regression_type}: ${e.message}")
225+
errorOccurred = true
230226
}
231227
}
232228
}

0 commit comments

Comments
 (0)