Description[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}
Committed: https://chromium.googlesource.com/chromium/src/+/686094f6b082e2595bc5d429cdcdaa3b76217501
Patch Set 1 #Patch Set 2 : alphabetize #Patch Set 3 : trivial rebase #
Messages
Total messages: 17 (13 generated)
|