blob: 5f039b5445b5bcb810880c97883a748f7f3ef84a [file] [log] [blame]
#!groovy
SCPFfuncs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/PerformanceFuncs.groovy' )
SCPFfuncs.init()
funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/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" ] == "true"
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" ] )