OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//mojo/edk/mojo_edk.gni") | 5 import("//mojo/edk/mojo_edk.gni") |
6 import("//mojo/public/mojo.gni") | |
7 import("//testing/test.gni") | 6 import("//testing/test.gni") |
8 | 7 |
9 mojo_edk_source_set("test_support") { | 8 mojo_edk_source_set("test_support") { |
10 testonly = true | 9 testonly = true |
11 sources = [ | 10 sources = [ |
12 "multiprocess_test_helper.cc", | 11 "multiprocess_test_helper.cc", |
13 "multiprocess_test_helper.h", | 12 "multiprocess_test_helper.h", |
14 "scoped_ipc_support.cc", | 13 "scoped_ipc_support.cc", |
15 "scoped_ipc_support.h", | 14 "scoped_ipc_support.h", |
16 "test_utils.h", | 15 "test_utils.h", |
17 "test_utils_posix.cc", | 16 "test_utils_posix.cc", |
18 "test_utils_win.cc", | 17 "test_utils_win.cc", |
19 ] | 18 ] |
20 | 19 |
21 deps = [ | 20 deps = [ |
22 "//base", | 21 "//base", |
23 "//base/test:test_support", | 22 "//base/test:test_support", |
| 23 "//mojo/public/cpp/system", |
24 "//testing/gtest", | 24 "//testing/gtest", |
25 "//third_party/mojo/src/mojo/public/cpp/system", | |
26 | 25 |
27 # TODO(use_chrome_edk): temporary since the Mojo wrapper primitives are | 26 # TODO(use_chrome_edk): temporary since the Mojo wrapper primitives are |
28 # declared in third party only for now. | 27 # declared in third party only for now. |
29 "//third_party/mojo/src/mojo/edk/system", | 28 "//third_party/mojo/src/mojo/edk/system", |
30 ] | 29 ] |
31 } | 30 } |
32 | 31 |
33 mojo_edk_source_set("run_all_unittests") { | 32 mojo_edk_source_set("run_all_unittests") { |
34 testonly = true | 33 testonly = true |
35 sources = [ | 34 sources = [ |
36 "run_all_unittests.cc", | 35 "run_all_unittests.cc", |
37 ] | 36 ] |
38 | 37 |
39 deps = [ | 38 deps = [ |
40 ":test_support", | 39 ":test_support", |
41 ":test_support_impl", | 40 ":test_support_impl", |
42 "//base", | 41 "//base", |
43 "//base/test:test_support", | 42 "//base/test:test_support", |
| 43 "//mojo/public/c/test_support", |
44 "//testing/gtest", | 44 "//testing/gtest", |
45 "//third_party/mojo/src/mojo/public/c/test_support", | |
46 | 45 |
47 # TODO(use_chrome_edk): temporary since the Mojo wrapper primitives are | 46 # TODO(use_chrome_edk): temporary since the Mojo wrapper primitives are |
48 # declared in third party only for now. | 47 # declared in third party only for now. |
49 "//third_party/mojo/src/mojo/edk/system", | 48 "//third_party/mojo/src/mojo/edk/system", |
50 ] | 49 ] |
51 } | 50 } |
52 | 51 |
53 mojo_edk_source_set("run_all_perftests") { | 52 mojo_edk_source_set("run_all_perftests") { |
54 testonly = true | 53 testonly = true |
55 deps = [ | 54 deps = [ |
56 ":test_support_impl", | 55 ":test_support_impl", |
57 "//base", | 56 "//base", |
58 "//base/test:test_support", | 57 "//base/test:test_support", |
| 58 "//mojo/public/c/test_support", |
59 | 59 |
60 # TODO(use_chrome_edk): temporary since the Mojo wrapper primitives are | 60 # TODO(use_chrome_edk): temporary since the Mojo wrapper primitives are |
61 # declared in third party only for now. | 61 # declared in third party only for now. |
62 "//third_party/mojo/src/mojo/edk/system", | 62 "//third_party/mojo/src/mojo/edk/system", |
63 "//third_party/mojo/src/mojo/public/c/test_support", | |
64 ] | 63 ] |
65 | 64 |
66 sources = [ | 65 sources = [ |
67 "run_all_perftests.cc", | 66 "run_all_perftests.cc", |
68 ] | 67 ] |
69 } | 68 } |
70 | 69 |
71 mojo_edk_source_set("test_support_impl") { | 70 mojo_edk_source_set("test_support_impl") { |
72 testonly = true | 71 testonly = true |
73 deps = [ | 72 deps = [ |
74 "//base", | 73 "//base", |
75 "//base/test:test_support", | 74 "//base/test:test_support", |
76 "//third_party/mojo/src/mojo/public/c/test_support", | 75 "//mojo/public/c/test_support", |
77 "//third_party/mojo/src/mojo/public/cpp/system", | 76 "//mojo/public/cpp/system", |
78 ] | 77 ] |
79 | 78 |
80 sources = [ | 79 sources = [ |
81 "test_support_impl.cc", | 80 "test_support_impl.cc", |
82 "test_support_impl.h", | 81 "test_support_impl.h", |
83 ] | 82 ] |
84 } | 83 } |
85 | 84 |
86 # Public SDK test targets follow. These targets are not defined within the | 85 # Public SDK test targets follow. These targets are not defined within the |
87 # public SDK itself as running the unittests requires the EDK. | 86 # public SDK itself as running the unittests requires the EDK. |
88 # TODO(vtl): These don't really belong here. (They should be converted to | 87 # TODO(vtl): These don't really belong here. (They should be converted to |
89 # apptests, but even apart from that these targets belong somewhere else.) | 88 # apptests, but even apart from that these targets belong somewhere else.) |
90 | 89 |
91 group("public_tests") { | 90 group("public_tests") { |
92 testonly = true | 91 testonly = true |
93 deps = [ | 92 deps = [ |
94 # TODO(use_chrome_edk): remove "2" | 93 # TODO(use_chrome_edk): remove "2" |
95 ":mojo_public_bindings_unittests2", | 94 ":mojo_public_bindings_unittests2", |
96 ":mojo_public_environment_unittests2", | 95 ":mojo_public_environment_unittests2", |
97 ":mojo_public_system_perftests2", | 96 ":mojo_public_system_perftests2", |
98 ":mojo_public_system_unittests2", | 97 ":mojo_public_system_unittests2", |
99 ":mojo_public_utility_unittests2", | 98 ":mojo_public_utility_unittests2", |
100 ] | 99 ] |
101 | |
102 if (mojo_use_application_in_sdk) { | |
103 deps += [ ":mojo_public_application_unittests" ] | |
104 } | |
105 } | |
106 | |
107 if (mojo_use_application_in_sdk) { | |
108 # TODO(use_chrome_edk): remove "2" | |
109 test("mojo_public_application_unittests2") { | |
110 deps = [ | |
111 ":run_all_unittests", | |
112 "../../../third_party/mojo/src/mojo/public/cpp/application/tests", | |
113 ] | |
114 } | |
115 } | 100 } |
116 | 101 |
117 # TODO(use_chrome_edk): remove "2" | 102 # TODO(use_chrome_edk): remove "2" |
118 test("mojo_public_bindings_unittests2") { | 103 test("mojo_public_bindings_unittests2") { |
119 deps = [ | 104 deps = [ |
120 ":run_all_unittests", | 105 ":run_all_unittests", |
121 "../../../third_party/mojo/src/mojo/public/cpp/bindings/tests", | 106 "//mojo/public/cpp/bindings/tests", |
122 ] | 107 ] |
123 } | 108 } |
124 | 109 |
125 # TODO(use_chrome_edk): remove "2" | 110 # TODO(use_chrome_edk): remove "2" |
126 test("mojo_public_environment_unittests2") { | 111 test("mojo_public_environment_unittests2") { |
127 deps = [ | 112 deps = [ |
128 ":run_all_unittests", | 113 ":run_all_unittests", |
129 "../../../third_party/mojo/src/mojo/public/cpp/environment/tests", | 114 "//mojo/public/cpp/environment/tests", |
130 ] | 115 ] |
131 } | 116 } |
132 | 117 |
133 # TODO(use_chrome_edk): remove "2" | 118 # TODO(use_chrome_edk): remove "2" |
134 test("mojo_public_system_perftests2") { | 119 test("mojo_public_system_perftests2") { |
135 deps = [ | 120 deps = [ |
136 ":run_all_perftests", | 121 ":run_all_perftests", |
137 "../../../third_party/mojo/src/mojo/public/c/system/tests:perftests", | 122 "//mojo/public/c/system/tests:perftests", |
138 ] | 123 ] |
139 } | 124 } |
140 | 125 |
141 # TODO(use_chrome_edk): remove "2" | 126 # TODO(use_chrome_edk): remove "2" |
142 test("mojo_public_system_unittests2") { | 127 test("mojo_public_system_unittests2") { |
143 deps = [ | 128 deps = [ |
144 ":run_all_unittests", | 129 ":run_all_unittests", |
145 "../../../third_party/mojo/src/mojo/public/cpp/system/tests", | 130 "//mojo/public/cpp/system/tests", |
146 ] | 131 ] |
147 } | 132 } |
148 | 133 |
149 # TODO(use_chrome_edk): remove "2" | 134 # TODO(use_chrome_edk): remove "2" |
150 test("mojo_public_utility_unittests2") { | 135 test("mojo_public_utility_unittests2") { |
151 deps = [ | 136 deps = [ |
152 ":run_all_unittests", | 137 ":run_all_unittests", |
153 "../../../third_party/mojo/src/mojo/public/cpp/utility/tests", | 138 "//mojo/public/cpp/utility/tests", |
154 ] | 139 ] |
155 } | 140 } |
OLD | NEW |