blob: 95b18d5634500a7f1927ef7c78cd26dd4aa10149 [file] [log] [blame]
Devin Limd1fb8e92018-02-28 16:29:33 -08001#!groovy
Devin Limf5bf9b52018-02-28 18:16:21 -08002funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -08003test_lists = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsTestONTests.groovy' )
Devin Limfe9a4cb2018-05-11 17:06:21 -07004fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsPathAndFiles.groovy' )
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -08005
Devin Limfe9a4cb2018-05-11 17:06:21 -07006fileRelated.init()
Devin Limd1fb8e92018-02-28 16:29:33 -08007funcs.initialize( "SR" );
Devin Lim35df4e62018-04-06 17:58:58 -07008jobName = env.JOB_NAME
Devin Limc4054d52018-04-13 18:58:33 -07009funcs.additionalInitForSR( jobName )
Devin Limd1fb8e92018-02-28 16:29:33 -080010// This is a Jenkinsfile for a scripted pipeline for the SR tests
11def prop = null
12prop = funcs.getProperties()
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -080013SR = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "SR" ]
14
Devin Limfe9a4cb2018-05-11 17:06:21 -070015graph_generator_file = fileRelated.trendIndividual
16graph_saved_directory = fileRelated.jenkinsWorkspace + "postjob-Fabric" + funcs.fabricOn( prop[ "ONOSBranch" ] ) + "/"
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -080017
Devin Limd1fb8e92018-02-28 16:29:33 -080018echo( "Testcases:" )
19def testsToRun = null
20testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
21funcs.printTestToRun( testsToRun )
22
23def tests = [:]
24for( String test : SR.keySet() ){
25 toBeRun = testsToRun.contains( test )
26 def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
27 tests[stepName] = funcs.runTest( test, toBeRun, prop, test, false, SR, graph_generator_file, graph_saved_directory )
28}
29
30start = funcs.getCurrentTime()
31// run the tests
32for ( test in tests.keySet() ){
33 tests[ test ].call()
34}
35//funcs.generateOverallGraph( prop, SR, graph_saved_directory )
Devin Limc4054d52018-04-13 18:58:33 -070036funcs.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] )