Changed utils.ExecuteCommandInChroot() to
command_executer.ChrootRunCommand().
With this move, a single command_executer can be instantiated with the
correct logger and all commands including chroot commands will be logged
to the same file.
This is a pre-requisite to making crosperf log individual autotests to
different files when running in parallel.
PRESUBMIT=passed
R=shenhan,bjanakiraman
DELTA=100 (26 added, 21 deleted, 53 changed)
OCL=57589-p2
RCL=57591-p2
RDATE=2011/12/28 15:13:37
P4 change: 42662714
diff --git a/v14/build_tc.py b/v14/build_tc.py
index 0493790..ffc793a 100755
--- a/v14/build_tc.py
+++ b/v14/build_tc.py
@@ -46,7 +46,7 @@
"usr/local/portage/crossdev/cross-%s" % self._ctarget)
if not os.path.exists(cross_symlink):
command = "./setup_board --board=%s" % self._board
- utils.ExecuteCommandInChroot(self._chromeos_root, command)
+ self._ce.ChrootRunCommand(self._chromeos_root, command)
def Build(self):
self.RunSetupBoardIfNecessary()
@@ -113,7 +113,7 @@
def UninstallTool(self):
command = "sudo CLEAN_DELAY=0 emerge -C cross-%s/%s" % (self._ctarget, self._name)
- utils.ExecuteCommandInChroot(self._chromeos_root, command)
+ self._ce.ChrootRunCommand(self._chromeos_root, command)
def BuildTool(self):
env = self._build_env
@@ -130,11 +130,11 @@
env_string = " ".join(["%s=\"%s\"" % var for var in env.items()])
command = "emerge =cross-%s/%s-9999" % (self._ctarget, self._name)
full_command = "sudo %s %s" % (env_string, command)
- utils.ExecuteCommandInChroot(self._chromeos_root, full_command)
+ self._ce.ChrootRunCommand(self._chromeos_root, full_command)
def SwitchToBFD(self):
command = "sudo binutils-config %s-2.21" % self._ctarget
- utils.ExecuteCommandInChroot(self._chromeos_root, command)
+ self._ce.ChrootRunCommand(self._chromeos_root, command)
def SwitchToOriginalLD(self):
pass