runtest: Remove run_command -> android_build dependency.

This is desired because run_command is used by puppetmaster which should have
no dependency on android build system.
This commit is contained in:
Brett Chabot
2009-06-29 17:40:45 -07:00
parent e0bf8162f0
commit bf7863ec27
2 changed files with 26 additions and 8 deletions

View File

@@ -23,7 +23,6 @@ import threading
import time
# local imports
import android_build
import errors
import logger
@@ -129,16 +128,14 @@ def RunHostCommand(binary, valgrind=False):
output are always discarded.
Args:
binary: basename of the file to be run. It is expected to be under
out/host/<os>-<arch>/bin.
binary: full path of the file to be run.
valgrind: If True the command will be run under valgrind.
Returns:
The command exit code (int)
"""
full_path = os.path.join(android_build.GetHostBin(), binary)
if not valgrind:
subproc = subprocess.Popen(full_path, stdout=subprocess.PIPE,
subproc = subprocess.Popen(binary, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
subproc.wait()
if subproc.returncode != 0: # In case of error print the output