Change some of the log file setup
Change-Id: I9d41354b96664c856c96e6d49c534c556f572dac
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index d6dd287..f7b1eed 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -231,11 +231,11 @@
main.ONOSbench.dumpONOSCmd( main.Cluster.active( 0 ).ipAddress,
"flows",
main.logdir,
- "flowsBefore" + main.resultFileName )
+ main.resultFileName + "_FlowsBefore" )
main.ONOSbench.dumpONOSCmd( main.Cluster.active( 0 ).ipAddress,
"groups",
main.logdir,
- "groupsBefore" + main.resultFileName )
+ main.resultFileName + "_GroupsBefore" )
@staticmethod
def checkFlowsByDpid( main, dpid, minFlowCount, sleep=10 ):
@@ -273,11 +273,11 @@
main.ONOSbench.dumpONOSCmd( main.Cluster.active( 0 ).ipAddress,
"flows",
main.logdir,
- "flowsOn" + tag )
+ tag + "_FlowsOn" )
main.ONOSbench.dumpONOSCmd( main.Cluster.active( 0 ).ipAddress,
"groups",
main.logdir,
- "groupsOn" + tag )
+ tag + "_GroupsOn" )
@staticmethod
def killLink( main, end1, end2, switches, links ):
@@ -408,7 +408,7 @@
main.utils.mininetCleanup( main.Mininet1 )
- main.utils.copyKarafLog( main.resultFileName + "_" )
+ main.utils.copyKarafLog( main.resultFileName, before=True )
for ctrl in main.Cluster.active():
main.ONOSbench.onosStop( ctrl.ipAddress )
diff --git a/TestON/tests/dependencies/utils.py b/TestON/tests/dependencies/utils.py
index e1c2027..6155201 100644
--- a/TestON/tests/dependencies/utils.py
+++ b/TestON/tests/dependencies/utils.py
@@ -54,7 +54,7 @@
onfail="Failed to stopped mininet" )
return topoResult
- def copyKarafLog( self, copyFileName="" ):
+ def copyKarafLog( self, copyFileName="", before=False ):
"""
Description:
copy the karaf log and verify it.
@@ -78,7 +78,10 @@
"/tmp/karaf.log",
direction="from" )
copyResult = copyResult and main.ONOSbench.cpLogsToDir( "/tmp/karaf.log", main.logdir,
- copyFileName=( "karaf.log." + ctrl.name +
+ copyFileName= ( copyFileName + "_karaf.log." +
+ ctrl.name + "_" )
+ if before else
+ ( "karaf.log." + ctrl.name +
"." + copyFileName ) )
if scpResult and copyResult:
stepResult = main.TRUE and stepResult