Devin Lim | d1fb8e9 | 2018-02-28 16:29:33 -0800 | [diff] [blame^] | 1 | #!groovy |
| 2 | funcs = evaluate readTrusted( 'JenkinsCommonFuncs.groovy' ) |
| 3 | funcs.initialize( "SR" ); |
| 4 | // This is a Jenkinsfile for a scripted pipeline for the SR tests |
| 5 | def prop = null |
| 6 | prop = funcs.getProperties() |
| 7 | SR = [ |
| 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 | ] |
| 11 | graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R" |
| 12 | graph_saved_directory = "/var/jenkins/workspace/postjob-VM/" |
| 13 | echo( "Testcases:" ) |
| 14 | def testsToRun = null |
| 15 | testsToRun = funcs.getTestsToRun( prop[ "Tests" ] ) |
| 16 | funcs.printTestToRun( testsToRun ) |
| 17 | |
| 18 | def tests = [:] |
| 19 | for( 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 | |
| 25 | start = funcs.getCurrentTime() |
| 26 | // run the tests |
| 27 | for ( test in tests.keySet() ){ |
| 28 | tests[ test ].call() |
| 29 | } |
| 30 | //funcs.generateOverallGraph( prop, SR, graph_saved_directory ) |
| 31 | funcs.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] ) |