blob: 45cb315d7968162bb18286a190b79580f2ce51a5 [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" );
6// This is a Jenkinsfile for a scripted pipeline for the SR tests
7def prop = null
8prop = funcs.getProperties()
Devin Lim86e40532018-04-06 12:44:06 -07009funcs.additionalInitForSR( prop[ "ONOSBranch" ] )
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -080010SR = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "SR" ]
11
Devin Limd1fb8e92018-02-28 16:29:33 -080012graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
Devin Lim86e40532018-04-06 12:44:06 -070013graph_saved_directory = "/var/jenkins/workspace/postjob-Fabric" + funcs.fabricOn( prop[ "ONOSBranch" ] ) + "/"
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -080014
Devin Limd1fb8e92018-02-28 16:29:33 -080015echo( "Testcases:" )
16def testsToRun = null
17testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
18funcs.printTestToRun( testsToRun )
19
20def tests = [:]
21for( String test : SR.keySet() ){
22 toBeRun = testsToRun.contains( test )
23 def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
24 tests[stepName] = funcs.runTest( test, toBeRun, prop, test, false, SR, graph_generator_file, graph_saved_directory )
25}
26
27start = funcs.getCurrentTime()
28// run the tests
29for ( test in tests.keySet() ){
30 tests[ test ].call()
31}
32//funcs.generateOverallGraph( prop, SR, graph_saved_directory )
33funcs.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] )