#!groovy
funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
test_lists = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsTestONTests.groovy' )

funcs.initialize( "SR" );
// This is a Jenkinsfile for a scripted pipeline for the SR tests
def prop = null
prop = funcs.getProperties()
SR = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "SR" ]

graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
graph_saved_directory = "/var/jenkins/workspace/postjob-Fabric/"

echo( "Testcases:" )
def testsToRun = null
testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
funcs.printTestToRun( testsToRun )

def tests = [:]
for( String test : SR.keySet() ){
    toBeRun = testsToRun.contains( test )
    def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
    tests[stepName] = funcs.runTest( test, toBeRun, prop, test, false, SR, graph_generator_file, graph_saved_directory )
}

start = funcs.getCurrentTime()
// run the tests
for ( test in tests.keySet() ){
    tests[ test ].call()
}
//funcs.generateOverallGraph( prop, SR, graph_saved_directory )
funcs.sendResultToSlack( start,  prop[ "manualRun" ], prop[ "WikiPrefix" ] )