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