blob: da57cd02c86db380dd3a1e995165b87d0e9c3f1a [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-SCPF
22
Jon Hall6af749d2018-05-29 12:59:47 -070023// read and set the functions from dependencies.
Devin Limb734ea52018-05-14 14:13:05 -070024SCPFfuncs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/PerformanceFuncs.groovy' )
Devin Lim61643762017-12-07 15:55:38 -080025SCPFfuncs.init()
Devin Limb734ea52018-05-14 14:13:05 -070026funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
Devin Lim61643762017-12-07 15:55:38 -080027funcs.initialize( "SCPF", SCPFfuncs );
28
29def prop = null
30prop = funcs.getProperties()
31
Devin Limf5175192018-05-14 19:13:22 -070032// get the variables from the Jenkins parameters.
Devin Lim61643762017-12-07 15:55:38 -080033def Tests = params.Test
34isOldFlow = params.isOldFlow
35prop[ "ONOSBranch" ] = params.ONOSbranch
36
37SCPFfuncs.oldFlowRuleCheck( isOldFlow, prop[ "ONOSBranch" ] )
38
39def testsToRun = null
40testsToRun = funcs.getTestsToRun( Tests )
41
Devin Limf5175192018-05-14 19:13:22 -070042// pureTestName is because we don't want 'WFobj' to be used for test name.
Jon Hall6af749d2018-05-29 12:59:47 -070043def tests = [ : ]
44for ( String test : testsToRun ){
Devin Lim61643762017-12-07 15:55:38 -080045 println test
46 pureTestName = test.replaceAll( "WithFlowObj", "" )
Jon Hall6af749d2018-05-29 12:59:47 -070047 tests[ test ] = funcs.runTest( test, true, prop, pureTestName, true, [ ], "", "" )
Devin Lim61643762017-12-07 15:55:38 -080048}
49
Devin Limf5175192018-05-14 19:13:22 -070050// generate the graphs sequentially.
Devin Lim767c9832018-05-15 16:21:52 -070051for ( test in tests.keySet() ){
52 tests[ test ].call()
53}