OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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("//build/config/chrome_build.gni") | 5 import("//build/config/chrome_build.gni") |
6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
7 import("//testing/test.gni") | 7 import("//testing/test.gni") |
8 | 8 |
| 9 if (is_android) { |
| 10 import("//build/config/android/config.gni") |
| 11 import("//build/config/android/rules.gni") |
| 12 } |
| 13 |
9 # Convenience meta-target for all of Blimp's production & test code. | 14 # Convenience meta-target for all of Blimp's production & test code. |
10 group("blimp") { | 15 group("blimp") { |
11 # In spite of the name, this really just means that non-test targets | 16 # In spite of the name, this really just means that non-test targets |
12 # cannot depend on this one, and that it can depend on test targets, | 17 # cannot depend on this one, and that it can depend on test targets, |
13 # which fits how we intend to use it. | 18 # which fits how we intend to use it. |
14 testonly = true | 19 testonly = true |
15 | 20 |
16 deps = [ | 21 deps = [ |
17 ":blimp_tests", | 22 ":blimp_tests", |
18 "//blimp/client", | 23 "//blimp/client", |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 "//blimp/client:feature_unit_tests", | 71 "//blimp/client:feature_unit_tests", |
67 "//blimp/client/core:unit_tests", | 72 "//blimp/client/core:unit_tests", |
68 "//blimp/common:unit_tests", | 73 "//blimp/common:unit_tests", |
69 "//blimp/net:unit_tests", | 74 "//blimp/net:unit_tests", |
70 "//blimp/test:run_all_unittests", | 75 "//blimp/test:run_all_unittests", |
71 ] | 76 ] |
72 | 77 |
73 if (is_linux) { | 78 if (is_linux) { |
74 deps += [ "//blimp/engine:unit_tests" ] | 79 deps += [ "//blimp/engine:unit_tests" ] |
75 } | 80 } |
| 81 |
| 82 if (is_android) { |
| 83 deps += [ ":blimp_unittests_java_deps" ] |
| 84 } |
| 85 } |
| 86 |
| 87 if (is_android) { |
| 88 # This is the list of targets that the tests need to depend on in order to add |
| 89 # the java classes for their native counterparts to the test apk. |
| 90 # We could directly include them in the test target, but in order to |
| 91 # keep the visibility of the //blimp/client/core:core_java target restricted, |
| 92 # we make it visible to this group (which is testonly) and depend on this |
| 93 # group instead. |
| 94 # We could not add ":blimp_unittests" to the visibility list of |
| 95 # //blimp/client/core:core_java, since the targets that actually need to |
| 96 # depend on it are generated by the test template (see testing/test.gni). So |
| 97 # it was better to add this indirection and expose it to this testonly target, |
| 98 # which can be used in this file only. |
| 99 java_group("blimp_unittests_java_deps") { |
| 100 testonly = true |
| 101 visibility = [ ":*" ] |
| 102 |
| 103 deps = [ |
| 104 "//base:base_java", |
| 105 "//blimp/client/core:core_java", |
| 106 "//net/android:net_java", |
| 107 "//ui/android:ui_java", |
| 108 ] |
| 109 } |
76 } | 110 } |
77 | 111 |
78 if (is_linux) { | 112 if (is_linux) { |
79 test("blimp_browsertests") { | 113 test("blimp_browsertests") { |
80 deps = [ | 114 deps = [ |
81 "//blimp/engine:browser_tests", | 115 "//blimp/engine:browser_tests", |
82 "//tools/xdisplaycheck", | 116 "//tools/xdisplaycheck", |
83 ] | 117 ] |
84 data = [ | 118 data = [ |
85 "test/data/", | 119 "test/data/", |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 "--output", | 243 "--output", |
210 rebase_path(_output_path, root_build_dir), | 244 rebase_path(_output_path, root_build_dir), |
211 "--target", | 245 "--target", |
212 rebase_path(_wrapped_script, root_build_dir), | 246 rebase_path(_wrapped_script, root_build_dir), |
213 "--output-directory", | 247 "--output-directory", |
214 rebase_path(root_out_dir, root_build_dir), | 248 rebase_path(root_out_dir, root_build_dir), |
215 "--flag-name=--output-linux-directory", | 249 "--flag-name=--output-linux-directory", |
216 ] | 250 ] |
217 } | 251 } |
218 } | 252 } |
OLD | NEW |