The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/686094f6b082e2595bc5d429cdcdaa3b76217501
commit 686094f6b082e2595bc5d429cdcdaa3b76217501
Author: jbudorick <jbudorick@chromium.org>
Date: Thu May 04 21:52:40 2017
[android] Write a runner script to the top-level output dir for gtests.
Android GN builds have been unable to build raw "unit_tests" as a target,
instead relying on unit_tests_apk or chrome/test:unit_tests. Linux builds,
in contrast, can do so without issue. I had thought that the issue was
that a "unit_tests" gn target in another directory was preventing gn
from creating a top-level alias. While this may be true, it's not the
reason for the discrepancy between Android and Linux builds. Instead,
the difference is that Linux builds create a unit_tests executable in
the top-level output directory, while Android builds create an APK and
a wrapper script in child directories.
This CL writes an additional wrapper script for gtest targets on Android
in the top-level directory that matches the suite's output_name (usually
its target name), allowing us to successfully build raw "unit_tests" on
Android. As a bonus, we can now run
$ out/Release/unit_tests
(etc) on Android.
BUG=716117
Review-Url: https://codereview.chromium.org/2851523002
Cr-Commit-Position: refs/heads/master@{#469485}
[modify] https://crrev.com/686094f6b082e2595bc5d429cdcdaa3b76217501/build/config/android/internal_rules.gni
[modify] https://crrev.com/686094f6b082e2595bc5d429cdcdaa3b76217501/testing/test.gni
Comment 1 by bugdroid1@chromium.org
, May 4 2017