Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 1 | #!groovy |
Devin Lim | b734ea5 | 2018-05-14 14:13:05 -0700 | [diff] [blame] | 2 | funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' ) |
| 3 | fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy' ) |
Devin Lim | fe9a4cb | 2018-05-11 17:06:21 -0700 | [diff] [blame] | 4 | |
| 5 | fileRelated.init() |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 6 | nodeCluster = params.NodeCluster |
| 7 | |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 8 | funcs.initializeTrend( nodeCluster ); |
Devin Lim | 981f80b | 2018-04-09 11:25:59 -0700 | [diff] [blame] | 9 | if( nodeCluster == "Fabric" ) |
| 10 | funcs.additionalInitForSR( params.ONOSbranch ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 11 | def prop = null |
| 12 | prop = funcs.getProperties() |
| 13 | |
| 14 | def Tests = params.Test |
| 15 | prop[ "ONOSBranch" ] = params.ONOSbranch |
| 16 | |
Devin Lim | 86e4053 | 2018-04-06 12:44:06 -0700 | [diff] [blame] | 17 | |
Devin Lim | fe9a4cb | 2018-05-11 17:06:21 -0700 | [diff] [blame] | 18 | graph_generator_file = fileRelated.trendIndividual |
| 19 | graph_saved_directory = fileRelated.jenkinsWorkspace + "postjob-" + nodeCluster + ( nodeCluster == "Fabric" ? funcs.fabricOn( prop[ "ONOSBranch" ] ) : "" ) + "/" |
Devin Lim | 86e4053 | 2018-04-06 12:44:06 -0700 | [diff] [blame] | 20 | |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 21 | def testsToRun = null |
| 22 | testsToRun = funcs.getTestsToRun( Tests ) |
| 23 | |
| 24 | def tests = [:] |
| 25 | for( String test : testsToRun ){ |
| 26 | println test |
| 27 | tests[ test ] = funcs.runTest( test, true, prop, test, true, [], graph_generator_file, graph_saved_directory ) |
| 28 | } |
| 29 | |
| 30 | for ( test in tests.keySet() ){ |
| 31 | tests[ test ].call() |
Devin Lim | 981f80b | 2018-04-09 11:25:59 -0700 | [diff] [blame] | 32 | } |