blob: 61d2acf14929bef33819e3358712933fbbe99d7a [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' )
Devin Limfe9a4cb2018-05-11 17:06:21 -07004fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsPathAndFiles.groovy' )
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -08005
Devin Limfe9a4cb2018-05-11 17:06:21 -07006fileRelated.init()
Devin Lim61643762017-12-07 15:55:38 -08007funcs.initialize( "HA" );
Devin Lim90803a82017-08-29 13:41:44 -07008// This is a Jenkinsfile for a scripted pipeline for the HA tests
Devin Lim90803a82017-08-29 13:41:44 -07009def prop = null
Devin Lim61643762017-12-07 15:55:38 -080010prop = funcs.getProperties()
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -080011HA = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "HA" ]
Devin Lim90803a82017-08-29 13:41:44 -070012
Devin Limfe9a4cb2018-05-11 17:06:21 -070013graph_generator_file = fileRelated.trendIndividual
14graph_saved_directory = fileRelated.jenkinsWorkspace + "postjob-VM/"
Devin Lim90803a82017-08-29 13:41:44 -070015
Devin Lim61643762017-12-07 15:55:38 -080016echo( "Testcases:" )
Devin Lim90803a82017-08-29 13:41:44 -070017def testsToRun = null
Devin Lim61643762017-12-07 15:55:38 -080018testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
19funcs.printTestToRun( testsToRun )
Devin Lim90803a82017-08-29 13:41:44 -070020
21def tests = [:]
22for( String test : HA.keySet() ){
23 toBeRun = testsToRun.contains( test )
24 def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
Devin Lim61643762017-12-07 15:55:38 -080025 tests[stepName] = funcs.runTest( test, toBeRun, prop, test, false, HA, graph_generator_file, graph_saved_directory )
Devin Lim90803a82017-08-29 13:41:44 -070026}
27
Devin Lim61643762017-12-07 15:55:38 -080028start = funcs.getCurrentTime()
Devin Lim90803a82017-08-29 13:41:44 -070029// run the tests
30for ( test in tests.keySet() ){
Devin Lim61643762017-12-07 15:55:38 -080031 tests[ test ].call()
Devin Lim90803a82017-08-29 13:41:44 -070032}
Devin Lim61643762017-12-07 15:55:38 -080033funcs.generateOverallGraph( prop, HA, graph_saved_directory )
Jon Hallab611372018-02-21 15:26:05 -080034funcs.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] )