Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1487)

Unified Diff: mojo/edk/system/BUILD.gn

Issue 728783003: Add infrastructure to run tests on android. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Use file_hash Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/edk/system/BUILD.gn
diff --git a/mojo/edk/system/BUILD.gn b/mojo/edk/system/BUILD.gn
index b87c76ad490b9d68923af9de37d9eb5003c43d6c..f3c48ba4fd15c5f8d4c4130b6d1f7fd7034f932a 100644
--- a/mojo/edk/system/BUILD.gn
+++ b/mojo/edk/system/BUILD.gn
@@ -2,6 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+if (is_android) {
+ import("//build/config/android/config.gni")
+ import("//build/config/android/rules.gni")
+}
+
config("system_config") {
defines = [
# Ensures that dependent projects import the core functions on Windows.
@@ -99,10 +104,8 @@ component("system") {
allow_circular_includes_from = [ "//mojo/edk/embedder" ]
}
-# GYP version: mojo/edk/mojo_edk.gyp:mojo_system_unittests
test("mojo_system_unittests") {
sources = [
- "../test/multiprocess_test_helper_unittest.cc",
"channel_endpoint_id_unittest.cc",
"channel_manager_unittest.cc",
"channel_unittest.cc",
@@ -114,10 +117,7 @@ test("mojo_system_unittests") {
"local_data_pipe_unittest.cc",
"memory_unittest.cc",
"message_pipe_dispatcher_unittest.cc",
- "message_pipe_test_utils.cc",
- "message_pipe_test_utils.h",
"message_pipe_unittest.cc",
- "multiprocess_message_pipe_unittest.cc",
"options_validation_unittest.cc",
"platform_handle_dispatcher_unittest.cc",
"raw_channel_unittest.cc",
@@ -134,6 +134,15 @@ test("mojo_system_unittests") {
"waiter_unittest.cc",
]
+ if (!is_android) {
+ sources += [
+ "../test/multiprocess_test_helper_unittest.cc",
viettrungluu 2014/11/21 22:18:41 Are there compilation problems? I'd rather not do
qsr 2014/11/24 12:00:48 Done.
+ "message_pipe_test_utils.cc",
+ "message_pipe_test_utils.h",
+ "multiprocess_message_pipe_unittest.cc",
+ ]
+ }
+
deps = [
":system",
"//base",
@@ -143,19 +152,29 @@ test("mojo_system_unittests") {
"//testing/gtest",
]
+ if (is_android) {
+ deps += [
+ "//testing/android:native_test_native_code",
+ ]
+ }
+
allow_circular_includes_from = [ "//mojo/edk/embedder:embedder_unittests" ]
}
-# GYP version: mojo/edk/mojo_edk.gyp:mojo_message_pipe_perftests
test("mojo_message_pipe_perftests") {
sources = [
- "message_pipe_perftest.cc",
- "message_pipe_test_utils.h",
- "message_pipe_test_utils.cc",
"test_utils.cc",
"test_utils.h",
]
+ if (!is_android) {
+ sources += [
+ "message_pipe_perftest.cc",
+ "message_pipe_test_utils.h",
+ "message_pipe_test_utils.cc",
+ ]
+ }
+
deps = [
":system",
"//base",
@@ -165,3 +184,12 @@ test("mojo_message_pipe_perftests") {
"//testing/gtest",
]
}
+
+if (is_android) {
+ unittest_apk("mojo_system_unittests_apk") {
+ deps = [
+ ":mojo_system_unittests",
+ ]
+ unittests_dep = ":mojo_system_unittests"
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698