Devin Lim | d1fb8e9 | 2018-02-28 16:29:33 -0800 | [diff] [blame] | 1 | #!groovy |
Devin Lim | f5bf9b5 | 2018-02-28 18:16:21 -0800 | [diff] [blame] | 2 | funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' ) |
Jeremy Ronquillo | 14ecc17 | 2018-03-05 09:57:17 -0800 | [diff] [blame] | 3 | test_lists = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsTestONTests.groovy' ) |
| 4 | |
Devin Lim | d1fb8e9 | 2018-02-28 16:29:33 -0800 | [diff] [blame] | 5 | funcs.initialize( "SR" ); |
| 6 | // This is a Jenkinsfile for a scripted pipeline for the SR tests |
| 7 | def prop = null |
| 8 | prop = funcs.getProperties() |
Jeremy Ronquillo | 14ecc17 | 2018-03-05 09:57:17 -0800 | [diff] [blame] | 9 | SR = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "SR" ] |
| 10 | |
Devin Lim | d1fb8e9 | 2018-02-28 16:29:33 -0800 | [diff] [blame] | 11 | graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R" |
| 12 | graph_saved_directory = "/var/jenkins/workspace/postjob-VM/" |
Jeremy Ronquillo | 14ecc17 | 2018-03-05 09:57:17 -0800 | [diff] [blame] | 13 | |
Devin Lim | d1fb8e9 | 2018-02-28 16:29:33 -0800 | [diff] [blame] | 14 | echo( "Testcases:" ) |
| 15 | def testsToRun = null |
| 16 | testsToRun = funcs.getTestsToRun( prop[ "Tests" ] ) |
| 17 | funcs.printTestToRun( testsToRun ) |
| 18 | |
| 19 | def tests = [:] |
| 20 | for( String test : SR.keySet() ){ |
| 21 | toBeRun = testsToRun.contains( test ) |
| 22 | def stepName = ( toBeRun ? "" : "Not " ) + "Running $test" |
| 23 | tests[stepName] = funcs.runTest( test, toBeRun, prop, test, false, SR, graph_generator_file, graph_saved_directory ) |
| 24 | } |
| 25 | |
| 26 | start = funcs.getCurrentTime() |
| 27 | // run the tests |
| 28 | for ( test in tests.keySet() ){ |
| 29 | tests[ test ].call() |
| 30 | } |
| 31 | //funcs.generateOverallGraph( prop, SR, graph_saved_directory ) |
| 32 | funcs.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] ) |