blob: 2b9c79eb7309c2f9a11e3c6f459e094c69020877 [file] [log] [blame]
James Robinson646469d2014-10-03 15:33:28 -07001# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
Sean Kleinbfc34192015-11-16 14:11:59 -08005import("//build/config/nacl/config.gni")
Colin Blundell69666252015-02-13 09:38:24 +01006import("//build/module_args/mojo.gni")
Aaron Boodmanf9b1d792014-10-23 13:35:57 -07007import("//mojo/public/mojo.gni")
Viet-Trung Luu71ad8e72015-10-27 15:40:02 -07008import("//testing/test.gni")
James Robinson646469d2014-10-03 15:33:28 -07009
Petr Hosek0f5eace2015-10-20 19:57:02 -070010declare_args() {
11 mojo_use_go = false
Petr Hosek0f5eace2015-10-20 19:57:02 -070012}
13
James Robinson646469d2014-10-03 15:33:28 -070014group("mojo") {
15 # Meta-target, don't link into production code.
16 testonly = true
James Robinson646469d2014-10-03 15:33:28 -070017 deps = [
James Robinson50c8b272015-10-13 14:30:09 -070018 ":system_thunks",
James Robinson646469d2014-10-03 15:33:28 -070019 ":tests",
James Robinson646469d2014-10-03 15:33:28 -070020 "//mojo/common",
Zachary Anderson3da94c72015-08-11 10:26:56 -070021 "//mojo/dart",
James Robinson646469d2014-10-03 15:33:28 -070022 "//mojo/public",
23 "//mojo/services",
James Robinson646469d2014-10-03 15:33:28 -070024 ]
25
James Robinsona9763132014-10-06 11:18:13 -070026 if (is_android) {
Benjamin Lermand31b1032015-02-06 11:24:58 +010027 deps += [
28 "//mojo/android",
Eric Seidel1635aee2015-07-01 12:29:40 -070029 "//mojo/java",
Benjamin Lermandcc21f72015-05-12 14:32:10 +020030 "//mojo/tools:remote_file_reader",
Benjamin Lermand31b1032015-02-06 11:24:58 +010031 ]
James Robinsona9763132014-10-06 11:18:13 -070032 }
33
Sergey Rogulenkoa61fa562015-04-24 14:22:43 -070034 if (is_linux && mojo_use_go) {
James Robinson8bcf28e2014-12-03 17:39:48 -080035 deps += [ "//mojo/go" ]
gauthamtf22f2472014-10-29 09:32:02 -070036 }
37
Craig Stout0e7c2c32015-09-17 15:14:08 -070038 if (is_linux && !is_fnl) {
James Robinson8bcf28e2014-12-03 17:39:48 -080039 deps += [ "//mojo/python" ]
James Robinson646469d2014-10-03 15:33:28 -070040 }
Nick Braye7561b42015-01-09 10:54:19 -080041
42 if (mojo_use_nacl) {
Sean Kleinbfc34192015-11-16 14:11:59 -080043 if (mojo_use_nacl_sfi) {
44 deps += [
45 "//mojo/nacl/sfi:mojo_nacl",
Sean Klein63243fa2015-11-30 10:39:56 -080046 "//mojo/nacl/sfi:mojo_nacl_tests_sfi",
Sean Kleinbfc34192015-11-16 14:11:59 -080047 ]
48 }
Sean Kleinba7a6562015-09-25 14:43:01 -070049
Sean Kleinbfc34192015-11-16 14:11:59 -080050 if (mojo_use_nacl_nonsfi) {
51 deps += [
Sean Klein63243fa2015-11-30 10:39:56 -080052 "//mojo/nacl/nonsfi:mojo_nacl",
Sean Kleinbfc34192015-11-16 14:11:59 -080053 "//mojo/nacl/nonsfi:mojo_nacl_tests_nonsfi",
54 ]
55 }
Sean Kleinba7a6562015-09-25 14:43:01 -070056 }
James Robinson646469d2014-10-03 15:33:28 -070057}
58
59group("tests") {
60 testonly = true
61 deps = [
Viet-Trung Luu71ad8e72015-10-27 15:40:02 -070062 ":public_tests",
James Robinson646469d2014-10-03 15:33:28 -070063 "//mojo/common:mojo_common_unittests",
James Robinson84ca9262015-11-11 18:44:19 -080064 "//mojo/converters:mojo_converters_unittests",
Zachary Anderson1fc045b2015-12-22 13:36:22 -080065 "//mojo/dart:tests",
Viet-Trung Luuc2ad3092015-11-09 13:43:00 -080066 "//mojo/edk:tests",
Sean Klein13003b42015-12-08 15:11:24 -080067 "//mojo/file_utils:file_utils_apptests",
Petr Hosekc7c79062015-09-22 17:45:48 -070068 "//mojo/gles2:mgl_unittests",
Viet-Trung Luuc2ad3092015-11-09 13:43:00 -080069 "//mojo/public/cpp/bindings/tests:versioning_apptests",
Forrest Reiling74b0cac2016-03-02 16:21:15 -080070 "//mojo/public/platform/native:tests",
Viet-Trung Luu08e339a2015-10-10 01:03:09 -070071 "//mojo/services/files/c:apptests",
72 "//mojo/services/files/cpp:files_impl_apptests",
Jeff Brown138b2002016-05-03 12:50:45 -070073 "//mojo/services/gfx/composition/cpp:apptests",
74 "//mojo/services/gfx/images/cpp:image_pipe_apptest",
Forrest Reilingc9058412016-03-08 11:36:28 -080075 "//mojo/services/gfx/images/cpp:image_pipe_apptest",
Vardhan Mudunurubb364982015-12-18 11:09:03 -080076 "//mojo/services/log/cpp:log_client_apptests",
Viet-Trung Luuc2ad3092015-11-09 13:43:00 -080077 "//mojo/tools:message_generator",
Jeff Brownaec9c582016-03-09 14:21:51 -080078 "//mojo/ui:apptests",
Jeff Brownc64f0d42016-03-09 14:23:23 -080079 "//mojo/ui/associates:apptests",
James Robinson646469d2014-10-03 15:33:28 -070080 ]
81
Scott Violet912f52f2015-03-26 07:30:24 -070082 if (mojo_use_prebuilt_network_service) {
Colin Blundell69666252015-02-13 09:38:24 +010083 deps += [ "//mojo/public/tools:copy_network_service_apptests" ]
84 }
James Robinson646469d2014-10-03 15:33:28 -070085}
James Robinson50c8b272015-10-13 14:30:09 -070086
87# This archives the system thunks implementation for exporting to SDK consumers.
88static_library("system_thunks") {
89 complete_static_lib = true
90 deps = [
91 "//mojo/public/platform/native:system",
92 ]
93}
Viet-Trung Luu71ad8e72015-10-27 15:40:02 -070094
95# Public SDK test targets follow. These targets are not defined within the
96# public SDK itself since they are built as native executable binaries, needing
97# to be linked with the EDK.
98# TODO(vtl): They should be converted to "apptests", i.e., run as apps.
99
100group("public_tests") {
101 testonly = true
102 deps = [
103 ":mojo_public_application_unittests",
104 ":mojo_public_bindings_perftests",
105 ":mojo_public_bindings_unittests",
James Robinson0ba8e9e2016-02-03 10:40:44 -0800106 ":mojo_public_c_bindings_unittests",
Viet-Trung Luu71ad8e72015-10-27 15:40:02 -0700107 ":mojo_public_environment_unittests",
108 ":mojo_public_system_perftests",
109 ":mojo_public_system_unittests",
110 ":mojo_public_utility_unittests",
111 ":mojo_system_impl_private_unittests",
112 ]
113}
114
115test("mojo_public_application_unittests") {
116 deps = [
117 "//mojo/edk/test:run_all_unittests",
118 "//mojo/public/cpp/application/tests",
119 ]
120}
121
122test("mojo_public_bindings_unittests") {
123 deps = [
124 "//mojo/edk/test:run_all_unittests",
125 "//mojo/public/cpp/bindings/tests",
126 ]
127}
128
James Robinson0ba8e9e2016-02-03 10:40:44 -0800129test("mojo_public_c_bindings_unittests") {
130 deps = [
131 "//mojo/edk/test:run_all_unittests",
132 "//mojo/public/c/bindings/tests",
133 ]
134}
135
Viet-Trung Luu71ad8e72015-10-27 15:40:02 -0700136test("mojo_public_bindings_perftests") {
137 deps = [
138 "//mojo/edk/test:run_all_perftests",
139 "//mojo/public/cpp/bindings/tests:perftests",
140 ]
141}
142
143test("mojo_public_environment_unittests") {
144 deps = [
145 "//mojo/edk/test:run_all_unittests",
146 "//mojo/public/cpp/environment/tests",
147 ]
148}
149
150test("mojo_public_system_perftests") {
151 deps = [
152 "//mojo/edk/test:run_all_perftests",
153 "//mojo/public/c/system/tests:perftests",
154 ]
155}
156
157test("mojo_public_system_unittests") {
158 deps = [
159 "//mojo/edk/test:run_all_unittests",
160 "//mojo/public/cpp/system/tests",
161 ]
162}
163
164test("mojo_public_utility_unittests") {
165 deps = [
166 "//mojo/edk/test:run_all_unittests",
167 "//mojo/public/cpp/utility/tests",
168 ]
169}
170
171test("mojo_system_impl_private_unittests") {
172 deps = [
173 "//mojo/edk/test:run_all_unittests",
174 "//mojo/public/platform/native:system_impl_private_tests",
175 ]
176}