@@ -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