Merge "Allow TestON to be run from anywhere."
diff --git a/TestON/tests/SCPFportLat/README b/TestON/tests/SCPFportLat/README
new file mode 100644
index 0000000..59e28d9
--- /dev/null
+++ b/TestON/tests/SCPFportLat/README
@@ -0,0 +1,31 @@
+PORT LATENCY
+
+Summary: This is a performance test suite to measure the time it takes ONOS 
+        to recognize a port going down and up.
+
+Pre-requisites: To run out-of-the box this test requires 7 NODES. 
+    OC1->OC7 must be set before initiating the test. Passwordless login 
+    must be set from TestStation "admin" root user. The 7 NODES must have
+    their clocks synced to TestStation via ptpd and be accurate to the 
+    millisecond. You will also need the Wireshark disector to see openflow packets.
+
+***If you wish to run this test with less than 7 nodes the following 
+    alterations must be made:
+
+NOTE: Only scale sizes 1,3,5 and 7 will be functional
+
+--In the .params, remove any values in the comma separated list in the 
+    <scale> tag that are above your desired cluster size. 
+
+--In the .params file remove one instance of “1,2” from the <testcases> 
+    tag for each value you removed from <scale> (case 1 and 2 are each 
+    called once for each scale value)
+
+--In the .params file, change the value in the <max> tag to your 
+    desired scale size (1,3, or 5)
+
+--In the .topo file, change the <ONOSbench/COMPONENTS/nodes> tag to your 
+    desired scale size 
+
+--Also in the .topo file, you will need to remove all unneeded <ONOS X 
+    cli> tags and their contents
diff --git a/TestON/tests/SCPFportLat/SCPFportLat.params b/TestON/tests/SCPFportLat/SCPFportLat.params
index a453767..00c8c19 100644
--- a/TestON/tests/SCPFportLat/SCPFportLat.params
+++ b/TestON/tests/SCPFportLat/SCPFportLat.params
@@ -72,9 +72,7 @@
 
     <DB>
         <postToDB>no</postToDB>
-        <portEventResultPath>
-            /tmp/portEventResultDb.log
-        </portEventResultPath>
+        <portEventResultPath>/tmp/portEventResultDb</portEventResultPath>
     </DB>
 
     <JSON>
diff --git a/TestON/tests/SCPFswitchLat/SCPFswitchLat.py b/TestON/tests/SCPFswitchLat/SCPFswitchLat.py
index 439efff..78ae16c 100644
--- a/TestON/tests/SCPFswitchLat/SCPFswitchLat.py
+++ b/TestON/tests/SCPFswitchLat/SCPFswitchLat.py
@@ -571,10 +571,11 @@
                             temp = 0
                         if index == 1:
                             tFinAck = float(temp) * 1000.0
+                            main.log.info("DEBUG-- tFinAck: " + str(tFinAck))
                         elif index == 3:
                             tAck = float(temp) * 1000.0
+                            main.log.info("DEBUG-- tAck: " + str(tAck))
                         else:
-                            tFinAck = 0
                             tAck = 0
                     else:
                         main.log.error('Tshark output file for OFP' +
@@ -584,6 +585,8 @@
                         assertion = main.FALSE
 
                     index += 1
+                main.log.info("DEBUG-- tFinAck: " + str(tFinAck))
+                main.log.info("DEBUG-- tAck: " + str(tAck))
 
             # with open() as f takes care of closing file
 
@@ -610,6 +613,7 @@
                 ackToDevice = float(deviceTimestamp) - float(tAck)
                 deviceToGraph = float(graphTimestamp) - float(deviceTimestamp)
                 endToEndDisc = int(graphTimestamp) - int(tFinAck)
+                main.log.info("DEBUG-- endToEndDisc = graphTimestamp - tFinAck  == (" + str(graphTimestamp) + "-" + str(tFinAck) + ")") 
 
                 if endToEndDisc >= thresholdMin and\
                    endToEndDisc < thresholdMax and i >= iterIgnore:
@@ -732,33 +736,43 @@
 
             endToEndAvg = round(numpy.mean(endToEndList), 2)
             endToEndStdDev = round(numpy.std(endToEndList), 2)
+            main.log.info("endToEndList: " + str(endToEndList))
 
             tcpToFeatureAvg = round(numpy.mean(tcpToFeatureList), 2)
             tcpToFeatureStdDev = round(numpy.std(tcpToFeatureList), 2)
+            main.log.info("tcpToFeatureList: " + str(tcpToFeatureList))
 
             featureToRoleAvg = round(numpy.mean(featureToRoleList), 2)
             featureToRoleStdDev = round(numpy.std(featureToRoleList), 2)
+            main.log.info("featureToRoleList: " + str(featureToRoleList)) 
 
             roleToOfpAvg = round(numpy.mean(roleToOfpList), 2)
             roleToOfpStdDev = round(numpy.std(roleToOfpList), 2)
+            main.log.info("roleToOfList: " + str(roleToOfpList))
 
             ofpToDeviceAvg = round(numpy.mean(ofpToDeviceList), 2)
             ofpToDeviceStdDev = round(numpy.std(ofpToDeviceList), 2)
+            main.log.info("ofpToDeviceList: " + str(ofpToDeviceList))
 
             deviceToGraphAvg = round(numpy.mean(deviceToGraphList), 2)
             deviceToGraphStdDev = round(numpy.std(deviceToGraphList), 2)
+            main.log.info("deviceToGraphList: " + str(deviceToGraphList))
 
             endToEndDiscAvg = round(numpy.mean(endToEndDiscList), 2)
             endToEndDiscStdDev = round(numpy.std(endToEndDiscList), 2)
+            main.log.info("endToEndDiscList: " + str(endToEndDiscList))
 
             finAckAvg = round(numpy.mean(finAckTransactionList), 2)
             finAckStdDev = round(numpy.std(finAckTransactionList), 2)
+            main.log.info("finAckTransactionList: " + str(finAckTransactionList))
 
             ackToDeviceAvg = round(numpy.mean(ackToDeviceList), 2)
             ackToDeviceStdDev = round(numpy.std(ackToDeviceList), 2)
+            main.log.info("ackToDeviceList: " + str(ackToDeviceList))
 
             deviceToGraphDiscAvg = round(numpy.mean(deviceToGraphDiscList), 2)
             deviceToGraphDiscStdDev = round(numpy.std(deviceToGraphDiscList), 2)
+            main.log.info("deviceToGraphDiscList: " + str(deviceToGraphDiscList))
 
             main.log.report(' - Node ' + str(node + 1) + ' Summary - ')
             main.log.report(' - Switch Connection Statistics - ')