diff mbox

KVM-Test: Add passthrough the keyval of the test into server

Message ID 1271404898-31424-1-git-send-email-sshang@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

sshang April 16, 2010, 8:01 a.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/kvm_test_utils.py b/client/tests/kvm/kvm_test_utils.py
index 699601e..eef5bec 100644
--- a/client/tests/kvm/kvm_test_utils.py
+++ b/client/tests/kvm/kvm_test_utils.py
@@ -316,6 +316,13 @@  def run_autotest(vm, session, control_path, timeout, outputdir):
         if not vm.copy_files_from("%s/results/default/*" % autotest_path,
                                   guest_results_dir):
             logging.error("Could not copy autotest results 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)
 
 
     def get_results_summary():