OLD | NEW |
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 # This file defines rules that allow you to include JavaScript tests in | 5 # This file defines rules that allow you to include JavaScript tests in |
6 # your unittests target. | 6 # your unittests target. |
7 | 7 |
8 # To add JS unittests to an existing unittest target, first include | 8 # To add JS unittests to an existing unittest target, first include |
9 # 'js_unittest_vars.gypi' at the top of your GYP file to define the required | 9 # 'js_unittest_vars.gypi' at the top of your GYP file to define the required |
10 # variables: | 10 # variables: |
(...skipping 12 matching lines...) Expand all Loading... |
23 # ], | 23 # ], |
24 # } | 24 # } |
25 # | 25 # |
26 # Note that when you run your TestSuite, you'll need to call | 26 # Note that when you run your TestSuite, you'll need to call |
27 # chrome::RegisterPathProvider(). These path providers are required by | 27 # chrome::RegisterPathProvider(). These path providers are required by |
28 # src/chrome/test/base/v8_unit_test.cc to setup and run the tests. | 28 # src/chrome/test/base/v8_unit_test.cc to setup and run the tests. |
29 | 29 |
30 { | 30 { |
31 'dependencies': [ | 31 'dependencies': [ |
32 # Used by rule js2unit below. | 32 # Used by rule js2unit below. |
33 '../v8/src/d8.gyp:d8#host', | 33 '../v8/samples/samples.gyp:v8_shell#host', |
34 ], | 34 ], |
35 'rules': [ | 35 'rules': [ |
36 { | 36 { |
37 'rule_name': 'copyjs', | 37 'rule_name': 'copyjs', |
38 'extension': 'js', | 38 'extension': 'js', |
39 'msvs_external_rule': 1, | 39 'msvs_external_rule': 1, |
40 'inputs': [ | 40 'inputs': [ |
41 '<(DEPTH)/build/cp.py', | 41 '<(DEPTH)/build/cp.py', |
42 ], | 42 ], |
43 'outputs': [ | 43 'outputs': [ |
(...skipping 14 matching lines...) Expand all Loading... |
58 'conditions': [ | 58 'conditions': [ |
59 ['v8_use_external_startup_data==1', { | 59 ['v8_use_external_startup_data==1', { |
60 'external_v8': 'y', | 60 'external_v8': 'y', |
61 }, { | 61 }, { |
62 'external_v8': 'n', | 62 'external_v8': 'n', |
63 }], | 63 }], |
64 ], | 64 ], |
65 }, | 65 }, |
66 'inputs': [ | 66 'inputs': [ |
67 '<(gypv8sh)', | 67 '<(gypv8sh)', |
68 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)', | 68 '<(PRODUCT_DIR)/v8_shell<(EXECUTABLE_SUFFIX)', |
69 '<(mock_js)', | 69 '<(mock_js)', |
70 '<(test_api_js)', | 70 '<(test_api_js)', |
71 '<(js2gtest)', | 71 '<(js2gtest)', |
72 ], | 72 ], |
73 'outputs': [ | 73 'outputs': [ |
74 '<(INTERMEDIATE_DIR)/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen
.cc', | 74 '<(INTERMEDIATE_DIR)/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen
.cc', |
75 '<(PRODUCT_DIR)/test_data/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT
).<(_extension)', | 75 '<(PRODUCT_DIR)/test_data/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT
).<(_extension)', |
76 ], | 76 ], |
77 'process_outputs_as_sources': 1, | 77 'process_outputs_as_sources': 1, |
78 'action': [ | 78 'action': [ |
79 'python', | 79 'python', |
80 '<@(_inputs)', | 80 '<@(_inputs)', |
81 '--external', '<(external_v8)', | 81 '--external', '<(external_v8)', |
82 'unit', | 82 'unit', |
83 '<(RULE_INPUT_PATH)', | 83 '<(RULE_INPUT_PATH)', |
84 'chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).<(_extension)', | 84 'chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).<(_extension)', |
85 '<@(_outputs)', | 85 '<@(_outputs)', |
86 ], | 86 ], |
87 }, | 87 }, |
88 ], | 88 ], |
89 } | 89 } |
OLD | NEW |