blob: 03913b619bc1226083ba8bf9aa52d37e873f8004 [file] [log] [blame]
#!groovy
SCPFfuncs = evaluate readTrusted( 'TestON/JenkinsFile/PerformanceFuncs.groovy' )
SCPFfuncs.init()
funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
funcs.initialize( "SCPF", SCPFfuncs );
// This is a Jenkinsfile for a scripted pipeline for the SCPF tests
def prop = null
prop = funcs.getProperties()
echo( "Testcases:" )
def testsToRun = null
testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
funcs.printTestToRun( testsToRun )
isOldFlow = prop[ "isOldFlow" ]
SCPFfuncs.oldFlowRuleCheck( isOldFlow, prop[ "ONOSBranch" ] )
def tests = [:]
for( String test : SCPFfuncs.SCPF.keySet() ){
toBeRun = testsToRun.contains( test )
def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
pureTestName = test.replaceAll( "WithFlowObj", "" )
tests[ stepName ] = funcs.runTest( test, toBeRun, prop, pureTestName, false, SCPFfuncs.SCPF, "", "" )
}
start = funcs.getCurrentTime()
// run the tests
for ( test in tests.keySet() ){
tests[ test ].call()
}
funcs.sendResultToSlack( start, prop["manualRun"], prop[ "WikiPrefix" ] )