Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 1 | #!groovy |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 2 | |
Devin Lim | 81ab48b | 2018-02-09 14:24:57 -0800 | [diff] [blame] | 3 | funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 4 | funcs.initializeTrend( "VM" ); |
| 5 | previous_version = "1.12" |
| 6 | before_previous_version = "1.11" |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 7 | AllTheTests= |
| 8 | [ |
| 9 | "FUNC":[ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 10 | "FUNCipv6Intent" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 11 | "FUNCoptical" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 12 | "FUNCflow" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 13 | "FUNCnetCfg": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 14 | "FUNCovsdbtest" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 15 | "FUNCnetconf" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 16 | "FUNCgroup" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 17 | "FUNCformCluster" :[ "basic":false, "extra_A":false, "extra_B":false, "new_Test":true, "day":"" ], |
| 18 | "FUNCintent" : [ "basic":false, "extra_A":true, "extra_B":false, "new_Test":false, "day":"" ], |
| 19 | "FUNCintentRest" : [ "basic":false, "extra_A":false, "extra_B":true, "new_Test":false, "day":"" ], |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 20 | ], |
| 21 | "HA":[ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 22 | "HAsanity" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 23 | "HAclusterRestart" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 24 | "HAsingleInstanceRestart" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 25 | "HAupgrade" : [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":true, "day":"" ], |
| 26 | "HAupgradeRollback" : [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":true, "day":"" ], |
| 27 | "HAstopNodes" : [ "basic":false, "extra_A":true, "extra_B":false, "new_Test":false, "day":"" ], |
| 28 | "HAfullNetPartition" : [ "basic":false, "extra_A":true, "extra_B":false, "new_Test":false, "day":"" ], |
| 29 | "HAswapNodes" : [ "basic":false, "extra_A":false, "extra_B":true, "new_Test":false, "day":"" ], |
| 30 | "HAscaling" : [ "basic":false, "extra_A":false, "extra_B":true, "new_Test":false, "day":"" ], |
| 31 | "HAkillNodes" : [ "basic":false, "extra_A":false, "extra_B":true, "new_Test":false, "day":"" ] |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 32 | ], |
| 33 | "SCPF":[ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 34 | "SCPFswitchLat": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 35 | "SCPFcbench": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 36 | "SCPFportLat": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 37 | "SCPFflowTp1g": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 38 | "SCPFintentEventTp": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 39 | "SCPFhostLat": [ "basic":false, "extra_A":true, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 40 | "SCPFbatchFlowResp": [ "basic":false, "extra_A":true, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 41 | "SCPFintentRerouteLat": [ "basic":false, "extra_A":true, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 42 | "SCPFintentInstallWithdrawLat": [ "basic":false, "extra_A":true, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 43 | "SCPFflowTp1gWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 44 | "SCPFintentEventTpWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 45 | "SCPFintentRerouteLatWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 46 | "SCPFscalingMaxIntentsWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 47 | "SCPFintentInstallWithdrawLatWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ], |
| 48 | "SCPFscaleTopo": [ "basic":false, "extra_A":false, "extra_B":false, "extra_C":true, "extra_D":false, "new_Test":false, day:"" ], |
| 49 | "SCPFscalingMaxIntents": [ "basic":false, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":true, "new_Test":false, day:"" ], |
| 50 | "SCPFmastershipFailoverLat": [ "basic":false, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":true, day:"" ] |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 51 | ], |
| 52 | "USECASE":[ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 53 | "FUNCvirNetNB" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 54 | "FUNCbgpls" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 55 | "VPLSBasic" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 56 | "USECASE_SdnipFunction": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 57 | "USECASE_SdnipFunctionCluster": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 58 | "PLATdockertest": [ "basic":true, "extra_A":true, "extra_B":false, "new_Test":false, "day":"" ], |
| 59 | "SRSanity": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 60 | "SRSwitchFailure": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 61 | "SRLinkFailure": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 62 | "SROnosFailure": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 63 | "SRClusterRestart": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 64 | "SRDynamic": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 65 | "SRHighAvailability": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 66 | "VPLSfailsafe" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ] |
| 67 | ], |
| 68 | "SR":[ |
Devin Lim | d1fb8e9 | 2018-02-28 16:29:33 -0800 | [diff] [blame] | 69 | "SRBridging": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ], |
| 70 | "SRRouting": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ] |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 71 | ] |
| 72 | ] |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 73 | testcases = [ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 74 | "FUNC" : [ tests : "" , nodeName : "VM" ], |
| 75 | "HA" : [ tests : "" , nodeName : "VM" ], |
| 76 | "SR" : [ tests : "", nodeName : "VM" ], |
| 77 | "SCPF" : [ tests : "" , nodeName : "BM" ], |
| 78 | "USECASE" : [ tests : "" , nodeName : "BM" ] |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 79 | ] |
| 80 | Prefix_organizer = [ |
| 81 | "FU" : "FUNC", |
| 82 | "HA" : "HA", |
| 83 | "PL" : "USECASE", |
| 84 | "SA" : "USECASE", |
| 85 | "SC" : "SCPF", |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 86 | "SR" : "SR", |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 87 | "US" : "USECASE", |
| 88 | "VP" : "USECASE" |
| 89 | ] |
| 90 | |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 91 | onos_b = "master" |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 92 | test_branch = "" |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 93 | onos_tag = params.ONOSTag |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 94 | isOldFlow = true |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 95 | // Set tests based on day of week |
Devin Lim | d1fb8e9 | 2018-02-28 16:29:33 -0800 | [diff] [blame] | 96 | def now = funcs.getCurrentTime() |
| 97 | print now.toString() |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 98 | today = now[ Calendar.DAY_OF_WEEK ] |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 99 | day = "" |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 100 | SCPF_choices = "" |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 101 | USECASE_choices = "" |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 102 | FUNC_choices = "" |
| 103 | HA_choices = "" |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 104 | SR_choices = "" |
| 105 | stat_graph_generator_file = "testCategoryBuildStats.R" |
| 106 | pie_graph_generator_file = "testCategoryPiePassFail.R" |
| 107 | graph_saved_directory = "/var/jenkins/workspace/postjob-VM/" |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 108 | |
| 109 | manually_run = params.manual_run |
| 110 | post_result = params.PostResult |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 111 | if( !manually_run ){ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 112 | slackSend( color:'#03CD9F', |
| 113 | message:":sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles:\n" |
| 114 | + "Starting tests on : " + now.toString() |
| 115 | + "\n:sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles:" ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 116 | testDivider( today ) |
| 117 | FUNC_choices = lastCommaRemover( FUNC_choices ) |
| 118 | HA_choices = lastCommaRemover( HA_choices ) |
| 119 | SCPF_choices = lastCommaRemover( SCPF_choices ) |
| 120 | USECASE_choices = lastCommaRemover( USECASE_choices ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 121 | SR_choices = lastCommaRemover( SR_choices ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 122 | } |
| 123 | |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 124 | if ( manually_run ){ |
| 125 | organize_tests( params.Tests ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 126 | onos_b = params.ONOSVersion |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 127 | isOldFlow = params.isOldFlow |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 128 | println "Tests to be run manually : " |
| 129 | }else{ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 130 | testcases[ "SCPF" ][ "tests" ] = SCPF_choices |
| 131 | testcases[ "USECASE" ][ "tests" ] = USECASE_choices |
| 132 | testcases[ "FUNC" ][ "tests" ] = FUNC_choices |
| 133 | testcases[ "HA" ][ "tests" ] = HA_choices |
| 134 | testcases[ "SR" ][ "tests" ] = SR_choices |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 135 | println "Defaulting to " + day + " tests:" |
| 136 | } |
| 137 | print_tests( testcases ) |
Devin Lim | 37a8379 | 2017-10-26 16:38:21 -0700 | [diff] [blame] | 138 | def runTest = [ |
| 139 | "VM" : [:], |
| 140 | "BM" : [:] |
| 141 | ] |
| 142 | for( String test in testcases.keySet() ){ |
| 143 | println test |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 144 | if ( testcases[ test ][ "tests" ] != "" ){ |
| 145 | runTest[ testcases[ test ][ "nodeName" ] ][ test ] = trigger_pipeline( onos_b, testcases[ test ][ "tests" ], testcases[ test ][ "nodeName" ], test, manually_run, onos_tag ) |
Devin Lim | 37a8379 | 2017-10-26 16:38:21 -0700 | [diff] [blame] | 146 | } |
| 147 | } |
| 148 | def finalList = [:] |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 149 | finalList[ "VM" ] = runTestSeq( runTest[ "VM" ] ) |
| 150 | finalList[ "BM" ] = runTestSeq( runTest[ "BM" ] ) |
Devin Lim | 37a8379 | 2017-10-26 16:38:21 -0700 | [diff] [blame] | 151 | parallel finalList |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 152 | //finalList[ "BM" ].call() |
| 153 | generateStatGraph() |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 154 | |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 155 | def testDivider( today ){ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 156 | switch ( today ) { |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 157 | case Calendar.MONDAY: |
| 158 | monday( true ) |
| 159 | tuesday( true, false ) |
| 160 | wednesday( true, false ) |
| 161 | thursday( true, false ) |
| 162 | friday( true, false ) |
| 163 | day = "Monday" |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 164 | slackSend( color:'#FFD988', message:"Tests to be run this weekdays : \n" + printDaysForTest() ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 165 | break |
| 166 | case Calendar.TUESDAY: |
| 167 | tuesday( true, true ) |
| 168 | day = "Tuesday" |
| 169 | break |
| 170 | case Calendar.WEDNESDAY: |
| 171 | wednesday( true, true ) |
| 172 | day = "Wednesday" |
| 173 | break |
| 174 | case Calendar.THURSDAY: |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 175 | thursday( true, true ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 176 | day = "Thursday" |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 177 | isOldFlow = false |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 178 | break |
| 179 | case Calendar.FRIDAY: |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 180 | friday( true, true ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 181 | day = "Friday" |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 182 | isOldFlow = false |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 183 | break |
| 184 | case Calendar.SATURDAY: |
| 185 | saturday() |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 186 | onos_b= previous_version |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 187 | day = "Saturday" |
| 188 | break |
| 189 | case Calendar.SUNDAY: |
| 190 | sunday() |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 191 | onos_b= before_previous_version |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 192 | day = "Sunday" |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 193 | isOldFlow = false |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 194 | break |
| 195 | } |
| 196 | } |
| 197 | def printDaysForTest(){ |
| 198 | result = "" |
| 199 | for ( String test in AllTheTests.keySet() ){ |
| 200 | result += test + " : \n" |
| 201 | for( String each in AllTheTests[ test ].keySet() ){ |
| 202 | AllTheTests[ test ][ each ][ "day" ] = lastCommaRemover( AllTheTests[ test ][ each ][ "day" ] ) |
| 203 | result += " " + each + ":[" + AllTheTests[ test ][ each ][ "day" ] + "]\n" |
| 204 | } |
| 205 | result += "\n" |
| 206 | } |
| 207 | return result |
| 208 | } |
| 209 | def lastCommaRemover( str ){ |
| 210 | if ( str.size() > 0 && str[ str.size() - 1 ] == ',' ){ |
| 211 | str = str.substring( 0,str.size() - 1 ) |
| 212 | } |
| 213 | return str |
| 214 | } |
| 215 | def monday( getResult ){ |
| 216 | FUNC_choices += adder( "FUNC", "basic", true, "M", getResult ) |
Devin Lim | 3ebd5e7 | 2017-11-14 10:38:00 -0800 | [diff] [blame] | 217 | FUNC_choices += adder( "FUNC", "new_Test", true, "M", getResult ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 218 | FUNC_choices += adder( "FUNC", "extra_A", true, "M", getResult ) |
| 219 | HA_choices += adder( "HA", "basic", true, "M", getResult ) |
| 220 | HA_choices += adder( "HA", "extra_A", true, "M", getResult ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 221 | //HA_choices += adder( "HA", "new_Test", true, "M", getResult ) |
| 222 | SR_choices += adder( "SR", "basic", true, "M", getResult ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 223 | SCPF_choices += adder( "SCPF", "basic", true, "M", getResult ) |
| 224 | SCPF_choices += adder( "SCPF", "extra_B", true, "M", getResult ) |
| 225 | } |
| 226 | def tuesday( getDay, getResult ){ |
| 227 | FUNC_choices += adder( "FUNC", "basic", getDay, "T", getResult ) |
Devin Lim | 3ebd5e7 | 2017-11-14 10:38:00 -0800 | [diff] [blame] | 228 | FUNC_choices += adder( "FUNC", "new_Test", getDay, "T", getResult ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 229 | FUNC_choices += adder( "FUNC", "extra_B", getDay, "T", getResult ) |
| 230 | HA_choices += adder( "HA", "basic", getDay, "T", getResult ) |
| 231 | HA_choices += adder( "HA", "extra_B", getDay, "T", getResult ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 232 | HA_choices += adder( "HA", "new_Test", getDay, "T", getResult ) |
| 233 | SR_choices += adder( "SR", "basic", getDay, "T", getResult ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 234 | SCPF_choices += adder( "SCPF", "basic", getDay, "T", getResult ) |
| 235 | SCPF_choices += adder( "SCPF", "extra_C", getDay, "T", getResult ) |
| 236 | USECASE_choices += adder( "USECASE", "basic", getDay, "T", getResult ) |
| 237 | USECASE_choices += adder( "USECASE", "extra_A", getDay, "T", getResult ) |
| 238 | USECASE_choices += adder( "USECASE", "new_Test", getDay, "T", getResult ) |
| 239 | } |
| 240 | def wednesday( getDay, getResult ){ |
| 241 | FUNC_choices += adder( "FUNC", "basic", getDay, "W", getResult ) |
Devin Lim | 3ebd5e7 | 2017-11-14 10:38:00 -0800 | [diff] [blame] | 242 | FUNC_choices += adder( "FUNC", "new_Test", getDay, "W", getResult ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 243 | FUNC_choices += adder( "FUNC", "extra_A", getDay, "W", getResult ) |
| 244 | HA_choices += adder( "HA", "basic", getDay, "W", getResult ) |
| 245 | HA_choices += adder( "HA", "extra_A", getDay, "W", getResult ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 246 | //HA_choices += adder( "HA", "new_Test", getDay, "W", getResult ) |
| 247 | SR_choices += adder( "SR", "basic", getDay, "W", getResult ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 248 | SCPF_choices += adder( "SCPF", "basic", getDay, "W", getResult ) |
| 249 | SCPF_choices += adder( "SCPF", "extra_A", getDay, "W", getResult ) |
| 250 | SCPF_choices += adder( "SCPF", "new_Test", getDay, "W", getResult ) |
| 251 | } |
| 252 | def thursday( getDay, getResult ){ |
| 253 | FUNC_choices += adder( "FUNC", "basic", getDay, "Th", getResult ) |
Devin Lim | 3ebd5e7 | 2017-11-14 10:38:00 -0800 | [diff] [blame] | 254 | FUNC_choices += adder( "FUNC", "new_Test", getDay, "Th", getResult ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 255 | FUNC_choices += adder( "FUNC", "extra_B", getDay, "Th", getResult ) |
| 256 | HA_choices += adder( "HA", "basic", getDay, "Th", getResult ) |
| 257 | HA_choices += adder( "HA", "extra_B", getDay, "Th", getResult ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 258 | HA_choices += adder( "HA", "new_Test", getDay, "Th", getResult ) |
| 259 | SR_choices += adder( "SR", "basic", getDay, "Th", getResult ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 260 | SCPF_choices += adder( "SCPF", "basic", getDay, "Th", getResult ) |
| 261 | SCPF_choices += adder( "SCPF", "extra_B", getDay, "Th", getResult ) |
| 262 | } |
| 263 | def friday( getDay, getResult ){ |
| 264 | FUNC_choices += adder( "FUNC", "basic", getDay, "F", getResult ) |
Devin Lim | 3ebd5e7 | 2017-11-14 10:38:00 -0800 | [diff] [blame] | 265 | FUNC_choices += adder( "FUNC", "new_Test", getDay, "F", getResult ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 266 | FUNC_choices += adder( "FUNC", "extra_A", getDay, "F", getResult ) |
| 267 | HA_choices += adder( "HA", "basic", getDay, "F", getResult ) |
| 268 | HA_choices += adder( "HA", "extra_A", getDay, "F", getResult ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 269 | //HA_choices += adder( "HA", "new_Test", getDay, "F", getResult ) |
| 270 | SR_choices += adder( "SR", "basic", getDay, "F", getResult ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 271 | SCPF_choices += adder( "SCPF", "basic", getDay, "F", getResult ) |
| 272 | SCPF_choices += adder( "SCPF", "extra_A", getDay, "F", getResult ) |
| 273 | SCPF_choices += adder( "SCPF", "extra_D", getDay, "F", getResult ) |
| 274 | } |
| 275 | def saturday(){ |
| 276 | FUNC_choices += adder( "FUNC", "basic", false, "Sa", true ) |
| 277 | FUNC_choices += adder( "FUNC", "extra_A", false, "Sa", true ) |
| 278 | FUNC_choices += adder( "FUNC", "extra_B", false, "Sa", true ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 279 | FUNC_choices += adder( "FUNC", "new_Test", true, "Sa", true ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 280 | HA_choices += adder( "HA", "basic", false, "Sa", true ) |
| 281 | HA_choices += adder( "HA", "extra_A", false, "Sa", true ) |
| 282 | HA_choices += adder( "HA", "extra_B", false, "Sa", true ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 283 | HA_choices += adder( "HA", "new_Test", false, "Sa", true ) |
| 284 | SR_choices += adder( "SR", "basic", false, "Sa", true ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 285 | SCPF_choices += adder( "SCPF", "basic", false, "Sa", true ) |
| 286 | SCPF_choices += adder( "SCPF", "extra_A", false, "Sa", true ) |
| 287 | SCPF_choices += adder( "SCPF", "extra_B", false, "Sa", true ) |
| 288 | SCPF_choices += adder( "SCPF", "extra_C", false, "Sa", true ) |
| 289 | SCPF_choices += adder( "SCPF", "extra_D", false, "Sa", true ) |
| 290 | SCPF_choices += adder( "SCPF", "new_Test", false, "Sa", true ) |
| 291 | USECASE_choices += adder( "USECASE", "basic", false, "Sa", true ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 292 | } |
| 293 | def sunday(){ |
| 294 | FUNC_choices += adder( "FUNC", "basic", false, "S", true ) |
| 295 | FUNC_choices += adder( "FUNC", "extra_A", false, "S", true ) |
| 296 | FUNC_choices += adder( "FUNC", "extra_B", false, "S", true ) |
| 297 | HA_choices += adder( "HA", "basic", false, "S", true ) |
| 298 | HA_choices += adder( "HA", "extra_A", false, "S", true ) |
| 299 | HA_choices += adder( "HA", "extra_B", false, "S", true ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 300 | SR_choices += adder( "SR", "basic", false, "S", true ) |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 301 | SCPF_choices += adder( "SCPF", "basic", false, "S", true ) |
| 302 | USECASE_choices += adder( "USECASE", "basic", false, "S", true ) |
| 303 | } |
| 304 | def adder( testCat, set, dayAdding, day, getResult ){ |
| 305 | result = "" |
| 306 | for( String test in AllTheTests[ testCat ].keySet() ){ |
| 307 | if( AllTheTests[ testCat ][ test ][ set ] ){ |
| 308 | if( getResult ) |
| 309 | result += test + "," |
| 310 | if( dayAdding ) |
| 311 | dayAdder( testCat, test, day ) |
| 312 | } |
| 313 | } |
| 314 | return result |
| 315 | } |
| 316 | def dayAdder( testCat, testName, dayOfWeek ){ |
| 317 | AllTheTests[ testCat ][ testName ][ "day" ] += dayOfWeek + "," |
| 318 | } |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 319 | def runTestSeq( testList ){ |
| 320 | return{ |
| 321 | for ( test in testList.keySet() ){ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 322 | testList[ test ].call() |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 323 | } |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | def print_tests( tests ){ |
| 328 | for( String test in tests.keySet() ){ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 329 | if( tests[ test ][ "tests" ] != "" ){ |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 330 | println test + ":" |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 331 | println tests[ test ][ "tests" ] |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 332 | } |
| 333 | } |
| 334 | } |
| 335 | def organize_tests( tests ){ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 336 | testList = tests.tokenize( "\n;, " ) |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 337 | for( String test in testList ) |
| 338 | testcases [ Prefix_organizer[ ( test == "FUNCbgpls" || test == "FUNCvirNetNB" ? "US" : ( test[ 0 ] + test[ 1 ] ) ) ] ][ "tests" ] += test + "," |
| 339 | } |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 340 | def borrow_mn( jobOn ){ |
| 341 | result = "" |
| 342 | if( jobOn == "SR" ){ |
| 343 | result = "~/cell_borrow.sh" |
| 344 | } |
| 345 | return result |
| 346 | } |
| 347 | def trigger( branch, tests, nodeName, jobOn, manuallyRun, onosTag ){ |
| 348 | println jobOn + "-pipeline-" + manuallyRun ? "manually" : branch |
| 349 | wiki = branch |
| 350 | if ( branch != "master" ){ |
| 351 | branch = "onos-" + branch |
| 352 | } |
| 353 | test_branch = "master" |
| 354 | node( "TestStation-" + nodeName + "s" ){ |
| 355 | envSetup( branch, test_branch, onosTag, jobOn, manuallyRun ) |
| 356 | |
| 357 | exportEnvProperty( branch, test_branch, wiki, tests, post_result, manuallyRun, onosTag, isOldFlow ) |
| 358 | } |
| 359 | |
| 360 | jobToRun = jobOn + "-pipeline-" + ( manuallyRun ? "manually" : wiki ) |
| 361 | build job: jobToRun, propagate: false |
| 362 | } |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 363 | def trigger_pipeline( branch, tests, nodeName, jobOn, manuallyRun, onosTag ){ |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 364 | // nodeName : "BM" or "VM" |
| 365 | // jobOn : "SCPF" or "USECASE" or "FUNC" or "HA" |
| 366 | return{ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 367 | if( jobOn == "SR" ){ |
| 368 | trigger( "1.11", "SRBridging", nodeName, jobOn, manuallyRun, onosTag ) |
| 369 | trigger( "1.12", "SRBridging", nodeName, jobOn, manuallyRun, onosTag ) |
| 370 | trigger( "master", "SRBridging", nodeName, jobOn, manuallyRun, onosTag ) |
Devin Lim | d1fb8e9 | 2018-02-28 16:29:33 -0800 | [diff] [blame] | 371 | // returnCell( nodeName ) |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 372 | }else{ |
| 373 | trigger( branch, tests, nodeName, jobOn, manuallyRun, onosTag ) |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 374 | } |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 375 | } |
| 376 | } |
| 377 | |
| 378 | // export Environment properties. |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 379 | def exportEnvProperty( onos_branch, test_branch, wiki, tests, postResult, manually_run, onosTag, isOldFlow ){ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 380 | stage( "export Property" ){ |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 381 | sh ''' |
| 382 | echo "ONOSBranch=''' + onos_branch +'''" > /var/jenkins/TestONOS.property |
| 383 | echo "TestONBranch=''' + test_branch +'''" >> /var/jenkins/TestONOS.property |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 384 | echo "ONOSTag='''+ onosTag +'''" >> /var/jenkins/TestONOS.property |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 385 | echo "WikiPrefix=''' + wiki +'''" >> /var/jenkins/TestONOS.property |
| 386 | echo "ONOSJVMHeap='''+ env.ONOSJVMHeap +'''" >> /var/jenkins/TestONOS.property |
| 387 | echo "Tests=''' + tests +'''" >> /var/jenkins/TestONOS.property |
| 388 | echo "postResult=''' + postResult +'''" >> /var/jenkins/TestONOS.property |
| 389 | echo "manualRun=''' + manually_run +'''" >> /var/jenkins/TestONOS.property |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 390 | echo "isOldFlow=''' + isOldFlow +'''" >> /var/jenkins/TestONOS.property |
| 391 | |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 392 | ''' |
| 393 | } |
| 394 | } |
| 395 | // Initialize the environment Setup for the onos and OnosSystemTest |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 396 | def envSetup( onos_branch, test_branch, onos_tag, jobOn, manuallyRun ){ |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 397 | stage( "envSetup" ) { |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 398 | sh '''#!/bin/bash -l |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 399 | set +e |
| 400 | . ~/.bashrc |
| 401 | env |
Devin Lim | 4104c00 | 2018-02-28 16:42:19 -0800 | [diff] [blame^] | 402 | ''' //+ borrow_mn( jobOn ) |
| 403 | + ''' |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 404 | ''' + preSetup( onos_branch, test_branch, onos_tag, manuallyRun ) + ''' |
Devin Lim | cbba085 | 2017-11-13 10:31:32 -0800 | [diff] [blame] | 405 | ''' + oldFlowCheck( jobOn, onos_branch ) + ''' |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 406 | ''' + postSetup( onos_branch, test_branch, onos_tag, manuallyRun ) |
| 407 | } |
| 408 | } |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 409 | def tagCheck( onos_tag, onos_branch ){ |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 410 | result = "git checkout " |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 411 | if ( onos_tag == "" ) |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 412 | result += onos_branch //create new local branch |
| 413 | else |
| 414 | result += onos_tag //checkout the tag |
| 415 | return result |
| 416 | } |
| 417 | def preSetup( onos_branch, test_branch, onos_tag, isManual ){ |
| 418 | result = "" |
| 419 | if( !isManual ){ |
| 420 | result = '''echo -e "\n##### Set TestON Branch #####" |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 421 | echo "TestON Branch is set on: ''' + test_branch + '''" |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 422 | |
| 423 | cd ~/OnosSystemTest/ |
| 424 | git checkout HEAD~1 # Make sure you aren't pn a branch |
| 425 | git branch | grep -v "detached from" | xargs git branch -d # delete all local branches merged with remote |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 426 | git branch -D ''' + test_branch + ''' # just incase there are local changes. This will normally result in a branch not found error |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 427 | git clean -df # clean any local files |
| 428 | git fetch --all # update all caches from remotes |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 429 | git reset --hard origin/''' + test_branch +''' # force local index to match remote branch |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 430 | git clean -df # clean any local files |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 431 | git checkout ''' + test_branch + ''' #create new local branch |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 432 | git branch |
| 433 | git log -1 --decorate |
| 434 | |
| 435 | |
| 436 | echo -e "\n##### Set ONOS Branch #####" |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 437 | echo "ONOS Branch is set on: ''' + onos_branch + '''" |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 438 | |
| 439 | echo -e "\n #### check karaf version ######" |
| 440 | env |grep karaf |
| 441 | |
| 442 | cd ~/onos |
| 443 | rm -rf buck-out/* |
| 444 | ~/onos/tools/build/onos-buck clean |
| 445 | git checkout HEAD~1 # Make sure you aren't pn a branch |
| 446 | git branch | grep -v "detached from" | xargs git branch -d # delete all local branches merged with remote |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 447 | git branch -D ''' + onos_branch + ''' # just incase there are local changes. This will normally result in a branch not found error |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 448 | git clean -df # clean any local files |
| 449 | git fetch --all # update all caches from remotes |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 450 | git reset --hard origin/''' + onos_branch + ''' # force local index to match remote branch |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 451 | git clean -df # clean any local files |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 452 | ''' + tagCheck( onos_tag, onos_branch ) + ''' |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 453 | git branch |
| 454 | git log -1 --decorate |
| 455 | |
| 456 | |
| 457 | echo -e "\n##### set jvm heap size to 8G #####" |
| 458 | echo ${ONOSJVMHeap} |
| 459 | |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 460 | inserted_line="export JAVA_OPTS=\"\${ONOSJVMHeap}\"" |
| 461 | sed -i "s/bash/bash\\n$inserted_line/" ~/onos/tools/package/bin/onos-service |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 462 | |
| 463 | echo "##### Check onos-service setting..... #####" |
| 464 | cat ~/onos/tools/package/bin/onos-service |
| 465 | |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 466 | export JAVA_HOME=/usr/lib/jvm/java-8-oracle''' |
| 467 | } |
| 468 | return result |
| 469 | } |
Devin Lim | cbba085 | 2017-11-13 10:31:32 -0800 | [diff] [blame] | 470 | def oldFlowCheck( jobOn, onos_branch ){ |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 471 | result = "" |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 472 | if( jobOn == "SCPF" && ( onos_branch== "master" || onos_branch=="onos-1.12" ) ) |
| 473 | result = '''sed -i -e 's/@Component(immediate = true)/@Component(enabled = false)/g' ~/onos/core/store/dist/src/main/java/org/onosproject/store/flow/impl/''' + ( isOldFlow ? "DistributedFlowRuleStore" : "ECFlowRuleStore" ) + '''.java |
| 474 | sed -i -e 's/@Component(enabled = false)/@Component(immediate = true)/g' ~/onos/core/store/dist/src/main/java/org/onosproject/store/flow/impl/''' + ( isOldFlow ? "ECFlowRuleStore" : "DistributedFlowRuleStore" ) + ".java" |
Devin Lim | 0e96716 | 2017-11-03 15:59:53 -0700 | [diff] [blame] | 475 | return result |
| 476 | } |
| 477 | def postSetup( onos_branch, test_branch, onos_tag, isManual ){ |
| 478 | result = "" |
| 479 | if( !isManual ){ |
| 480 | result = '''echo -e "\n##### build ONOS skip unit tests ######" |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 481 | #mvn clean install -DskipTests |
| 482 | # Force buck update |
| 483 | rm -f ~/onos/bin/buck |
| 484 | ~/onos/tools/build/onos-buck build onos |
| 485 | |
Devin Lim | a0e52eb | 2017-09-13 18:35:12 -0700 | [diff] [blame] | 486 | sleep 30 |
| 487 | echo -e "\n##### Stop all running instances of Karaf #####" |
| 488 | kill $(ps -efw | grep karaf | grep -v grep | awk '{print $2}') |
| 489 | sleep 30 |
| 490 | |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 491 | git branch''' |
| 492 | } |
Devin Lim | 37a8379 | 2017-10-26 16:38:21 -0700 | [diff] [blame] | 493 | return result |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 494 | } |
| 495 | def returnCell( nodeName ){ |
| 496 | node( "TestStation-" + nodeName + "s" ){ |
| 497 | sh '''#!/bin/bash -l |
| 498 | set +e |
| 499 | . ~/.bashrc |
| 500 | env |
| 501 | ~/./return_cell.sh |
| 502 | ''' |
| 503 | } |
| 504 | } |
| 505 | |
| 506 | def generateStatGraph(){ |
| 507 | if( !manually_run ){ |
| 508 | testListPart = funcs.createStatsList( "FUNC", AllTheTests[ "FUNC" ], true ) + |
| 509 | funcs.createStatsList( "HA", AllTheTests[ "HA" ], true ) + |
| 510 | funcs.createStatsList( "USECASE", AllTheTests[ "USECASE" ], false ) |
| 511 | pieTestList = funcs.makeTestList( AllTheTests[ "FUNC" ], true ) + |
| 512 | funcs.makeTestList( AllTheTests[ "HA" ], true ) + |
| 513 | funcs.makeTestList( AllTheTests[ "USECASE" ], false ) |
| 514 | funcs.generateCategoryStatsGraph( "false", "true", stat_graph_generator_file, pie_graph_generator_file, "ALL", onos_b, testListPart, graph_saved_directory, pieTestList ) |
| 515 | } |
Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 516 | } |