Index: breakpad/BUILD.gn |
diff --git a/breakpad/BUILD.gn b/breakpad/BUILD.gn |
index a3b6d1d46988a3be4a1f11c3f1c4e7e6daa0491c..0fd15ceb199ff2ae97e6df94f8ba5271a2c0dc95 100644 |
--- a/breakpad/BUILD.gn |
+++ b/breakpad/BUILD.gn |
@@ -623,7 +623,10 @@ |
configs += [ "//build/config/compiler:no_chromium_code" ] |
} |
- test("breakpad_unittests") { |
+ # "breakpad_unittests" cannot use the test() template because the test is run |
+ # as an executable not as an APK on Android. |
+ executable("breakpad_unittests") { |
+ testonly = true |
set_sources_assignment_filter([]) |
sources = [ |
"linux/breakpad_googletest_includes.h", |
@@ -679,7 +682,6 @@ |
} |
if (is_android) { |
- use_raw_android_executable = true |
sources += [ "src/common/android/breakpad_getcontext_unittest.cc" ] |
libs = [ "log" ] |
include_dirs += [ "src/common/android/include" ] |
@@ -882,8 +884,29 @@ |
} |
if (is_android) { |
+ create_native_executable_dist("breakpad_unittests_deps") { |
+ testonly = true |
+ dist_dir = "$root_out_dir/breakpad_unittests_deps" |
+ binary = "$root_out_dir/breakpad_unittests" |
+ deps = [ |
+ ":breakpad_unittests", |
+ ] |
+ |
+ if (is_component_build) { |
+ deps += [ "//build/android:cpplib_stripped" ] |
+ } |
+ } |
+ |
+ test_runner_script("breakpad_unittests__test_runner_script") { |
+ test_name = "breakpad_unittests" |
+ test_type = "gtest" |
+ test_suite = "breakpad_unittests" |
+ isolate_file = "breakpad_unittests.isolate" |
+ } |
+ |
# TODO(GYP) Delete this after we've converted everything to GN. |
- group("breakpad_unittests_deps") { |
+ # The _run targets exist only for compatibility w/ GYP. |
+ group("breakpad_unittests_apk_run") { |
testonly = true |
deps = [ |
":breakpad_unittests", |