James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1 | # 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 Klein | bfc3419 | 2015-11-16 14:11:59 -0800 | [diff] [blame] | 5 | import("//build/config/nacl/config.gni") |
Colin Blundell | 6966625 | 2015-02-13 09:38:24 +0100 | [diff] [blame] | 6 | import("//build/module_args/mojo.gni") |
Aaron Boodman | f9b1d79 | 2014-10-23 13:35:57 -0700 | [diff] [blame] | 7 | import("//mojo/public/mojo.gni") |
Viet-Trung Luu | 71ad8e7 | 2015-10-27 15:40:02 -0700 | [diff] [blame] | 8 | import("//testing/test.gni") |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 9 | |
Petr Hosek | 0f5eace | 2015-10-20 19:57:02 -0700 | [diff] [blame] | 10 | declare_args() { |
| 11 | mojo_use_go = false |
Petr Hosek | 0f5eace | 2015-10-20 19:57:02 -0700 | [diff] [blame] | 12 | } |
| 13 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 14 | group("mojo") { |
| 15 | # Meta-target, don't link into production code. |
| 16 | testonly = true |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 17 | deps = [ |
James Robinson | 50c8b27 | 2015-10-13 14:30:09 -0700 | [diff] [blame] | 18 | ":system_thunks", |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 19 | ":tests", |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 20 | "//mojo/common", |
Zachary Anderson | 3da94c7 | 2015-08-11 10:26:56 -0700 | [diff] [blame] | 21 | "//mojo/dart", |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 22 | "//mojo/public", |
| 23 | "//mojo/services", |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 24 | ] |
| 25 | |
James Robinson | a976313 | 2014-10-06 11:18:13 -0700 | [diff] [blame] | 26 | if (is_android) { |
Benjamin Lerman | d31b103 | 2015-02-06 11:24:58 +0100 | [diff] [blame] | 27 | deps += [ |
| 28 | "//mojo/android", |
Eric Seidel | 1635aee | 2015-07-01 12:29:40 -0700 | [diff] [blame] | 29 | "//mojo/java", |
Benjamin Lerman | dcc21f7 | 2015-05-12 14:32:10 +0200 | [diff] [blame] | 30 | "//mojo/tools:remote_file_reader", |
Benjamin Lerman | d31b103 | 2015-02-06 11:24:58 +0100 | [diff] [blame] | 31 | ] |
James Robinson | a976313 | 2014-10-06 11:18:13 -0700 | [diff] [blame] | 32 | } |
| 33 | |
Sergey Rogulenko | a61fa56 | 2015-04-24 14:22:43 -0700 | [diff] [blame] | 34 | if (is_linux && mojo_use_go) { |
James Robinson | 8bcf28e | 2014-12-03 17:39:48 -0800 | [diff] [blame] | 35 | deps += [ "//mojo/go" ] |
gauthamt | f22f247 | 2014-10-29 09:32:02 -0700 | [diff] [blame] | 36 | } |
| 37 | |
Craig Stout | 0e7c2c3 | 2015-09-17 15:14:08 -0700 | [diff] [blame] | 38 | if (is_linux && !is_fnl) { |
James Robinson | 8bcf28e | 2014-12-03 17:39:48 -0800 | [diff] [blame] | 39 | deps += [ "//mojo/python" ] |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 40 | } |
Nick Bray | e7561b4 | 2015-01-09 10:54:19 -0800 | [diff] [blame] | 41 | |
| 42 | if (mojo_use_nacl) { |
Sean Klein | bfc3419 | 2015-11-16 14:11:59 -0800 | [diff] [blame] | 43 | if (mojo_use_nacl_sfi) { |
| 44 | deps += [ |
| 45 | "//mojo/nacl/sfi:mojo_nacl", |
Sean Klein | 63243fa | 2015-11-30 10:39:56 -0800 | [diff] [blame] | 46 | "//mojo/nacl/sfi:mojo_nacl_tests_sfi", |
Sean Klein | bfc3419 | 2015-11-16 14:11:59 -0800 | [diff] [blame] | 47 | ] |
| 48 | } |
Sean Klein | ba7a656 | 2015-09-25 14:43:01 -0700 | [diff] [blame] | 49 | |
Sean Klein | bfc3419 | 2015-11-16 14:11:59 -0800 | [diff] [blame] | 50 | if (mojo_use_nacl_nonsfi) { |
| 51 | deps += [ |
Sean Klein | 63243fa | 2015-11-30 10:39:56 -0800 | [diff] [blame] | 52 | "//mojo/nacl/nonsfi:mojo_nacl", |
Sean Klein | bfc3419 | 2015-11-16 14:11:59 -0800 | [diff] [blame] | 53 | "//mojo/nacl/nonsfi:mojo_nacl_tests_nonsfi", |
| 54 | ] |
| 55 | } |
Sean Klein | ba7a656 | 2015-09-25 14:43:01 -0700 | [diff] [blame] | 56 | } |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | group("tests") { |
| 60 | testonly = true |
| 61 | deps = [ |
Viet-Trung Luu | 71ad8e7 | 2015-10-27 15:40:02 -0700 | [diff] [blame] | 62 | ":public_tests", |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 63 | "//mojo/common:mojo_common_unittests", |
James Robinson | 84ca926 | 2015-11-11 18:44:19 -0800 | [diff] [blame] | 64 | "//mojo/converters:mojo_converters_unittests", |
Zachary Anderson | 1fc045b | 2015-12-22 13:36:22 -0800 | [diff] [blame] | 65 | "//mojo/dart:tests", |
Viet-Trung Luu | c2ad309 | 2015-11-09 13:43:00 -0800 | [diff] [blame] | 66 | "//mojo/edk:tests", |
Sean Klein | 13003b4 | 2015-12-08 15:11:24 -0800 | [diff] [blame] | 67 | "//mojo/file_utils:file_utils_apptests", |
Petr Hosek | c7c7906 | 2015-09-22 17:45:48 -0700 | [diff] [blame] | 68 | "//mojo/gles2:mgl_unittests", |
Viet-Trung Luu | c2ad309 | 2015-11-09 13:43:00 -0800 | [diff] [blame] | 69 | "//mojo/public/cpp/bindings/tests:versioning_apptests", |
Forrest Reiling | 74b0cac | 2016-03-02 16:21:15 -0800 | [diff] [blame] | 70 | "//mojo/public/platform/native:tests", |
Viet-Trung Luu | 08e339a | 2015-10-10 01:03:09 -0700 | [diff] [blame] | 71 | "//mojo/services/files/c:apptests", |
| 72 | "//mojo/services/files/cpp:files_impl_apptests", |
Jeff Brown | 138b200 | 2016-05-03 12:50:45 -0700 | [diff] [blame] | 73 | "//mojo/services/gfx/composition/cpp:apptests", |
| 74 | "//mojo/services/gfx/images/cpp:image_pipe_apptest", |
Forrest Reiling | c905841 | 2016-03-08 11:36:28 -0800 | [diff] [blame] | 75 | "//mojo/services/gfx/images/cpp:image_pipe_apptest", |
Vardhan Mudunuru | bb36498 | 2015-12-18 11:09:03 -0800 | [diff] [blame] | 76 | "//mojo/services/log/cpp:log_client_apptests", |
Viet-Trung Luu | c2ad309 | 2015-11-09 13:43:00 -0800 | [diff] [blame] | 77 | "//mojo/tools:message_generator", |
Jeff Brown | aec9c58 | 2016-03-09 14:21:51 -0800 | [diff] [blame] | 78 | "//mojo/ui:apptests", |
Jeff Brown | c64f0d4 | 2016-03-09 14:23:23 -0800 | [diff] [blame] | 79 | "//mojo/ui/associates:apptests", |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 80 | ] |
| 81 | |
Scott Violet | 912f52f | 2015-03-26 07:30:24 -0700 | [diff] [blame] | 82 | if (mojo_use_prebuilt_network_service) { |
Colin Blundell | 6966625 | 2015-02-13 09:38:24 +0100 | [diff] [blame] | 83 | deps += [ "//mojo/public/tools:copy_network_service_apptests" ] |
| 84 | } |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 85 | } |
James Robinson | 50c8b27 | 2015-10-13 14:30:09 -0700 | [diff] [blame] | 86 | |
| 87 | # This archives the system thunks implementation for exporting to SDK consumers. |
| 88 | static_library("system_thunks") { |
| 89 | complete_static_lib = true |
| 90 | deps = [ |
| 91 | "//mojo/public/platform/native:system", |
| 92 | ] |
| 93 | } |
Viet-Trung Luu | 71ad8e7 | 2015-10-27 15:40:02 -0700 | [diff] [blame] | 94 | |
| 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 | |
| 100 | group("public_tests") { |
| 101 | testonly = true |
| 102 | deps = [ |
| 103 | ":mojo_public_application_unittests", |
| 104 | ":mojo_public_bindings_perftests", |
| 105 | ":mojo_public_bindings_unittests", |
James Robinson | 0ba8e9e | 2016-02-03 10:40:44 -0800 | [diff] [blame] | 106 | ":mojo_public_c_bindings_unittests", |
Viet-Trung Luu | 71ad8e7 | 2015-10-27 15:40:02 -0700 | [diff] [blame] | 107 | ":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 | |
| 115 | test("mojo_public_application_unittests") { |
| 116 | deps = [ |
| 117 | "//mojo/edk/test:run_all_unittests", |
| 118 | "//mojo/public/cpp/application/tests", |
| 119 | ] |
| 120 | } |
| 121 | |
| 122 | test("mojo_public_bindings_unittests") { |
| 123 | deps = [ |
| 124 | "//mojo/edk/test:run_all_unittests", |
| 125 | "//mojo/public/cpp/bindings/tests", |
| 126 | ] |
| 127 | } |
| 128 | |
James Robinson | 0ba8e9e | 2016-02-03 10:40:44 -0800 | [diff] [blame] | 129 | test("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 Luu | 71ad8e7 | 2015-10-27 15:40:02 -0700 | [diff] [blame] | 136 | test("mojo_public_bindings_perftests") { |
| 137 | deps = [ |
| 138 | "//mojo/edk/test:run_all_perftests", |
| 139 | "//mojo/public/cpp/bindings/tests:perftests", |
| 140 | ] |
| 141 | } |
| 142 | |
| 143 | test("mojo_public_environment_unittests") { |
| 144 | deps = [ |
| 145 | "//mojo/edk/test:run_all_unittests", |
| 146 | "//mojo/public/cpp/environment/tests", |
| 147 | ] |
| 148 | } |
| 149 | |
| 150 | test("mojo_public_system_perftests") { |
| 151 | deps = [ |
| 152 | "//mojo/edk/test:run_all_perftests", |
| 153 | "//mojo/public/c/system/tests:perftests", |
| 154 | ] |
| 155 | } |
| 156 | |
| 157 | test("mojo_public_system_unittests") { |
| 158 | deps = [ |
| 159 | "//mojo/edk/test:run_all_unittests", |
| 160 | "//mojo/public/cpp/system/tests", |
| 161 | ] |
| 162 | } |
| 163 | |
| 164 | test("mojo_public_utility_unittests") { |
| 165 | deps = [ |
| 166 | "//mojo/edk/test:run_all_unittests", |
| 167 | "//mojo/public/cpp/utility/tests", |
| 168 | ] |
| 169 | } |
| 170 | |
| 171 | test("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 | } |