blob: af56bc526b8d7683dded3a6e95d46e4820135be6 [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( "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 )