Skip to contentSkip to conversation

KVM Test: Copy the keyval of guest test into client results

PATCH New sshang 1 participant 1 message Feb 23, 2010 KVM

lore
Share & tools
lore

sshang

author
#0 lore raw

PATCH 1/1 KVM Test: Copy the keyval of guest test into client results

Add copying the keyval of guest test into client results so that server can
get it in autotest case.

---
 client/tests/kvm/tests/autotest.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
client/tests/kvm/tests/autotest.py +7 -1
index f19a2ec..79aa6b1 100644
@@ -1,4 +1,4 @@
-import os, logging
+import os, logging, shutil
 from autotest_lib.client.common_lib import error
 from autotest_lib.client.bin import utils
 import kvm_subprocess, kvm_utils, kvm_test_utils, scan_results
@@ -144,6 +144,12 @@ def run_autotest(test, params, env):
     if not vm.copy_files_from("%s/results/default/*" % autotest_path,
                               guest_results_dir):
         logging.error("Could not copy results back from guest")
+    else:
+        perf_file_path = os.path.join(guest_results_dir,"%s/results/keyval" % test_name)
+        if os.path.exists(perf_file_path):
+            logging.info("Copying perf keyval to host results")
+            perf_file_dest = os.path.join(test.outputdir,"results/keyval")
+            shutil.copyfile(perf_file_path,perf_file_dest) 
 
     # Report test results
     logging.info("Results (test, status, duration, info):")
Signature · 1 line
1.5.5.6