blob: 79f887ea1103b79f10317d706f04129f8e96a864 [file] [log] [blame]
Devin Lim90803a82017-08-29 13:41:44 -07001#!groovy
Devin Lim81ab48b2018-02-09 14:24:57 -08002funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -08003test_lists = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsTestONTests.groovy' )
4
Devin Lim61643762017-12-07 15:55:38 -08005funcs.initialize( "HA" );
Devin Lim90803a82017-08-29 13:41:44 -07006// This is a Jenkinsfile for a scripted pipeline for the HA tests
Devin Lim90803a82017-08-29 13:41:44 -07007def prop = null
Devin Lim61643762017-12-07 15:55:38 -08008prop = funcs.getProperties()
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -08009HA = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "HA" ]
Devin Lim90803a82017-08-29 13:41:44 -070010
Jeremy Ronquillo2d2649d2017-09-14 12:53:06 -070011graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
Devin Lim61643762017-12-07 15:55:38 -080012graph_saved_directory = "/var/jenkins/workspace/postjob-VM/"
Devin Lim90803a82017-08-29 13:41:44 -070013
Devin Lim61643762017-12-07 15:55:38 -080014echo( "Testcases:" )
Devin Lim90803a82017-08-29 13:41:44 -070015def testsToRun = null
Devin Lim61643762017-12-07 15:55:38 -080016testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
17funcs.printTestToRun( testsToRun )
Devin Lim90803a82017-08-29 13:41:44 -070018
19def tests = [:]
20for( String test : HA.keySet() ){
21 toBeRun = testsToRun.contains( test )
22 def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
Devin Lim61643762017-12-07 15:55:38 -080023 tests[stepName] = funcs.runTest( test, toBeRun, prop, test, false, HA, graph_generator_file, graph_saved_directory )
Devin Lim90803a82017-08-29 13:41:44 -070024}
25
Devin Lim61643762017-12-07 15:55:38 -080026start = funcs.getCurrentTime()
Devin Lim90803a82017-08-29 13:41:44 -070027// run the tests
28for ( test in tests.keySet() ){
Devin Lim61643762017-12-07 15:55:38 -080029 tests[ test ].call()
Devin Lim90803a82017-08-29 13:41:44 -070030}
Devin Lim61643762017-12-07 15:55:38 -080031funcs.generateOverallGraph( prop, HA, graph_saved_directory )
32funcs.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] )