| 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/public/dart/bindings.dart", | 16 "//mojo/public/dart/internal.dart", |
| 17 "//mojo/public/dart/core.dart", | |
| 18 "//mojo/public/dart/src/buffer.dart", | |
| 19 "//mojo/public/dart/src/codec.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", | 17 "//mojo/public/dart/src/handle_watcher.dart", |
| 25 "//mojo/public/dart/src/message.dart", | 18 "//mojo/public/dart/src/natives.dart", |
| 26 "//mojo/public/dart/src/message_pipe.dart", | |
| 27 "//mojo/public/dart/src/proxy.dart", | |
| 28 "//mojo/public/dart/src/struct.dart", | |
| 29 "//mojo/public/dart/src/stub.dart", | |
| 30 "//mojo/public/dart/src/timer_queue.dart", | 19 "//mojo/public/dart/src/timer_queue.dart", |
| 31 "//mojo/public/dart/src/types.dart", | |
| 32 ] | 20 ] |
| 33 output = "$target_gen_dir/test_snapshot_gen.bin" | 21 output = "$target_gen_dir/test_snapshot_gen.bin" |
| 34 outputs = [ | 22 outputs = [ |
| 35 output, | 23 output, |
| 36 ] | 24 ] |
| 37 | 25 |
| 38 gen_snapshot_dir = | 26 gen_snapshot_dir = |
| 39 get_label_info("//dart/runtime/bin:gen_snapshot($host_toolchain)", | 27 get_label_info("//dart/runtime/bin:gen_snapshot($host_toolchain)", |
| 40 "root_out_dir") | 28 "root_out_dir") |
| 41 script = "//dart/runtime/tools/create_snapshot_bin.py" | 29 script = "//dart/runtime/tools/create_snapshot_bin.py" |
| 42 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart") | 30 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart") |
| 43 bindings_path = rebase_path("//mojo/public/dart/bindings.dart") | 31 internal_path = rebase_path("//mojo/public/dart/internal.dart") |
| 44 core_path = rebase_path("//mojo/public/dart/core.dart") | |
| 45 args = [ | 32 args = [ |
| 46 "--executable", | 33 "--executable", |
| 47 rebase_path("$gen_snapshot_dir/gen_snapshot"), | 34 rebase_path("$gen_snapshot_dir/gen_snapshot"), |
| 48 "--package_root", | 35 "--package_root", |
| 49 rebase_path("$root_gen_dir"), | 36 rebase_path("$root_gen_dir"), |
| 50 "--script", | 37 "--script", |
| 51 rebase_path("test_snapshot.dart"), | 38 rebase_path("test_snapshot.dart"), |
| 52 "--output_bin", | 39 "--output_bin", |
| 53 rebase_path(output, root_build_dir), | 40 rebase_path(output, root_build_dir), |
| 54 "--target_os", | 41 "--target_os", |
| 55 os, | 42 os, |
| 56 "--url_mapping=dart:mojo.bindings,$bindings_path", | |
| 57 "--url_mapping=dart:mojo.builtin,$builtin_path", | 43 "--url_mapping=dart:mojo.builtin,$builtin_path", |
| 58 "--url_mapping=dart:mojo.core,$core_path", | 44 "--url_mapping=dart:mojo.internal,$internal_path", |
| 59 ] | 45 ] |
| 60 } | 46 } |
| 61 | 47 |
| 62 action("generate_test_snapshot_file") { | 48 action("generate_test_snapshot_file") { |
| 63 deps = [ | 49 deps = [ |
| 64 ":generate_test_snapshot_bin", | 50 ":generate_test_snapshot_bin", |
| 65 ] | 51 ] |
| 66 inputs = [ | 52 inputs = [ |
| 67 "//dart/runtime/tools/create_snapshot_file.py", | 53 "//dart/runtime/tools/create_snapshot_file.py", |
| 68 "//mojo/dart/embedder/snapshot.cc.tmpl", | 54 "//mojo/dart/embedder/snapshot.cc.tmpl", |
| 69 "$target_gen_dir/test_snapshot_gen.bin", | 55 "$target_gen_dir/test_snapshot_gen.bin", |
| 70 ] | 56 ] |
| 71 output = "$target_gen_dir/test_snapshot.cc" | 57 output = "$target_gen_dir/test_snapshot.cc" |
| 72 outputs = [ | 58 outputs = [ |
| 73 output, | 59 output, |
| 74 ] | 60 ] |
| 75 | 61 |
| 76 script = "//dart/runtime/tools/create_snapshot_file.py" | 62 script = "//dart/runtime/tools/create_snapshot_file.py" |
| 77 args = [ | 63 args = [ |
| 78 "--input_bin", | 64 "--input_bin", |
| 79 rebase_path("$target_gen_dir/test_snapshot_gen.bin"), | 65 rebase_path("$target_gen_dir/test_snapshot_gen.bin"), |
| 80 "--input_cc", | 66 "--input_cc", |
| 81 rebase_path("//mojo/dart/embedder/snapshot.cc.tmpl"), | 67 rebase_path("//mojo/dart/embedder/snapshot.cc.tmpl"), |
| 82 "--output", | 68 "--output", |
| 83 rebase_path(output), | 69 rebase_path(output), |
| 84 ] | 70 ] |
| 85 } | 71 } |
| 86 | 72 |
| 73 # These go into the generated source directory for embedder tests. |
| 74 copy("copy_dart_mojo_sdk") { |
| 75 sources = [ |
| 76 "//mojo/public/dart/application.dart", |
| 77 "//mojo/public/dart/bindings.dart", |
| 78 "//mojo/public/dart/core.dart", |
| 79 "//mojo/public/dart/internal.dart", |
| 80 "//mojo/public/dart/src/application.dart", |
| 81 "//mojo/public/dart/src/application_connection.dart", |
| 82 "//mojo/public/dart/src/buffer.dart", |
| 83 "//mojo/public/dart/src/codec.dart", |
| 84 "//mojo/public/dart/src/data_pipe.dart", |
| 85 "//mojo/public/dart/src/drain_data.dart", |
| 86 "//mojo/public/dart/src/event_stream.dart", |
| 87 "//mojo/public/dart/src/handle.dart", |
| 88 "//mojo/public/dart/src/handle_watcher.dart", |
| 89 "//mojo/public/dart/src/message.dart", |
| 90 "//mojo/public/dart/src/message_pipe.dart", |
| 91 "//mojo/public/dart/src/natives.dart", |
| 92 "//mojo/public/dart/src/proxy.dart", |
| 93 "//mojo/public/dart/src/struct.dart", |
| 94 "//mojo/public/dart/src/stub.dart", |
| 95 "//mojo/public/dart/src/timer_queue.dart", |
| 96 "//mojo/public/dart/src/types.dart", |
| 97 ] |
| 98 outputs = [ |
| 99 "{{source_gen_dir}}/{{source_file_part}}", |
| 100 ] |
| 101 } |
| 102 |
| 87 source_set("dart_controller_for_test") { | 103 source_set("dart_controller_for_test") { |
| 88 testonly = true | 104 testonly = true |
| 89 sources = [ | 105 sources = [ |
| 90 "$target_gen_dir/test_snapshot.cc", | 106 "$target_gen_dir/test_snapshot.cc", |
| 91 ] | 107 ] |
| 92 | 108 |
| 93 deps = [ | 109 deps = [ |
| 94 ":generate_test_snapshot_file", | 110 ":generate_test_snapshot_file", |
| 95 "//mojo/dart/embedder:dart_controller_no_snapshot", | 111 "//mojo/dart/embedder:dart_controller_no_snapshot", |
| 96 ] | 112 ] |
| 97 } | 113 } |
| 98 | 114 |
| 99 test("dart_unittests") { | 115 test("dart_unittests") { |
| 100 sources = [ | 116 sources = [ |
| 101 "run_dart_tests.cc", | 117 "run_dart_tests.cc", |
| 102 "validation_unittest.cc", | 118 "validation_unittest.cc", |
| 103 ] | 119 ] |
| 104 deps = [ | 120 deps = [ |
| 105 ":async_helper", | 121 ":async_helper", |
| 122 ":copy_dart_mojo_sdk", |
| 106 ":dart_controller_for_test", | 123 ":dart_controller_for_test", |
| 107 ":dart_to_cpp_unittests", | 124 ":dart_to_cpp_unittests", |
| 108 ":expect", | 125 ":expect", |
| 109 ":validation_test_input_parser", | 126 ":validation_test_input_parser", |
| 110 "//base", | 127 "//base", |
| 111 "//crypto:crypto", | 128 "//crypto:crypto", |
| 112 "//mojo/dart/embedder:dart_controller_no_snapshot", | 129 "//mojo/dart/embedder:dart_controller_no_snapshot", |
| 113 "//mojo/edk/test:run_all_unittests", | 130 "//mojo/edk/test:run_all_unittests", |
| 114 "//mojo/edk/test:test_support", | 131 "//mojo/edk/test:test_support", |
| 115 "//mojo/public/cpp/environment", | 132 "//mojo/public/cpp/environment", |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 "//mojo/public/interfaces/bindings/tests:test_interfaces", | 181 "//mojo/public/interfaces/bindings/tests:test_interfaces", |
| 165 "//testing/gtest", | 182 "//testing/gtest", |
| 166 ] | 183 ] |
| 167 } | 184 } |
| 168 | 185 |
| 169 mojom("dart_to_cpp_bindings") { | 186 mojom("dart_to_cpp_bindings") { |
| 170 sources = [ | 187 sources = [ |
| 171 "dart_to_cpp.mojom", | 188 "dart_to_cpp.mojom", |
| 172 ] | 189 ] |
| 173 } | 190 } |
| OLD | NEW |