[ONOS-7985]: Refactor list of tests used in TestON Jenkins Pipelines
Change-Id: Ic3d67fd0b0b0eb4a74f9f0c198dc5a868c5afa95
diff --git a/TestON/JenkinsFile/HAJenkinsFile b/TestON/JenkinsFile/HAJenkinsFile
index d51806c..9eee0f9 100644
--- a/TestON/JenkinsFile/HAJenkinsFile
+++ b/TestON/JenkinsFile/HAJenkinsFile
@@ -26,6 +26,7 @@
fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy' )
fileRelated.init()
+test_list.init()
// initialize the funcs with category of HA
funcs.initialize( "HA" );
@@ -37,7 +38,7 @@
prop = funcs.getProperties()
// get the list of the test and init branch to it.
-HA = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "HA" ]
+HA_tests = test_list.getTestsFromCategory( "HA" )
// init some directories
graph_generator_file = fileRelated.trendIndividual
@@ -51,12 +52,12 @@
// run the test sequentially and save the function into the dictionary.
def tests = [ : ]
-for ( String test : HA.keySet() ){
+for ( String test : HA_tests.keySet() ){
toBeRun = testsToRun.contains( test )
def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
- def pureTestName = ( HA[ test ].containsKey( "test" ) ? HA[ test ][ "test" ].split().head() : test )
+ def pureTestName = ( HA_tests[ test ].containsKey( "test" ) ? HA_tests[ test ][ "test" ].split().head() : test )
tests[ stepName ] = funcs.runTest( test, toBeRun, prop, pureTestName, false,
- HA, graph_generator_file, graph_saved_directory )
+ HA_tests, graph_generator_file, graph_saved_directory )
}
// get the start time of the test.
@@ -67,7 +68,7 @@
}
// generate the overall graph of the HA tests.
-funcs.generateOverallGraph( prop, HA, graph_saved_directory )
+funcs.generateOverallGraph( prop, HA_tests, graph_saved_directory )
// send the notification to Slack that running HA tests was ended.
funcs.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] )