blob: b3e2c0ffd52dca74eed3b3f3ea69ed4a6f962687 [file] [log] [blame]
Devin Limd1fb8e92018-02-28 16:29:33 -08001#!groovy
2funcs = evaluate readTrusted( 'JenkinsCommonFuncs.groovy' )
3funcs.initialize( "SR" );
4// This is a Jenkinsfile for a scripted pipeline for the SR tests
5def prop = null
6prop = funcs.getProperties()
7SR = [
8"SRBridging" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SR Bridging", wiki_file:"SRBridgingWiki.txt" ],
9"SRRouting" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SR Routing", wiki_file:"SRRoutingWiki.txt" ]
10]
11graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
12graph_saved_directory = "/var/jenkins/workspace/postjob-VM/"
13echo( "Testcases:" )
14def testsToRun = null
15testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
16funcs.printTestToRun( testsToRun )
17
18def tests = [:]
19for( String test : SR.keySet() ){
20 toBeRun = testsToRun.contains( test )
21 def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
22 tests[stepName] = funcs.runTest( test, toBeRun, prop, test, false, SR, graph_generator_file, graph_saved_directory )
23}
24
25start = funcs.getCurrentTime()
26// run the tests
27for ( test in tests.keySet() ){
28 tests[ test ].call()
29}
30//funcs.generateOverallGraph( prop, SR, graph_saved_directory )
31funcs.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] )