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 # These go into the generated source directory for embedder tests. | |
9 copy("copy_dart_mojo_sdk") { | |
10 sources = [ | |
11 "//mojo/public/dart/application.dart", | |
12 "//mojo/public/dart/bindings.dart", | |
13 "//mojo/public/dart/core.dart", | |
14 "//mojo/public/dart/internal.dart", | |
15 "//mojo/public/dart/src/application.dart", | |
16 "//mojo/public/dart/src/application_connection.dart", | |
17 "//mojo/public/dart/src/buffer.dart", | |
18 "//mojo/public/dart/src/codec.dart", | |
19 "//mojo/public/dart/src/control_message.dart", | |
20 "//mojo/public/dart/src/data_pipe.dart", | |
21 "//mojo/public/dart/src/drain_data.dart", | |
22 "//mojo/public/dart/src/event_stream.dart", | |
23 "//mojo/public/dart/src/handle.dart", | |
24 "//mojo/public/dart/src/handle_watcher.dart", | |
25 "//mojo/public/dart/src/message.dart", | |
26 "//mojo/public/dart/src/message_pipe.dart", | |
27 "//mojo/public/dart/src/natives.dart", | |
28 "//mojo/public/dart/src/proxy.dart", | |
29 "//mojo/public/dart/src/struct.dart", | |
30 "//mojo/public/dart/src/stub.dart", | |
31 "//mojo/public/dart/src/timer_queue.dart", | |
32 "//mojo/public/dart/src/types.dart", | |
33 ] | |
34 outputs = [ | |
35 "$root_gen_dir/dart-gen/{{source_root_relative_dir}}/{{source_file_part}}", | |
36 ] | |
37 } | |
38 | |
39 source_set("dart_controller_for_test") { | 8 source_set("dart_controller_for_test") { |
40 testonly = true | 9 testonly = true |
41 sources = [ | 10 sources = [ |
42 "$root_gen_dir/dart_snapshot.cc", | 11 "$root_gen_dir/dart_snapshot.cc", |
43 ] | 12 ] |
44 | |
45 deps = [ | 13 deps = [ |
46 "//mojo/dart/embedder:dart_controller_no_snapshot", | 14 "//mojo/dart/embedder:dart_controller_no_snapshot", |
47 "//mojo/dart/embedder:generate_snapshot_file", | 15 "//mojo/dart/embedder:generate_snapshot_file", |
48 ] | 16 ] |
49 } | 17 } |
50 | 18 |
51 test("dart_unittests") { | 19 test("dart_unittests") { |
52 sources = [ | 20 sources = [ |
53 "run_dart_tests.cc", | 21 "run_dart_tests.cc", |
54 "validation_unittest.cc", | 22 "validation_unittest.cc", |
55 ] | 23 ] |
56 deps = [ | 24 deps = [ |
57 ":async_helper", | 25 "//mojo/public/dart:mojo", |
58 ":copy_dart_mojo_sdk", | 26 "//mojo/dart/testing", |
59 ":dart_controller_for_test", | 27 ":dart_controller_for_test", |
60 ":dart_to_cpp_unittests", | 28 ":dart_to_cpp_unittests", |
61 ":expect", | |
62 ":validation_test_input_parser", | |
63 "//base", | 29 "//base", |
64 "//crypto:crypto", | 30 "//crypto:crypto", |
65 "//mojo/dart/embedder:dart_controller_no_snapshot", | 31 "//mojo/dart/embedder:dart_controller_no_snapshot", |
66 "//mojo/edk/test:run_all_unittests", | 32 "//mojo/edk/test:run_all_unittests", |
67 "//mojo/edk/test:test_support", | 33 "//mojo/edk/test:test_support", |
68 "//mojo/public/cpp/environment", | 34 "//mojo/public/cpp/environment", |
69 "//mojo/public/cpp/system", | 35 "//mojo/public/cpp/system", |
70 "//mojo/public/cpp/utility", | 36 "//mojo/public/cpp/utility", |
71 "//mojo/environment:chromium", | 37 "//mojo/environment:chromium", |
72 "//testing/gtest", | 38 "//testing/gtest", |
73 ] | 39 ] |
74 } | 40 } |
75 | 41 |
76 copy("expect") { | |
77 sources = [ | |
78 "//mojo/dart/testing/expect.dart", | |
79 ] | |
80 outputs = [ | |
81 "$root_gen_dir/dart-gen/{{source_root_relative_dir}}/{{source_file_part}}", | |
82 ] | |
83 } | |
84 | |
85 copy("validation_test_input_parser") { | |
86 sources = [ | |
87 "//mojo/dart/testing/validation_test_input_parser.dart", | |
88 ] | |
89 outputs = [ | |
90 "$root_gen_dir/dart-gen/{{source_root_relative_dir}}/{{source_file_part}}", | |
91 ] | |
92 } | |
93 | |
94 copy("async_helper") { | |
95 sources = [ | |
96 "//mojo/dart/testing/async_helper.dart", | |
97 ] | |
98 outputs = [ | |
99 "$root_gen_dir/dart-gen/{{source_root_relative_dir}}/{{source_file_part}}", | |
100 ] | |
101 } | |
102 | |
103 source_set("dart_to_cpp_unittests") { | 42 source_set("dart_to_cpp_unittests") { |
104 testonly = true | 43 testonly = true |
105 sources = [ | 44 sources = [ |
106 "dart_to_cpp_tests.cc", | 45 "dart_to_cpp_tests.cc", |
107 ] | 46 ] |
108 deps = [ | 47 deps = [ |
109 ":dart_controller_for_test", | 48 ":dart_controller_for_test", |
110 ":dart_to_cpp_bindings", | 49 ":dart_to_cpp_bindings", |
111 "//base", | 50 "//base", |
112 "//crypto", | 51 "//crypto", |
113 "//mojo/dart/embedder:dart_controller_no_snapshot", | 52 "//mojo/dart/embedder:dart_controller_no_snapshot", |
114 "//mojo/edk/test:test_support", | 53 "//mojo/edk/test:test_support", |
115 "//mojo/public/cpp/bindings", | 54 "//mojo/public/cpp/bindings", |
116 "//mojo/public/cpp/system", | 55 "//mojo/public/cpp/system", |
117 "//mojo/public/interfaces/bindings/tests:test_interfaces", | 56 "//mojo/public/interfaces/bindings/tests:test_interfaces", |
118 "//testing/gtest", | 57 "//testing/gtest", |
119 ] | 58 ] |
120 } | 59 } |
121 | 60 |
122 mojom("dart_to_cpp_bindings") { | 61 mojom("dart_to_cpp_bindings") { |
123 sources = [ | 62 sources = [ |
124 "dart_to_cpp.mojom", | 63 "dart_to_cpp.mojom", |
125 ] | 64 ] |
126 } | 65 } |
OLD | NEW |