blob: c9c00e5ec0538d0b971709013b57f55e06672710 [file] [log] [blame]
#!groovy
funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
test_lists = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy' )
fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy' )
fileRelated.init()
funcs.initialize( "SR" );
jobName = env.JOB_NAME
funcs.additionalInitForSR( jobName )
// This is a Jenkinsfile for a scripted pipeline for the SR tests
def prop = null
prop = funcs.getProperties()
SR = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "SR" ]
graph_generator_file = fileRelated.trendIndividual
graph_saved_directory = fileRelated.jenkinsWorkspace + "postjob-Fabric" + funcs.fabricOn( prop[ "ONOSBranch" ] ) + "/"
echo( "Testcases:" )
def testsToRun = null
testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
funcs.printTestToRun( testsToRun )
def tests = [:]
for( String test : SR.keySet() ){
toBeRun = testsToRun.contains( test )
def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
tests[stepName] = funcs.runTest( test, toBeRun, prop, test, false, SR, graph_generator_file, graph_saved_directory )
}
start = funcs.getCurrentTime()
// run the tests
for ( test in tests.keySet() ){
tests[ test ].call()
}
//funcs.generateOverallGraph( prop, SR, graph_saved_directory )
funcs.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] )