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/public/tools/bindings/mojom.gni") | 5 import("//mojo/public/tools/bindings/mojom.gni") |
6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
7 | 7 |
8 action("generate_test_snapshot_bin") { | 8 action("generate_test_snapshot_bin") { |
9 deps = [ | 9 deps = [ |
10 "//dart/runtime/bin:gen_snapshot($host_toolchain)", | 10 "//dart/runtime/bin:gen_snapshot($host_toolchain)", |
11 ] | 11 ] |
12 inputs = [ | 12 inputs = [ |
13 "test_snapshot.dart", | 13 "test_snapshot.dart", |
14 "//dart/runtime/tools/create_snapshot_bin.py", | 14 "//dart/runtime/tools/create_snapshot_bin.py", |
15 "//mojo/dart/embedder/builtin.dart", | 15 "//mojo/dart/embedder/builtin.dart", |
16 "//mojo/dart/embedder/core/buffer_patch.dart", | |
zra
2015/02/23 23:21:02
rm
Cutch
2015/02/24 15:36:48
Done.
| |
17 "//mojo/dart/embedder/core/data_pipe_patch.dart", | |
18 "//mojo/dart/embedder/core/handle_patch.dart", | |
19 "//mojo/dart/embedder/core/handle_watcher_patch.dart", | |
20 "//mojo/dart/embedder/core/message_pipe_patch.dart", | |
16 "//mojo/public/dart/bindings.dart", | 21 "//mojo/public/dart/bindings.dart", |
17 "//mojo/public/dart/core.dart", | 22 "//mojo/public/dart/core.dart", |
18 "//mojo/public/dart/src/buffer.dart", | 23 "//mojo/public/dart/src/buffer.dart", |
19 "//mojo/public/dart/src/codec.dart", | 24 "//mojo/public/dart/src/codec.dart", |
20 "//mojo/public/dart/src/data_pipe.dart", | 25 "//mojo/public/dart/src/data_pipe.dart", |
21 "//mojo/public/dart/src/drain_data.dart", | 26 "//mojo/public/dart/src/drain_data.dart", |
22 "//mojo/public/dart/src/event_stream.dart", | 27 "//mojo/public/dart/src/event_stream.dart", |
23 "//mojo/public/dart/src/handle.dart", | 28 "//mojo/public/dart/src/handle.dart", |
24 "//mojo/public/dart/src/handle_watcher.dart", | 29 "//mojo/public/dart/src/handle_watcher.dart", |
25 "//mojo/public/dart/src/message.dart", | 30 "//mojo/public/dart/src/message.dart", |
26 "//mojo/public/dart/src/message_pipe.dart", | 31 "//mojo/public/dart/src/message_pipe.dart", |
27 "//mojo/public/dart/src/proxy.dart", | 32 "//mojo/public/dart/src/proxy.dart", |
28 "//mojo/public/dart/src/struct.dart", | 33 "//mojo/public/dart/src/struct.dart", |
29 "//mojo/public/dart/src/stub.dart", | 34 "//mojo/public/dart/src/stub.dart", |
30 "//mojo/public/dart/src/timer_queue.dart", | 35 "//mojo/public/dart/src/timer_queue.dart", |
31 "//mojo/public/dart/src/types.dart", | 36 "//mojo/public/dart/src/types.dart", |
32 ] | 37 ] |
33 output = "$target_gen_dir/test_snapshot_gen.bin" | 38 output = "$target_gen_dir/test_snapshot_gen.bin" |
34 outputs = [ | 39 outputs = [ |
35 output, | 40 output, |
36 ] | 41 ] |
37 | 42 |
38 gen_snapshot_dir = get_label_info( | 43 gen_snapshot_dir = |
39 "//dart/runtime/bin:gen_snapshot($host_toolchain)", "root_out_dir") | 44 get_label_info("//dart/runtime/bin:gen_snapshot($host_toolchain)", |
45 "root_out_dir") | |
40 script = "//dart/runtime/tools/create_snapshot_bin.py" | 46 script = "//dart/runtime/tools/create_snapshot_bin.py" |
41 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart") | 47 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart") |
42 bindings_path = rebase_path("//mojo/public/dart/bindings.dart") | 48 bindings_path = rebase_path("//mojo/public/dart/bindings.dart") |
43 core_path = rebase_path("//mojo/public/dart/core.dart") | 49 core_path = rebase_path("//mojo/public/dart/core.dart") |
44 args = [ | 50 args = [ |
45 "--executable", rebase_path("$gen_snapshot_dir/gen_snapshot"), | 51 "--executable", |
46 "--package_root", rebase_path("$root_gen_dir"), | 52 rebase_path("$gen_snapshot_dir/gen_snapshot"), |
47 "--script", rebase_path("test_snapshot.dart"), | 53 "--package_root", |
48 "--output_bin", rebase_path(output, root_build_dir), | 54 rebase_path("$root_gen_dir"), |
49 "--target_os", os, | 55 "--script", |
56 rebase_path("test_snapshot.dart"), | |
57 "--output_bin", | |
58 rebase_path(output, root_build_dir), | |
59 "--target_os", | |
60 os, | |
50 "--url_mapping=dart:mojo_bindings,$bindings_path", | 61 "--url_mapping=dart:mojo_bindings,$bindings_path", |
51 "--url_mapping=dart:mojo_builtin,$builtin_path", | 62 "--url_mapping=dart:mojo_builtin,$builtin_path", |
52 "--url_mapping=dart:mojo_core,$core_path", | 63 "--url_mapping=dart:mojo_core,$core_path", |
53 ] | 64 ] |
54 } | 65 } |
55 | 66 |
56 action("generate_test_snapshot_file") { | 67 action("generate_test_snapshot_file") { |
57 deps = [ | 68 deps = [ |
58 ":generate_test_snapshot_bin", | 69 ":generate_test_snapshot_bin", |
59 ] | 70 ] |
60 inputs = [ | 71 inputs = [ |
61 "//dart/runtime/tools/create_snapshot_file.py", | 72 "//dart/runtime/tools/create_snapshot_file.py", |
62 "//mojo/dart/embedder/snapshot.cc.tmpl", | 73 "//mojo/dart/embedder/snapshot.cc.tmpl", |
63 "$target_gen_dir/test_snapshot_gen.bin", | 74 "$target_gen_dir/test_snapshot_gen.bin", |
64 ] | 75 ] |
65 output = "$target_gen_dir/test_snapshot.cc" | 76 output = "$target_gen_dir/test_snapshot.cc" |
66 outputs = [ | 77 outputs = [ |
67 output, | 78 output, |
68 ] | 79 ] |
69 | 80 |
70 script = "//dart/runtime/tools/create_snapshot_file.py" | 81 script = "//dart/runtime/tools/create_snapshot_file.py" |
71 args = [ | 82 args = [ |
72 "--input_bin", rebase_path("$target_gen_dir/test_snapshot_gen.bin"), | 83 "--input_bin", |
73 "--input_cc", rebase_path("//mojo/dart/embedder/snapshot.cc.tmpl"), | 84 rebase_path("$target_gen_dir/test_snapshot_gen.bin"), |
74 "--output", rebase_path(output), | 85 "--input_cc", |
86 rebase_path("//mojo/dart/embedder/snapshot.cc.tmpl"), | |
87 "--output", | |
88 rebase_path(output), | |
75 ] | 89 ] |
76 } | 90 } |
77 | 91 |
78 source_set("dart_controller_for_test") { | 92 source_set("dart_controller_for_test") { |
79 testonly=true | 93 testonly = true |
80 sources = [ | 94 sources = [ |
81 "$target_gen_dir/test_snapshot.cc", | 95 "$target_gen_dir/test_snapshot.cc", |
82 ] | 96 ] |
83 | 97 |
84 deps = [ | 98 deps = [ |
85 ":generate_test_snapshot_file", | 99 ":generate_test_snapshot_file", |
86 "//mojo/dart/embedder:dart_controller_no_snapshot", | 100 "//mojo/dart/embedder:dart_controller_no_snapshot", |
87 ] | 101 ] |
88 } | 102 } |
89 | 103 |
90 test("dart_unittests") { | 104 test("dart_unittests") { |
91 sources = [ | 105 sources = [ |
92 "run_dart_tests.cc", | 106 "run_dart_tests.cc", |
93 "validation_unittest.cc", | 107 "validation_unittest.cc", |
94 ] | 108 ] |
95 deps = [ | 109 deps = [ |
96 ":dart_controller_for_test", | 110 ":dart_controller_for_test", |
97 ":dart_to_cpp_unittests", | 111 ":dart_to_cpp_unittests", |
98 ":expect", | 112 ":expect", |
99 ":validation_test_input_parser", | 113 ":validation_test_input_parser", |
114 ":async_helper", | |
100 "//base", | 115 "//base", |
101 "//crypto:crypto", | 116 "//crypto:crypto", |
102 "//mojo/dart/embedder:dart_controller_no_snapshot", | 117 "//mojo/dart/embedder:dart_controller_no_snapshot", |
103 "//mojo/edk/test:run_all_unittests", | 118 "//mojo/edk/test:run_all_unittests", |
104 "//mojo/edk/test:test_support", | 119 "//mojo/edk/test:test_support", |
105 "//mojo/public/cpp/environment", | 120 "//mojo/public/cpp/environment", |
106 "//mojo/public/cpp/system", | 121 "//mojo/public/cpp/system", |
107 "//mojo/public/cpp/utility", | 122 "//mojo/public/cpp/utility", |
108 "//mojo/environment:chromium", | 123 "//mojo/environment:chromium", |
109 "//testing/gtest", | 124 "//testing/gtest", |
(...skipping 11 matching lines...) Expand all Loading... | |
121 | 136 |
122 copy("validation_test_input_parser") { | 137 copy("validation_test_input_parser") { |
123 sources = [ | 138 sources = [ |
124 "//mojo/dart/testing/validation_test_input_parser.dart", | 139 "//mojo/dart/testing/validation_test_input_parser.dart", |
125 ] | 140 ] |
126 outputs = [ | 141 outputs = [ |
127 "{{source_gen_dir}}/{{source_file_part}}", | 142 "{{source_gen_dir}}/{{source_file_part}}", |
128 ] | 143 ] |
129 } | 144 } |
130 | 145 |
146 copy("async_helper") { | |
147 sources = [ | |
148 "//mojo/dart/testing/async_helper.dart", | |
149 ] | |
150 outputs = [ | |
151 "{{source_gen_dir}}/{{source_file_part}}", | |
152 ] | |
153 } | |
154 | |
131 source_set("dart_to_cpp_unittests") { | 155 source_set("dart_to_cpp_unittests") { |
132 testonly = true | 156 testonly = true |
133 sources = [ | 157 sources = [ |
134 "dart_to_cpp_tests.cc", | 158 "dart_to_cpp_tests.cc", |
135 ] | 159 ] |
136 deps = [ | 160 deps = [ |
137 ":dart_controller_for_test", | 161 ":dart_controller_for_test", |
138 ":dart_to_cpp_bindings", | 162 ":dart_to_cpp_bindings", |
139 "//base", | 163 "//base", |
140 "//crypto", | 164 "//crypto", |
141 "//mojo/dart/embedder:dart_controller_no_snapshot", | 165 "//mojo/dart/embedder:dart_controller_no_snapshot", |
142 "//mojo/edk/test:test_support", | 166 "//mojo/edk/test:test_support", |
143 "//mojo/public/cpp/bindings", | 167 "//mojo/public/cpp/bindings", |
144 "//mojo/public/cpp/system", | 168 "//mojo/public/cpp/system", |
145 "//mojo/public/interfaces/bindings/tests:test_interfaces", | 169 "//mojo/public/interfaces/bindings/tests:test_interfaces", |
146 "//testing/gtest", | 170 "//testing/gtest", |
147 ] | 171 ] |
148 } | 172 } |
149 | 173 |
150 mojom("dart_to_cpp_bindings") { | 174 mojom("dart_to_cpp_bindings") { |
151 sources = [ | 175 sources = [ |
152 "dart_to_cpp.mojom", | 176 "dart_to_cpp.mojom", |
153 ] | 177 ] |
154 } | 178 } |
OLD | NEW |