Commit cdb74623 authored by Dirk Pranke's avatar Dirk Pranke Committed by Commit Bot

Have Android bin/run_ wrappers call test_env.py directly.

Currently, when a bot runs a test (say, url_unittests) on an
Android build, it'll launch `python test_env.py logdog_wrapper.py
bin/run_url_unittests` (roughly speaking).

This CL flips that around so that the generated bin/run_url_unittests
script will invoke test_env.py to launch url_unittests (and the bot
will then invoke bin/run_url_unittests directly).

This slightly reduces the discrepancy between what a dev runs locally
and what the bot runs, and will make Android consistent with every other
platform.

Bug: 816629
Change-Id: I76727641b5a4362f37762ed4ed4b175eea58ce2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2506634Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#822042}
parent b3d2e070
...@@ -739,10 +739,12 @@ template("test_runner_script") { ...@@ -739,10 +739,12 @@ template("test_runner_script") {
data_deps = [] data_deps = []
} }
executable = "//testing/test_env.py"
if (defined(android_test_runner_script)) { if (defined(android_test_runner_script)) {
executable = android_test_runner_script _runner_script = android_test_runner_script
} else { } else {
executable = "//build/android/test_runner.py" _runner_script = "//build/android/test_runner.py"
} }
deps = [] deps = []
...@@ -753,9 +755,10 @@ template("test_runner_script") { ...@@ -753,9 +755,10 @@ template("test_runner_script") {
if (defined(invoker.data_deps)) { if (defined(invoker.data_deps)) {
data_deps = invoker.data_deps data_deps = invoker.data_deps
} }
data = [] data = [ "//testing/test_env.py" ]
executable_args = [ executable_args = [
"@WrappedPath(" + rebase_path(_runner_script, root_build_dir) + ")",
_test_type, _test_type,
"--output-directory", "--output-directory",
"@WrappedPath(.)", "@WrappedPath(.)",
......
...@@ -1532,7 +1532,6 @@ class MetaBuildWrapper(object): ...@@ -1532,7 +1532,6 @@ class MetaBuildWrapper(object):
if asan: if asan:
cmdline += [os.path.join('bin', 'run_with_asan'), '--'] cmdline += [os.path.join('bin', 'run_with_asan'), '--']
cmdline += [ cmdline += [
'../../testing/test_env.py',
'../../build/android/test_wrapper/logdog_wrapper.py', '../../build/android/test_wrapper/logdog_wrapper.py',
'--target', target, '--target', target,
'--logdog-bin-cmd', '../../.task_template_packages/logdog_butler', '--logdog-bin-cmd', '../../.task_template_packages/logdog_butler',
......
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