Skip to content

Commit

Permalink
Pull request #92: MATTER-725: set build as unstable if there are any …
Browse files Browse the repository at this point in the history
…unstable test

Merge in WMN_TOOLS/matter from bugfix/MATTER-725 to silabs

Squashed commit of the following:

commit f20eecdb8bf9039d285af32d5dd69250f216d45b
Author: Yulina Shu <Yulina.Shu@silabs.com>
Date:   Sun Sep 11 15:50:36 2022 -0400

    MATTER-725: set build as unstable if there are any unstable test
  • Loading branch information
silabsbot authored and jmartinez-silabs committed Oct 7, 2022
1 parent b08ca20 commit e4ad5f8
Showing 1 changed file with 20 additions and 24 deletions.
44 changes: 20 additions & 24 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ def initWorkspaceAndScm()
sh 'cd ../../../'
sh 'git submodule set-url ./third_party/silabs/gecko_sdk https://stash.silabs.com/scm/embsw/gecko_sdk_release.git'



// Matter Init --Checkout relevant submodule
sh 'scripts/checkout_submodules.py --shallow --recursive --platform efr32'
}
Expand Down Expand Up @@ -187,10 +185,9 @@ def buildSilabsCustomOpenThreadExamples(board)
}
}
}
stash name: 'CustomOpenThreadExamples', includes: 'out/**/*.map ,'+
'out/**/*.s37 '


stash name: 'CustomOpenThreadExamples', includes: 'out/**/*.s37 '


}
deactivateWorkspaceOverlay(advanceStageMarker.getBuildStagesList(),
workspaceTmpDir,
Expand Down Expand Up @@ -318,10 +315,9 @@ def exportIoTReports()
}
}

def openThreadTestSuite(String name, String board)
def openThreadTestSuite(name, board)
{
// lock(label: 'Matter-Testbed', quantity: 1, variable: 'matter-testbed', skipIfLocked : true)
lock('Matter-Testbed')
lock('Matter-Testbed')
{
node('gsdkBostonNode')
{
Expand All @@ -344,10 +340,10 @@ def openThreadTestSuite(String name, String board)
git pull
'''
}
catchError(buildResult: 'UNSTABLE',
catchInterruptions: false,
message: "[ERROR] One or more openthread tests have failed",
stageResult: 'SUCCESS')
catchError(buildResult: 'UNSTABLE',
catchInterruptions: false,
message: "[ERROR] One or more openthread tests have failed",
stageResult: 'UNSTABLE')
{
dir('matter')
{
Expand Down Expand Up @@ -408,7 +404,7 @@ def openThreadTestSuite(String name, String board)
}
}

def utfThreadTestSuite(String devicegoup,String testbed_name,String app_name, String matter_type , String board, String test_suite, String manifestyaml, String testsequenceyaml )
def utfThreadTestSuite(devicegoup,testbed_name,app_name, matter_type , board, test_suite, manifestyaml, testsequenceyaml )
{
globalLock(credentialsId: 'hwmux_token_matterci', deviceGroup: devicegoup) {
node("gsdkMontrealNode")
Expand Down Expand Up @@ -490,10 +486,10 @@ def utfThreadTestSuite(String devicegoup,String testbed_name,String app_name, St
'DEBUG=true'
])
{
catchError(buildResult: 'UNSTABLE',
catchInterruptions: false,
message: "[ERROR] One or more tests have failed",
stageResult: 'SUCCESS')
catchError(buildResult: 'UNSTABLE',
catchInterruptions: false,
message: "[ERROR] One or more tests have failed",
stageResult: 'UNSTABLE')
{
sh """
echo ${TESTBED_NAME}
Expand All @@ -512,7 +508,7 @@ def utfThreadTestSuite(String devicegoup,String testbed_name,String app_name, St
}


def utfWiFiTestSuite(String devicegoup,String testbed_name,String app_name,String matter_type, String board, String wifi_module, String test_suite, String manifestyaml, String testsequenceyaml)
def utfWiFiTestSuite(devicegoup, testbed_name, app_name, matter_type, board, wifi_module, test_suite,manifestyaml, testsequenceyaml)
{
globalLock(credentialsId: 'hwmux_token_matterci', deviceGroup: devicegoup) {
node("gsdkMontrealNode")
Expand Down Expand Up @@ -593,10 +589,10 @@ def utfWiFiTestSuite(String devicegoup,String testbed_name,String app_name,Strin
'DEBUG=true'
])
{
catchError(buildResult: 'UNSTABLE',
catchInterruptions: false,
message: "[ERROR] One or more tests have failed",
stageResult: 'SUCCESS')
catchError(buildResult: 'UNSTABLE',
catchInterruptions: false,
message: "[ERROR] One or more tests have failed",
stageResult: 'UNSTABLE')
{
// pytestParam="\"pytest --tb=native tests${test_suite} --manifest manifest${manifestyaml}.yaml ${testsequenceyaml}\""
sh """
Expand Down Expand Up @@ -626,7 +622,7 @@ def pushToNexus()
def saveDir = 'matter/'
dir(dirPath) {

withVault([vaultSecrets: secrets])
withCredentials([usernamePassword(credentialsId: 'svc_gsdk', passwordVariable: 'SL_PASSWORD', usernameVariable: 'SL_USERNAME')])
{

sh '''#!/usr/bin/env bash
Expand Down

0 comments on commit e4ad5f8

Please sign in to comment.