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/module_args/v8.gni") | 5 import("//build/module_args/v8.gni") |
6 import("//v8/snapshot_toolchain.gni") | |
Roland McGrath
2015/09/21 23:59:07
I can't find snapshot_toolchain.gni. Is it in ano
| |
6 | 7 |
7 # Variables: | 8 # Variables: |
8 # test_type: One of 'webui', 'unit' or 'extension' indicating what | 9 # test_type: One of 'webui', 'unit' or 'extension' indicating what |
9 # environment the test runs under. | 10 # environment the test runs under. |
10 # sources: List of javascript test source files. | 11 # sources: List of javascript test source files. |
11 # deps_js: Javascript file with closure library dependencies. Only needed | 12 # deps_js: Javascript file with closure library dependencies. Only needed |
12 # if the test fixtures use closureModuleDeps. | 13 # if the test fixtures use closureModuleDeps. |
13 # gen_include_files: List of javascript files used in GEN_INCLUDE calls | 14 # gen_include_files: List of javascript files used in GEN_INCLUDE calls |
14 # in the tests and therefore considered input to the C++ generation step. | 15 # in the tests and therefore considered input to the C++ generation step. |
15 # extra_js_files: List of javascript files needed by the test at runtime, | 16 # extra_js_files: List of javascript files needed by the test at runtime, |
(...skipping 11 matching lines...) Expand all Loading... | |
27 # The mapping from sources to the copied version. | 28 # The mapping from sources to the copied version. |
28 copied_source_pattern = "$root_out_dir/test_data/{{source_root_relative_dir}}/ {{source_file_part}}" | 29 copied_source_pattern = "$root_out_dir/test_data/{{source_root_relative_dir}}/ {{source_file_part}}" |
29 | 30 |
30 action_foreach(action_name) { | 31 action_foreach(action_name) { |
31 testonly = true | 32 testonly = true |
32 visibility = [ ":$source_set_name" ] | 33 visibility = [ ":$source_set_name" ] |
33 script = "//tools/gypv8sh.py" | 34 script = "//tools/gypv8sh.py" |
34 | 35 |
35 sources = invoker.sources | 36 sources = invoker.sources |
36 | 37 |
37 d8_path = get_label_info("//v8:d8($host_toolchain)", "root_out_dir") + "/d8" | 38 d8_path = |
39 get_label_info("//v8:d8($snapshot_toolchain)", "root_out_dir") + "/d8" | |
38 if (is_win) { | 40 if (is_win) { |
39 d8_path += ".exe" | 41 d8_path += ".exe" |
40 } | 42 } |
41 | 43 |
42 input_js = [ | 44 input_js = [ |
43 "//chrome/third_party/mock4js/mock4js.js", | 45 "//chrome/third_party/mock4js/mock4js.js", |
44 "//chrome/test/data/webui/test_api.js", | 46 "//chrome/test/data/webui/test_api.js", |
45 "//chrome/test/base/js2gtest.js", | 47 "//chrome/test/base/js2gtest.js", |
46 ] | 48 ] |
47 inputs = [ d8_path ] + input_js | 49 inputs = [ d8_path ] + input_js |
(...skipping 30 matching lines...) Expand all Loading... | |
78 } else { | 80 } else { |
79 args += [ "--external=n" ] | 81 args += [ "--external=n" ] |
80 } | 82 } |
81 args += [ | 83 args += [ |
82 "{{source}}", | 84 "{{source}}", |
83 "{{source_root_relative_dir}}/{{source_file_part}}", | 85 "{{source_root_relative_dir}}/{{source_file_part}}", |
84 ] | 86 ] |
85 args += rebase_path(outputs, root_build_dir) | 87 args += rebase_path(outputs, root_build_dir) |
86 | 88 |
87 deps = [ | 89 deps = [ |
88 "//v8:d8($host_toolchain)", | 90 "//v8:d8($snapshot_toolchain)", |
89 ] | 91 ] |
90 if (defined(invoker.deps)) { | 92 if (defined(invoker.deps)) { |
91 deps += invoker.deps | 93 deps += invoker.deps |
92 } | 94 } |
93 } | 95 } |
94 | 96 |
95 if (defined(invoker.extra_js_files)) { | 97 if (defined(invoker.extra_js_files)) { |
96 copy_target_name = target_name + "_copy" | 98 copy_target_name = target_name + "_copy" |
97 copy(copy_target_name) { | 99 copy(copy_target_name) { |
98 visibility = [ ":$source_set_name" ] | 100 visibility = [ ":$source_set_name" ] |
(...skipping 22 matching lines...) Expand all Loading... | |
121 "//url", | 123 "//url", |
122 ] | 124 ] |
123 if (defined(invoker.deps)) { | 125 if (defined(invoker.deps)) { |
124 deps += invoker.deps | 126 deps += invoker.deps |
125 } | 127 } |
126 if (defined(invoker.extra_js_files)) { | 128 if (defined(invoker.extra_js_files)) { |
127 data_deps = [ ":$copy_target_name" ] | 129 data_deps = [ ":$copy_target_name" ] |
128 } | 130 } |
129 } | 131 } |
130 } | 132 } |
OLD | NEW |