blob: 6493914b9348a138328a10efb871c002d989a142 [file] [log] [blame]
Devin Lim90803a82017-08-29 13:41:44 -07001#!groovy
Devin Limb734ea52018-05-14 14:13:05 -07002funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
3test_lists = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy' )
4fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/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( "USECASE" );
8// This is a Jenkinsfile for a scripted pipeline for the USECASE 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 -080011USECASE = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "USECASE" ]
12
Devin Limfe9a4cb2018-05-11 17:06:21 -070013graph_generator_file = fileRelated.trendIndividual
14graph_saved_directory = fileRelated.jenkinsWorkspace + "postjob-BM/"
Devin Lim90803a82017-08-29 13:41:44 -070015
Devin Lim61643762017-12-07 15:55:38 -080016echo( "Testcases:" )
17def testsToRun = null
18testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
19funcs.printTestToRun( testsToRun )
Devin Lim90803a82017-08-29 13:41:44 -070020
21def tests = [:]
22for( String test : USECASE.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, USECASE, 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.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] )
Devin Limfe9a4cb2018-05-11 17:06:21 -070034funcs.generateOverallGraph( prop, USECASE, graph_saved_directory )