Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3082)

Unified Diff: bin/au_test_harness/vm_au_worker.py

Issue 6672007: Add logs for update_engine and image_to_live to test artifacts. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Fix bug in RunCommand Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bin/au_test_harness/dev_server_wrapper.py ('k') | bin/cros_run_vm_update » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/au_test_harness/vm_au_worker.py
diff --git a/bin/au_test_harness/vm_au_worker.py b/bin/au_test_harness/vm_au_worker.py
index 475db58cfb9dfff719fb6f266e76d78090e6275c..9788fddcb27e8cdf2132a4353060205c3d95bbd5 100644
--- a/bin/au_test_harness/vm_au_worker.py
+++ b/bin/au_test_harness/vm_au_worker.py
@@ -58,6 +58,7 @@ class VMAUWorker(au_worker.AUWorker):
def UpdateImage(self, image_path, src_image_path='', stateful_change='old',
proxy_port='', private_key_path=None):
"""Updates VM image with image_path."""
+ log_directory = self.GetNextResultsPath('update')
stateful_change_flag = self.GetStatefulChangeFlag(stateful_change)
if src_image_path and self._first_update:
src_image_path = self.vm_image_path
@@ -65,6 +66,7 @@ class VMAUWorker(au_worker.AUWorker):
cmd = ['%s/cros_run_vm_update' % self.crosutilsbin,
'--vm_image_path=%s' % self.vm_image_path,
+ '--update_log=%s' % os.path.join(log_directory, 'update_engine.log'),
'--snapshot',
self.graphics_flag,
'--persist',
@@ -74,15 +76,17 @@ class VMAUWorker(au_worker.AUWorker):
]
self.AppendUpdateFlags(cmd, image_path, src_image_path, proxy_port,
private_key_path)
- self.RunUpdateCmd(cmd)
+ self.RunUpdateCmd(cmd, log_directory)
def UpdateUsingPayload(self, update_path, stateful_change='old',
proxy_port=None):
"""Updates a vm image using cros_run_vm_update."""
+ log_directory = self.GetNextResultsPath('update')
stateful_change_flag = self.GetStatefulChangeFlag(stateful_change)
cmd = ['%s/cros_run_vm_update' % self.crosutilsbin,
'--payload=%s' % update_path,
'--vm_image_path=%s' % self.vm_image_path,
+ '--update_log=%s' % os.path.join(log_directory, 'update_engine.log'),
'--snapshot',
self.graphics_flag,
'--persist',
@@ -91,11 +95,12 @@ class VMAUWorker(au_worker.AUWorker):
stateful_change_flag,
]
if proxy_port: cmd.append('--proxy_port=%s' % proxy_port)
- self.RunUpdateCmd(cmd)
+ self.RunUpdateCmd(cmd, log_directory)
def VerifyImage(self, unittest, percent_required_to_pass=100):
"""Runs vm smoke suite to verify image."""
- test_directory = self.GetNextResultsPath('verify')
+ log_directory = self.GetNextResultsPath('verify')
+ (_, _, log_directory_in_chroot) = log_directory.rpartition('chroot')
# image_to_live already verifies lsb-release matching. This is just
# for additional steps.
commandWithArgs = ['%s/cros_run_vm_test' % self.crosutilsbin,
@@ -104,7 +109,7 @@ class VMAUWorker(au_worker.AUWorker):
'--persist',
'--kvm_pid=%s' % self._kvm_pid_file,
'--ssh_port=%s' % self._ssh_port,
- '--results_dir_root=%s' % test_directory,
+ '--results_dir_root=%s' % log_directory_in_chroot,
self.verify_suite,
]
if self.graphics_flag: commandWithArgs.append(self.graphics_flag)
« no previous file with comments | « bin/au_test_harness/dev_server_wrapper.py ('k') | bin/cros_run_vm_update » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698