blob: 4869f1ecabb277d2cc907260a79a871b1fa7eb76 [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' )
4
Devin Limd1fb8e92018-02-28 16:29:33 -08005funcs.initialize( "SR" );
Devin Lim35df4e62018-04-06 17:58:58 -07006jobName = env.JOB_NAME
Devin Lim5b22fbb2018-04-06 15:30:45 -07007funcs.additionalInitForSR( jobName.reverse().take(6).reverse() )
Devin Limd1fb8e92018-02-28 16:29:33 -08008// This is a Jenkinsfile for a scripted pipeline for the SR tests
9def prop = null
10prop = funcs.getProperties()
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -080011SR = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "SR" ]
12
Devin Limd1fb8e92018-02-28 16:29:33 -080013graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
Devin Lim86e40532018-04-06 12:44:06 -070014graph_saved_directory = "/var/jenkins/workspace/postjob-Fabric" + funcs.fabricOn( prop[ "ONOSBranch" ] ) + "/"
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -080015
Devin Limd1fb8e92018-02-28 16:29:33 -080016echo( "Testcases:" )
17def testsToRun = null
18testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
19funcs.printTestToRun( testsToRun )
20
21def tests = [:]
22for( String test : SR.keySet() ){
23 toBeRun = testsToRun.contains( test )
24 def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
25 tests[stepName] = funcs.runTest( test, toBeRun, prop, test, false, SR, graph_generator_file, graph_saved_directory )
26}
27
28start = funcs.getCurrentTime()
29// run the tests
30for ( test in tests.keySet() ){
31 tests[ test ].call()
32}
33//funcs.generateOverallGraph( prop, SR, graph_saved_directory )
34funcs.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] )