[ONOS-7468] Fix the case descriptions issue for the SRBridging test
Change-Id: I098aa5f526f65216024e8af4cbf5d3f7430066b7
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.py b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.py
index 6f8c9fc..d587f69 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.py
@@ -16,7 +16,7 @@
test_idx = 1,
topology = '0x1',
onosNodes = 1,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-untagged port" )
def CASE2( self, main ):
"""
@@ -32,7 +32,7 @@
test_idx = 2,
topology = '0x2',
onosNodes = 1,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-untagged port" )
def CASE3( self, main ):
"""
@@ -48,7 +48,7 @@
test_idx = 3,
topology = '2x2',
onosNodes = 1,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-untagged port" )
def CASE4( self, main ):
"""
@@ -64,7 +64,7 @@
test_idx = 4,
topology = '2x4',
onosNodes = 1,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-untagged port" )
def CASE5( self, main ):
"""
@@ -80,7 +80,7 @@
test_idx = 5,
topology = '0x1',
onosNodes = 3,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-untagged port" )
def CASE6( self, main ):
"""
@@ -96,7 +96,7 @@
test_idx = 6,
topology = '0x2',
onosNodes = 3,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-untagged port" )
def CASE7( self, main ):
"""
@@ -112,7 +112,7 @@
test_idx = 7,
topology = '2x2',
onosNodes = 3,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-untagged port" )
def CASE8( self, main ):
"""
@@ -128,7 +128,7 @@
test_idx = 8,
topology = '2x4',
onosNodes = 3,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-untagged port" )
def CASE11( self, main ):
"""
@@ -280,7 +280,7 @@
test_idx = 21,
topology = '0x1',
onosNodes = 1,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-native port" )
def CASE22( self, main ):
"""
@@ -296,7 +296,7 @@
test_idx = 22,
topology = '0x2',
onosNodes = 1,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-native port" )
def CASE23( self, main ):
"""
@@ -312,7 +312,7 @@
test_idx = 23,
topology = '2x2',
onosNodes = 1,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-native port" )
def CASE24( self, main ):
"""
@@ -328,7 +328,7 @@
test_idx = 24,
topology = '2x4',
onosNodes = 1,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-native port" )
def CASE25( self, main ):
"""
@@ -344,7 +344,7 @@
test_idx = 25,
topology = '0x1',
onosNodes = 3,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-native port" )
def CASE26( self, main ):
"""
@@ -360,7 +360,7 @@
test_idx = 26,
topology = '0x2',
onosNodes = 3,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-native port" )
def CASE27( self, main ):
"""
@@ -376,7 +376,7 @@
test_idx = 27,
topology = '2x2',
onosNodes = 3,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-native port" )
def CASE28( self, main ):
"""
@@ -392,7 +392,7 @@
test_idx = 28,
topology = '2x4',
onosNodes = 3,
- description = "Bridging test between two untagged hosts" )
+ description = "Bridging test between two untagged hosts on vlan-native port" )
def CASE31( self, main ):
"""
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index f078e2d..f3350aa 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -49,7 +49,7 @@
main.cleanAndExit()
from tests.dependencies.Network import Network
main.Network = Network()
- main.testSetUp.envSetupDescription()
+ main.testSetUp.envSetupDescription( False )
stepResult = main.FALSE
try:
main.step( "Constructing test variables" )
@@ -66,7 +66,7 @@
main.maxNodes = int( main.params[ 'SCALE' ][ 'max' ] )
main.startUpSleep = int( main.params[ 'SLEEP' ][ 'startup' ] )
- stepResult = main.testSetUp.envSetup()
+ stepResult = main.testSetUp.envSetup( False )
except Exception as e:
main.testSetUp.envSetupException( e )
@@ -95,7 +95,7 @@
main.testSetUp.ONOSSetUp( main.Cluster, newCell=True, cellName=main.cellName,
skipPack=skipPackage,
useSSH=Testcaselib.useSSH,
- installParallel=parallel)
+ installParallel=parallel, includeCaseDesc=False )
ready = utilities.retry( main.Cluster.active( 0 ).CLI.summary,
main.FALSE,
sleep=cliSleep,
@@ -411,7 +411,7 @@
main.utils.mininetCleanup( main.Mininet1 )
- main.utils.copyKarafLog( "CASE%d" % main.CurrentTestCaseNumber, before=True )
+ main.utils.copyKarafLog( "CASE%d" % main.CurrentTestCaseNumber, before=True, includeCaseDesc=False )
for ctrl in main.Cluster.active():
main.ONOSbench.onosStop( ctrl.ipAddress )
diff --git a/TestON/tests/dependencies/ONOSSetup.py b/TestON/tests/dependencies/ONOSSetup.py
index cbf7f8c..bcecf45 100644
--- a/TestON/tests/dependencies/ONOSSetup.py
+++ b/TestON/tests/dependencies/ONOSSetup.py
@@ -27,14 +27,15 @@
def __init__( self ):
self.default = ''
- def envSetupDescription( self ):
+ def envSetupDescription( self, includeCaseDesc=True ):
"""
Introduction part of the test. It will initialize some basic vairables.
"""
- main.case( "Constructing test variables and building ONOS package" )
- main.step( "Constructing test variables" )
- main.caseExplanation = "For loading from params file, and pull" + \
- " and build the latest ONOS package"
+ if includeCaseDesc:
+ main.case( "Constructing test variables and building ONOS package" )
+ main.caseExplanation = "For loading from params file, and pull" + \
+ " and build the latest ONOS package"
+ main.step("Constructing test variables")
try:
from tests.dependencies.Cluster import Cluster
except ImportError:
@@ -47,11 +48,14 @@
main.ONOSbench = main.Cluster.controllers[ 0 ].Bench
main.testOnDirectory = re.sub( "(/tests)$", "", main.testDir )
- def gitPulling( self ):
+ def gitPulling( self, includeCaseDesc=True ):
"""
it will do git checkout or pull if they are enabled from the params file.
"""
- main.case( "Pull onos branch and build onos on Teststation." )
+
+ if includeCaseDesc:
+ main.case( "Pull onos branch and build onos on Teststation." )
+
gitPull = main.params[ 'GIT' ][ 'pull' ]
gitBranch = main.params[ 'GIT' ][ 'branch' ]
if gitPull == 'True':
@@ -76,7 +80,7 @@
else:
main.log.info( "Skipped git checkout and pull as they are disabled in params file" )
- def envSetup( self, includeGitPull=True ):
+ def envSetup( self, includeGitPull=True, includeCaseDesc=True ):
"""
Description:
some environment setup for the test.
@@ -86,7 +90,7 @@
Returns main.TRUE
"""
if includeGitPull:
- self.gitPulling()
+ self.gitPulling( includeCaseDesc )
try:
from tests.dependencies.Cluster import Cluster
@@ -355,7 +359,7 @@
def ONOSSetUp( self, cluster, hasMultiNodeRounds=False, startOnos=True, newCell=True,
cellName="temp", cellApps="drivers", mininetIp="", removeLog=False, extraApply=None, applyArgs=None,
extraClean=None, cleanArgs=None, skipPack=False, installMax=False, useSSH=True,
- killRemoveMax=True, stopOnos=False, installParallel=True, cellApply=True ):
+ killRemoveMax=True, stopOnos=False, installParallel=True, cellApply=True, includeCaseDesc=True ):
"""
Description:
Initial ONOS setting up of the tests. It will also verify the result of each steps.
@@ -395,11 +399,11 @@
Returns main.TRUE if it everything successfully proceeded.
"""
self.setNumCtrls( hasMultiNodeRounds )
-
- main.case( "Starting up " + str( cluster.numCtrls ) +
- " node(s) ONOS cluster" )
- main.caseExplanation = "Set up ONOS with " + str( cluster.numCtrls ) + \
- " node(s) ONOS cluster"
+ if includeCaseDesc:
+ main.case( "Starting up " + str( cluster.numCtrls ) +
+ " node(s) ONOS cluster" )
+ main.caseExplanation = "Set up ONOS with " + str( cluster.numCtrls ) + \
+ " node(s) ONOS cluster"
killResult = self.killingAllOnos( cluster, killRemoveMax, stopOnos )
main.log.info( "NODE COUNT = " + str( cluster.numCtrls ) )
diff --git a/TestON/tests/dependencies/topology.py b/TestON/tests/dependencies/topology.py
index 96109d3..04e6246 100644
--- a/TestON/tests/dependencies/topology.py
+++ b/TestON/tests/dependencies/topology.py
@@ -130,7 +130,7 @@
return currentCompareResult
- def compareTopos( self, Mininet, attempts=1 ):
+ def compareTopos( self, Mininet, attempts=1, includeCaseDesc=True ):
"""
Description:
compares the links and hosts and switches of the onos to the mininet.
@@ -142,9 +142,10 @@
Returns main.TRUE if the results are matching else
Returns main.FALSE
"""
- main.case( "Compare ONOS Topology view to Mininet topology" )
- main.caseExplanation = "Compare topology elements between Mininet" +\
- " and ONOS"
+ if includeCaseDesc:
+ main.case( "Compare ONOS Topology view to Mininet topology" )
+ main.caseExplanation = "Compare topology elements between Mininet" +\
+ " and ONOS"
main.log.info( "Gathering topology information from Mininet" )
devicesResults = main.FALSE # Overall Boolean for device correctness
linksResults = main.FALSE # Overall Boolean for link correctness
diff --git a/TestON/tests/dependencies/utils.py b/TestON/tests/dependencies/utils.py
index 6155201..6537afc 100644
--- a/TestON/tests/dependencies/utils.py
+++ b/TestON/tests/dependencies/utils.py
@@ -23,7 +23,7 @@
def __init__( self ):
self.default = ''
- def mininetCleanIntro( self ):
+ def mininetCleanIntro( self, includeCaseDesc=True ):
"""
Description:
Introduction information of the mininet clean up
@@ -31,9 +31,9 @@
Returns:
"""
main.log.report( "Stop Mininet" )
-
- main.case( "Stop Mininet" )
- main.caseExplanation = "Stopping the current mininet to start up fresh"
+ if includeCaseDesc:
+ main.case( "Stop Mininet" )
+ main.caseExplanation = "Stopping the current mininet to start up fresh"
def mininetCleanup( self, Mininet, timeout=5, exitTimeout=1000 ):
"""
@@ -54,7 +54,7 @@
onfail="Failed to stopped mininet" )
return topoResult
- def copyKarafLog( self, copyFileName="", before=False ):
+ def copyKarafLog( self, copyFileName="", before=False, includeCaseDesc=True ):
"""
Description:
copy the karaf log and verify it.
@@ -65,9 +65,10 @@
"""
# TODO: Also grab the rotated karaf logs
main.log.report( "Copy karaf logs" )
- main.case( "Copy karaf logs" )
- main.caseExplanation = "Copying the karaf logs to preserve them through" +\
- "reinstalling ONOS"
+ if includeCaseDesc:
+ main.case( "Copy karaf logs" )
+ main.caseExplanation = "Copying the karaf logs to preserve them through" +\
+ "reinstalling ONOS"
main.step( "Copying karaf logs" )
stepResult = main.TRUE
scpResult = main.TRUE
@@ -78,11 +79,10 @@
"/tmp/karaf.log",
direction="from" )
copyResult = copyResult and main.ONOSbench.cpLogsToDir( "/tmp/karaf.log", main.logdir,
- copyFileName= ( copyFileName + "_karaf.log." +
- ctrl.name + "_" )
- if before else
- ( "karaf.log." + ctrl.name +
- "." + copyFileName ) )
+ copyFileName=( copyFileName + "_karaf.log." +
+ ctrl.name + "_" ) if before else
+ ( "karaf.log." + ctrl.name +
+ "." + copyFileName ) )
if scpResult and copyResult:
stepResult = main.TRUE and stepResult
else: