VatHistory: Add ability to trace file executions 58/9958/2
authorPeter Mikus <pmikus@cisco.com>
Fri, 5 Jan 2018 08:45:07 +0000 (08:45 +0000)
committerPeter Mikus <pmikus@cisco.com>
Fri, 5 Jan 2018 08:48:05 +0000 (08:48 +0000)
Change-Id: I9f6de8d2b86ddbbdf1524dcc12d8ed5a33b3266e
Signed-off-by: Peter Mikus <pmikus@cisco.com>
bootstrap-verify-perf.sh
resources/libraries/python/VatExecutor.py

index e2d37e2..4b86c6e 100755 (executable)
@@ -244,6 +244,7 @@ case "$TEST_TAG" in
               --include pdrdiscANDnic_intel-xl710AND1t1cANDipsechwANDbase \
               --include pdrdiscANDnic_intel-xl710AND2t2cANDipsechwANDbase \
               tests/
+        RETURN_STATUS=$(echo $?)
         ;;
     VPP-VERIFY-PERF-IP4 )
         pybot ${PYBOT_ARGS} \
index febfe9f..de6baab 100644 (file)
@@ -152,6 +152,9 @@ class VatExecutor(object):
             vat=Constants.VAT_BIN_NAME,
             input=vat_name)
 
+        with open(vat_name, 'r') as tmp_f:
+            VatHistory.add_to_vat_history(node, tmp_f.read())
+
         try:
             (ret_code, stdout, stderr) = ssh.exec_command(cmd, timeout)
         except SSHTimeout:
@@ -197,6 +200,10 @@ class VatExecutor(object):
                                     vat=Constants.VAT_BIN_NAME)
         cmd_input = "exec exec {0}".format(fname)
 
+        VatHistory.add_to_vat_history(node, cmd_input)
+        with open(fname, 'r') as tmp_f:
+            VatHistory.add_to_vat_history(node, tmp_f.read())
+
         try:
             (ret_code, stdout, stderr) = ssh.exec_command_sudo(cmd, cmd_input,
                                                                timeout)

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.