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

Side by Side Diff: au_test_harness/vm_au_worker.py

Issue 6736023: Install test scripts into chroot. (Closed) Base URL: http://git.chromium.org/git/crostestutils.git@master
Patch Set: Fix path for chroot Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Module containing implementation of an au_worker for virtual machines.""" 5 """Module containing implementation of an au_worker for virtual machines."""
6 6
7 import os 7 import os
8 import threading 8 import threading
9 import unittest 9 import unittest
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 ] 96 ]
97 if proxy_port: cmd.append('--proxy_port=%s' % proxy_port) 97 if proxy_port: cmd.append('--proxy_port=%s' % proxy_port)
98 self.RunUpdateCmd(cmd, log_directory) 98 self.RunUpdateCmd(cmd, log_directory)
99 99
100 def VerifyImage(self, unittest, percent_required_to_pass=100): 100 def VerifyImage(self, unittest, percent_required_to_pass=100):
101 """Runs vm smoke suite to verify image.""" 101 """Runs vm smoke suite to verify image."""
102 log_directory = self.GetNextResultsPath('verify') 102 log_directory = self.GetNextResultsPath('verify')
103 (_, _, log_directory_in_chroot) = log_directory.rpartition('chroot') 103 (_, _, log_directory_in_chroot) = log_directory.rpartition('chroot')
104 # image_to_live already verifies lsb-release matching. This is just 104 # image_to_live already verifies lsb-release matching. This is just
105 # for additional steps. 105 # for additional steps.
106 commandWithArgs = ['%s/cros_run_vm_test' % self.crosutilsbin, 106 commandWithArgs = ['cros_run_vm_test',
107 '--image_path=%s' % self.vm_image_path, 107 '--image_path=%s' % cros_lib.ReinterpretPathForChroot(
108 self.vm_image_path),
108 '--snapshot', 109 '--snapshot',
109 '--persist', 110 '--persist',
110 '--kvm_pid=%s' % self._kvm_pid_file, 111 '--kvm_pid=%s' % self._kvm_pid_file,
111 '--ssh_port=%s' % self._ssh_port, 112 '--ssh_port=%s' % self._ssh_port,
112 '--results_dir_root=%s' % log_directory_in_chroot, 113 '--results_dir_root=%s' % log_directory_in_chroot,
113 self.verify_suite, 114 self.verify_suite,
114 ] 115 ]
115 if self.graphics_flag: commandWithArgs.append(self.graphics_flag) 116 if self.graphics_flag: commandWithArgs.append(self.graphics_flag)
116 output = cros_lib.RunCommand(commandWithArgs, error_ok=True, 117 output = cros_lib.RunCommand(commandWithArgs, error_ok=True,
117 enter_chroot=False, redirect_stdout=True) 118 enter_chroot=True, redirect_stdout=True,
119 cwd=self.crosutils)
118 return self.AssertEnoughTestsPassed(unittest, output, 120 return self.AssertEnoughTestsPassed(unittest, output,
119 percent_required_to_pass) 121 percent_required_to_pass)
120 122
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698