| #!groovy |
| funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' ) |
| test_lists = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsTestONTests.groovy' ) |
| |
| funcs.initialize( "USECASE" ); |
| // This is a Jenkinsfile for a scripted pipeline for the USECASE tests |
| def prop = null |
| prop = funcs.getProperties() |
| USECASE = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "USECASE" ] |
| |
| graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R" |
| graph_saved_directory = "/var/jenkins/workspace/postjob-BM/" |
| |
| echo( "Testcases:" ) |
| def testsToRun = null |
| testsToRun = funcs.getTestsToRun( prop[ "Tests" ] ) |
| funcs.printTestToRun( testsToRun ) |
| |
| def tests = [:] |
| for( String test : USECASE.keySet() ){ |
| toBeRun = testsToRun.contains( test ) |
| def stepName = ( toBeRun ? "" : "Not " ) + "Running $test" |
| tests[ stepName ] = funcs.runTest( test, toBeRun, prop, test, false, USECASE, graph_generator_file, graph_saved_directory ) |
| } |
| |
| start = funcs.getCurrentTime() |
| // run the tests |
| for ( test in tests.keySet() ){ |
| tests[ test ].call() |
| } |
| funcs.sendResultToSlack( start, prop[ "manualRun" ], prop[ "WikiPrefix" ] ) |
| funcs.generateOverallGraph( prop, USECASE, graph_saved_directory ) |