Merge "fix the bugs from the cluster update"
diff --git a/TestON/drivers/common/cli/onosclusterdriver.py b/TestON/drivers/common/cli/onosclusterdriver.py
index f531a3c..4be6191 100755
--- a/TestON/drivers/common/cli/onosclusterdriver.py
+++ b/TestON/drivers/common/cli/onosclusterdriver.py
@@ -397,15 +397,4 @@
cli = self.createCliComponent( cliName, ip )
rest = self.createRestComponent( restName, ip )
bench = self.createBenchComponent( benchName )
- self.nodes.append( Controller( prefix + str( i ), ip, cli, rest, bench, i - 1, self.user_name ) )
-
- ## DEBUG ########################################################################
- print "Prininting NODES::"
- try:
- print self.nodes
- for node in self.nodes:
- main.log.error( repr(node ))
- main.log.warn( node )
- except Exception as e:
- print repr(e)
- ## END debug ########################################################################
+ self.nodes.append( Controller( prefix + str( i ), ip, cli, rest, bench, i - 1, self.user_name ) )
\ No newline at end of file
diff --git a/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.params b/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.params
index 99d17ba..a76ff19 100644
--- a/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.params
+++ b/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.params
@@ -1,6 +1,6 @@
<PARAMS>
- <testcases>1,2,1,2,1,2,1,2,1,2,1,2,1,2</testcases>
+ <testcases>0,1,2,1,2,1,2,1,2,1,2,1,2,1,2</testcases>
<SCALE>1,3,3,5,5,7,7</SCALE>
<max>7</max>
diff --git a/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py b/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py
index f6325ad..c34adea 100644
--- a/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py
+++ b/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py
@@ -34,46 +34,34 @@
def __init__( self ):
self.default = ''
- def CASE1( self, main ):
+ def CASE0( self, main ):
import time
- global init
try:
- if type( init ) is not bool:
- init = False
- except NameError:
- init = False
+ from tests.dependencies.ONOSSetup import ONOSSetup
+ main.testSetUp = ONOSSetup()
+ except ImportError:
+ main.log.error("ONOSSetup not found. exiting the test")
+ main.exit()
+ main.testSetUp.envSetupDescription()
+ try:
+ #Load values from params file
+ cellName = main.params[ 'ENV' ][ 'cellName' ]
+ main.apps = main.params[ 'ENV' ][ 'cellApps' ]
+ BENCHUser = main.params[ 'BENCH' ][ 'user' ]
+ BENCHIp = main.params[ 'BENCH' ][ 'ip1' ]
+ main.scale = ( main.params[ 'SCALE' ] ).split( "," )
+ main.flowRuleCfg = main.params[ 'CFG' ][ 'flowRule' ]
+ main.nullProviderCfg = main.params[ 'CFG' ][ 'nullProvider' ]
+ stepResult = main.testSetUp.envSetup()
+ resultsDB = open( "/tmp/flowTP1gDB", "w+" )
+ resultsDB.close()
+ except Exception as e:
+ main.testSetUp.envSetupException( e )
+ main.testSetUp.evnSetupConclusion( stepResult )
+ main.commit = ( main.commit.split( " " ) )[ 1 ]
- main.log.info( "==========DEBUG VERSION 3===========" )
-
- # -- INIT SECTION, ONLY RUNS ONCE -- #
- if init == False:
- try:
- init = True
- try:
- from tests.dependencies.ONOSSetup import ONOSSetup
- main.testSetUp = ONOSSetup()
- except ImportError:
- main.log.error( "ONOSSetup not found. exiting the test" )
- main.exit()
- main.testSetUp.envSetupDescription()
- #Load values from params file
- cellName = main.params[ 'ENV' ][ 'cellName' ]
- main.apps = main.params[ 'ENV' ][ 'cellApps' ]
- BENCHUser = main.params[ 'BENCH' ][ 'user' ]
- BENCHIp = main.params[ 'BENCH' ][ 'ip1' ]
- main.scale = ( main.params[ 'SCALE' ] ).split( "," )
- main.flowRuleCfg = main.params[ 'CFG' ][ 'flowRule' ]
- main.nullProviderCfg = main.params[ 'CFG' ][ 'nullProvider' ]
- stepResult = main.testSetUp.envSetup()
- resultsDB = open( "/tmp/flowTP1gDB", "w+" )
- resultsDB.close()
- except Exception as e:
- main.testSetUp.envSetupException( e )
- main.testSetUp.evnSetupConclusion( stepResult )
- main.commit = ( main.commit.split( " " ) )[ 1 ]
- # -- END OF INIT SECTION --#
-
+ def CASE1( self, main ):
main.testSetUp.ONOSSetUp( "localhost", main.Cluster, True, cellName=cellName )
main.log.info( "Startup sequence complete" )
diff --git a/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py b/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
index 87e9ca1..b81a674 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
@@ -195,6 +195,12 @@
with open( main.tsharkResultPath[ switchStatus ][ d ], "r" ) as resultFile:
# grep tshark result timestamp
resultText = resultFile.readlines()
+ if not resultText:
+ main.log.warn( "Empty tshark result!" )
+ main.wrong[ 'TsharkValueIncorrect' ] += 1
+ main.wrong[ 'totalWrong' ] += 1
+ checkTotalWrongNum()
+ return
if d == "TCP":
# if TCP package, we should use the latest one package
resultText = resultText[ len( resultText ) - 1 ]