blob: fc2037398b8ab6c1349d2b8077d04c9414e2be77 [file] [log] [blame]
Devin Lime1346f42018-05-15 15:41:36 -07001#!groovy
Devin Limf5175192018-05-14 19:13:22 -07002// Copyright 2017 Open Networking Foundation (ONF)
3//
4// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
5// the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
6// or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
7//
8// TestON is free software: you can redistribute it and/or modify
9// it under the terms of the GNU General Public License as published by
10// the Free Software Foundation, either version 2 of the License, or
11// (at your option) any later version.
12//
13// TestON is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with TestON. If not, see <http://www.gnu.org/licenses/>.
20
21// This is the Jenkins script for manual-graph-generator-trend
22
Devin Limf5175192018-05-14 19:13:22 -070023// read the dependency functions
Devin Limb734ea52018-05-14 14:13:05 -070024funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
25fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy' )
Devin Limfe9a4cb2018-05-11 17:06:21 -070026
27fileRelated.init()
Devin Limf5175192018-05-14 19:13:22 -070028
29// read the node cluster ( VM or BM or Fabrics ) from the Jenkins job.
Devin Lim61643762017-12-07 15:55:38 -080030nodeCluster = params.NodeCluster
31
Jon Hall6af749d2018-05-29 12:59:47 -070032funcs.initializeTrend( nodeCluster )
Devin Limf5175192018-05-14 19:13:22 -070033
34// do additional check for Fabric since it will be different depends on which branch it is running on.
Jon Hall6af749d2018-05-29 12:59:47 -070035if ( nodeCluster == "Fabric" ){
36 funcs.additionalInitForSR( params.ONOSbranch )
37}
Devin Lim61643762017-12-07 15:55:38 -080038def prop = null
Jeremy Ronquillo259d71f2019-06-07 14:38:46 -070039prop = funcs.getProperties( "FUNC" )
Devin Lim61643762017-12-07 15:55:38 -080040
Devin Limf5175192018-05-14 19:13:22 -070041// get the list of the tests from the parameters.
Devin Lim61643762017-12-07 15:55:38 -080042def Tests = params.Test
43prop[ "ONOSBranch" ] = params.ONOSbranch
44
Devin Limf5175192018-05-14 19:13:22 -070045// set some of the paths of the file and directory
Jeremy Ronquilloe1750cb2019-05-17 15:04:30 -070046graph_generator_file = fileRelated.rScriptPaths[ "scripts" ][ "trendIndividual" ]
47graph_saved_directory = fileRelated.workspaces[ "base" ] + "postjob-" + nodeCluster +
Jon Hall6af749d2018-05-29 12:59:47 -070048 ( nodeCluster == "Fabric" ? funcs.fabricOn( prop[ "ONOSBranch" ] ) : "" ) + "/"
Devin Lim86e40532018-04-06 12:44:06 -070049
Devin Lim61643762017-12-07 15:55:38 -080050def testsToRun = null
51testsToRun = funcs.getTestsToRun( Tests )
52
Devin Limf5175192018-05-14 19:13:22 -070053// set functions into the dictionary.
Jon Hall6af749d2018-05-29 12:59:47 -070054def tests = [ : ]
55for ( String test : testsToRun ){
Devin Lim61643762017-12-07 15:55:38 -080056 println test
Jon Hall8b1e92c2018-06-13 14:07:22 -070057 def pureTestName = test.split().head()
58 tests[ test ] = funcs.runTest( test, true, prop, pureTestName, true, [ ], graph_generator_file, graph_saved_directory )
Devin Lim61643762017-12-07 15:55:38 -080059}
60
Devin Lim767c9832018-05-15 16:21:52 -070061for ( test in tests.keySet() ){
62 tests[ test ].call()
63}