Commit 08e317da authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

Reland "[test] Pass suite environment to Android test runner"

This is a reland of 18c90f48

Original change's description:
> [test] Pass suite environment to Android test runner
>
> TBR=sergiyb@chromium.org
>
> Bug: v8:8046
> Change-Id: I201f7a7ee119628e14c864602a2d3cbadfc4052b
> Reviewed-on: https://chromium-review.googlesource.com/1170779
> Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55051}

NOTRY=true

Bug: v8:8046
Change-Id: I73923a2ae532bb7d773c87fd77844b4e655b568c
Reviewed-on: https://chromium-review.googlesource.com/1171382
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarSergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55064}
parent ca613487
...@@ -647,16 +647,8 @@ ...@@ -647,16 +647,8 @@
# Precision: # Precision:
'es6/math-log2-log10': [FAIL], 'es6/math-log2-log10': [FAIL],
# Timezone issues: # Timezone issues:
'icu-date-lord-howe': [FAIL],
'icu-date-to-string': [FAIL], 'icu-date-to-string': [FAIL],
'regress/regress-6288': [FAIL], 'regress/regress-6288': [FAIL],
'tzoffset-seoul': [FAIL],
'tzoffset-seoul-noi18n': [FAIL],
'tzoffset-transition-apia': [FAIL],
'tzoffset-transition-lord-howe': [FAIL],
'tzoffset-transition-moscow': [FAIL],
'tzoffset-transition-new-york': [FAIL],
'tzoffset-transition-new-york-noi18n': [FAIL],
# OOM: # OOM:
'regress/regress-599414-array-concat-fast-path': [FAIL], 'regress/regress-599414-array-concat-fast-path': [FAIL],
'regress/regress-748069': [FAIL], 'regress/regress-748069': [FAIL],
......
...@@ -141,7 +141,7 @@ class _Driver(object): ...@@ -141,7 +141,7 @@ class _Driver(object):
skip_if_missing=True, skip_if_missing=True,
) )
def run(self, target_dir, binary, args, rel_path, timeout): def run(self, target_dir, binary, args, rel_path, timeout, env=None):
"""Execute a command on the device's shell. """Execute a command on the device's shell.
Args: Args:
...@@ -151,6 +151,7 @@ class _Driver(object): ...@@ -151,6 +151,7 @@ class _Driver(object):
args: List of arguments to pass to the binary. args: List of arguments to pass to the binary.
rel_path: Relative path on device to use as CWD. rel_path: Relative path on device to use as CWD.
timeout: Timeout in seconds. timeout: Timeout in seconds.
env: The environment variables with which the command should be run.
""" """
binary_on_device = os.path.join(DEVICE_DIR, target_dir, binary) binary_on_device = os.path.join(DEVICE_DIR, target_dir, binary)
cmd = [binary_on_device] + args cmd = [binary_on_device] + args
...@@ -159,6 +160,7 @@ class _Driver(object): ...@@ -159,6 +160,7 @@ class _Driver(object):
cmd, cmd,
cwd=os.path.join(DEVICE_DIR, rel_path), cwd=os.path.join(DEVICE_DIR, rel_path),
check_return=True, check_return=True,
env=env,
timeout=timeout, timeout=timeout,
retries=0, retries=0,
) )
......
...@@ -249,7 +249,7 @@ class AndroidCommand(BaseCommand): ...@@ -249,7 +249,7 @@ class AndroidCommand(BaseCommand):
timed_out = False timed_out = False
try: try:
stdout = android_driver().run( stdout = android_driver().run(
'bin', self.shell_name, self.args, '.', self.timeout) 'bin', self.shell_name, self.args, '.', self.timeout, self.env)
except CommandFailedException as e: except CommandFailedException as e:
return_code = e.status return_code = e.status
stdout = e.output stdout = e.output
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment