Merge "[ONOS-6862] SCPFflowTp1g redesign Test Steps"
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/FUNC/FUNCbgpls/FUNCbgpls.py b/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
index 4b0b589..a401bb2 100644
--- a/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
+++ b/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
@@ -254,6 +254,7 @@
bgplsConfig.Comments()
time.sleep( 120 )
response = main.Cluster.active( 0 ).CLI.devices()
+
responseCheck = main.FALSE
if response:
responseCheck = main.TRUE
@@ -336,7 +337,7 @@
response = main.Cluster.active( 0 ).CLI.links()
linksResp = json.loads( response )
check_link = bgplsConfig.checkLinks( linksResp )
-
+ reply_Check_Link = main.FALSE
if check_link:
reply_Check_Link = main.TRUE
utilities.assert_equals( expect=main.TRUE, actual=reply_Check_Link,
@@ -408,6 +409,7 @@
response = main.Cluster.active( 0 ).CLI.links()
linksResp = json.loads( response )
check_link = bgplsConfig.checkLinks( linksResp )
+ reply_Check_Link = main.FALSE
if not check_link:
reply_Check_Link = main.TRUE
utilities.assert_equals( expect=main.TRUE, actual=reply_Check_Link,
diff --git a/TestON/tests/FUNC/FUNCbgpls/dependencies/Nbdata.py b/TestON/tests/FUNC/FUNCbgpls/dependencies/Nbdata.py
index ba6a12f..b1f44e1 100644
--- a/TestON/tests/FUNC/FUNCbgpls/dependencies/Nbdata.py
+++ b/TestON/tests/FUNC/FUNCbgpls/dependencies/Nbdata.py
@@ -125,6 +125,8 @@
}
# Comparing the Links
+ if len( linksResp ) != 22:
+ return False
for x in xrange( 22 ):
link_src_info = linksResp[ x ][ 'src' ][ 'device' ]
link_dst_info = linksResp[ x ][ 'dst' ][ 'device' ]
diff --git a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
index 19a82a4..df3bfc7 100644
--- a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
+++ b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
@@ -113,6 +113,7 @@
except Exception as e:
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
+ main.commit = main.commit.split( " " )[ 1 ]
def CASE1( self, main ):
diff --git a/TestON/tests/SCPF/SCPFportLat/dependencies/portFunc.py b/TestON/tests/SCPF/SCPFportLat/dependencies/portFunc.py
index f650521..f773da3 100644
--- a/TestON/tests/SCPF/SCPFportLat/dependencies/portFunc.py
+++ b/TestON/tests/SCPF/SCPFportLat/dependencies/portFunc.py
@@ -34,7 +34,7 @@
interface: port number
portStatus: up or down
resultDict: put result to dictionary
- warmup: if warmpu, ignore results
+ warmup: if warmup, ignore results
'''
main.log.info( "Clean up tshark" )
@@ -97,4 +97,4 @@
resultDict[ portStatus ][ 'node' + str(i) ]['DtoL'].append( DtoL )
resultDict[ portStatus ][ 'node' + str(i) ]['LtoG'].append( LtoG )
else:
- main.log.error( "Tshark output file for packet_in returned unexpected results" )
+ main.log.error( "Unexpected tshark output file" )
diff --git a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
index 9c75ef5..d3138f7 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
@@ -97,6 +97,7 @@
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
main.commit = main.commit.split( " " )[ 1 ]
+
def CASE1( self, main ):
# Clean up test environment and set up
import time
diff --git a/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py b/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
index 829c846..b81a674 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
@@ -142,7 +142,6 @@
main.cleanup()
main.exit()
-
def captureOfPack( main, deviceName, ofPack, switchStatus, resultDict, warmup ):
'''
@@ -196,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 ]
@@ -385,7 +390,7 @@
check = checkResult( A_Dtemp, D_Gtemp, E_Etemp )
if check == 1:
main.log.info( "ACK to device: {}".format( A_Dtemp ) )
- main.log.info( "Device ot Graph: {}".format( D_Gtemp ) )
+ main.log.info( "Device to Graph: {}".format( D_Gtemp ) )
main.log.info( "End to End: {}".format( E_Etemp ) )
main.log.info( "================================================" )
except KeyError: