blob: ce617659c5106d02adbd11729365cd5bf1d112ee [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( "FUNC" );
Devin Limfe9a4cb2018-05-11 17:06:21 -07008
Devin Lim90803a82017-08-29 13:41:44 -07009// This is a Jenkinsfile for a scripted pipeline for the FUNC tests
10def prop = null
Devin Lim61643762017-12-07 15:55:38 -080011prop = funcs.getProperties()
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -080012FUNC = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "FUNC" ]
13
Devin Limfe9a4cb2018-05-11 17:06:21 -070014graph_generator_file = fileRelated.trendIndividual
15graph_saved_directory = fileRelated.jenkinsWorkspace + "postjob-VM/"
Jeremy Ronquillo14ecc172018-03-05 09:57:17 -080016
Devin Lim61643762017-12-07 15:55:38 -080017echo( "Testcases:" )
Devin Lim90803a82017-08-29 13:41:44 -070018def testsToRun = null
Devin Lim61643762017-12-07 15:55:38 -080019testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
20funcs.printTestToRun( testsToRun )
Devin Lim90803a82017-08-29 13:41:44 -070021
Devin Lim90803a82017-08-29 13:41:44 -070022def tests = [:]
23for( String test : FUNC.keySet() ){
24 toBeRun = testsToRun.contains( test )
25 def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
Devin Lim61643762017-12-07 15:55:38 -080026 tests[stepName] = funcs.runTest( test, toBeRun, prop, test, false, FUNC, graph_generator_file, graph_saved_directory )
Devin Lim90803a82017-08-29 13:41:44 -070027}
28
Devin Lim61643762017-12-07 15:55:38 -080029start = funcs.getCurrentTime()
Devin Lim90803a82017-08-29 13:41:44 -070030// run the tests
31for ( test in tests.keySet() ){
Devin Lim61643762017-12-07 15:55:38 -080032 tests[ test ].call()
Devin Lim90803a82017-08-29 13:41:44 -070033}
Devin Lim61643762017-12-07 15:55:38 -080034funcs.generateOverallGraph( prop, FUNC, graph_saved_directory )
Devin Limfe9a4cb2018-05-11 17:06:21 -070035funcs.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] )