aboutsummaryrefslogtreecommitdiff
path: root/dejagnu
diff options
context:
space:
mode:
authorLuis Lozano <llozano@chromium.org>2015-12-10 10:47:01 -0800
committerchrome-bot <chrome-bot@chromium.org>2015-12-15 01:21:49 +0000
commit036c9233742004aa773a374df381b1cf137484f5 (patch)
treeb1566971ae12ed6ec13f086dd450eca741604f26 /dejagnu
parente627fd61c2edba668eb2af8221892286b13f05a3 (diff)
downloadtoolchain-utils-036c9233742004aa773a374df381b1cf137484f5.tar.gz
crosperf: RunCommand should return one type of object.
Cleaned up the interfaces for the RunCommand routines. These were returning different types (int or tuple) depending on the value of the return_ouput parameter. Returning different unrelated types from a routine is bad practice. Linter complains about this with several warnings like this: "Attempting to unpack a non-sequence defined at line XY of utils.command_executer" BUG=chromium:566256 TEST=ran crosperf with a example experiment file Ran run_tests. Change-Id: Ibb83ab9322c87558077fc4937ef5c0686bbe5417 Reviewed-on: https://chrome-internal-review.googlesource.com/241459 Commit-Ready: Luis Lozano <llozano@chromium.org> Tested-by: Luis Lozano <llozano@chromium.org> Reviewed-by: Han Shen <shenhan@google.com>
Diffstat (limited to 'dejagnu')
-rwxr-xr-xdejagnu/gdb_dejagnu.py4
-rwxr-xr-xdejagnu/run_dejagnu.py8
2 files changed, 6 insertions, 6 deletions
diff --git a/dejagnu/gdb_dejagnu.py b/dejagnu/gdb_dejagnu.py
index 36afc85a..1b8340b8 100755
--- a/dejagnu/gdb_dejagnu.py
+++ b/dejagnu/gdb_dejagnu.py
@@ -161,9 +161,9 @@ class DejagnuExecuter(object):
self.PrepareGdbDefault()
def PrepareGdbDefault(self):
- ret = self._executer.ChrootRunCommand(
+ ret = self._executer.ChrootRunCommandWOutput(
self._chromeos_root,
- 'equery w cross-%s/gdb' % self._target, return_output=True)[1]
+ 'equery w cross-%s/gdb' % self._target)[1]
ret = path.basename(ret.strip())
matcher = re.match(r'(.*).ebuild', ret)
diff --git a/dejagnu/run_dejagnu.py b/dejagnu/run_dejagnu.py
index 14bf058d..5506d0c0 100755
--- a/dejagnu/run_dejagnu.py
+++ b/dejagnu/run_dejagnu.py
@@ -270,9 +270,9 @@ class DejagnuExecuter(object):
def PrepareGccDefault(self):
"""Auto emerging gcc for building purpose only."""
- ret = self._executer.ChrootRunCommand(
+ ret = self._executer.ChrootRunCommandWOutput(
self._chromeos_root,
- 'equery w cross-%s/gcc' % self._target, return_output=True)[1]
+ 'equery w cross-%s/gcc' % self._target)[1]
ret = path.basename(ret.strip())
# ret is expected to be something like 'gcc-4.6.2-r11.ebuild' or
# 'gcc-9999.ebuild' parse it.
@@ -316,8 +316,8 @@ class DejagnuExecuter(object):
cmd = 'cd {0} ; {1} --build_dir={0}'.format(
self._gcc_top_build_dir, validate_failures_py)
self.MountGccSourceAndBuildDir()
- ret = self._executer.ChrootRunCommand(
- self._chromeos_root, cmd, return_output=True)
+ ret = self._executer.ChrootRunCommandWOutput(
+ self._chromeos_root, cmd)
if ret[0] != 0:
self._l.LogWarning('*** validate_failures.py exited with non-zero code,'
'please run it manually inside chroot - \n'