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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 'python', | 47 'python', |
48 '<@(_inputs)', | 48 '<@(_inputs)', |
49 '<(RULE_INPUT_PATH)', | 49 '<(RULE_INPUT_PATH)', |
50 '<@(_outputs)', | 50 '<@(_outputs)', |
51 ], | 51 ], |
52 }, | 52 }, |
53 { | 53 { |
54 'rule_name': 'js2unit', | 54 'rule_name': 'js2unit', |
55 'extension': 'gtestjs', | 55 'extension': 'gtestjs', |
56 'msvs_external_rule': 1, | 56 'msvs_external_rule': 1, |
| 57 'variables': { |
| 58 'conditions': [ |
| 59 ['v8_use_external_startup_data==1', { |
| 60 'external_v8': 'y', |
| 61 }, { |
| 62 'external_v8': 'n', |
| 63 }], |
| 64 ], |
| 65 }, |
57 'inputs': [ | 66 'inputs': [ |
58 '<(gypv8sh)', | 67 '<(gypv8sh)', |
59 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)', | 68 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)', |
60 '<(mock_js)', | 69 '<(mock_js)', |
61 '<(test_api_js)', | 70 '<(test_api_js)', |
62 '<(js2gtest)', | 71 '<(js2gtest)', |
63 ], | 72 ], |
64 'outputs': [ | 73 'outputs': [ |
65 '<(INTERMEDIATE_DIR)/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen
.cc', | 74 '<(INTERMEDIATE_DIR)/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen
.cc', |
66 '<(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)', |
67 ], | 76 ], |
68 'process_outputs_as_sources': 1, | 77 'process_outputs_as_sources': 1, |
69 'action': [ | 78 'action': [ |
70 'python', | 79 'python', |
71 '<@(_inputs)', | 80 '<@(_inputs)', |
| 81 '--external', '<(external_v8)', |
72 'unit', | 82 'unit', |
73 '<(RULE_INPUT_PATH)', | 83 '<(RULE_INPUT_PATH)', |
74 'chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).<(_extension)', | 84 'chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).<(_extension)', |
75 '<@(_outputs)', | 85 '<@(_outputs)', |
76 ], | 86 ], |
77 }, | 87 }, |
78 ], | 88 ], |
79 } | 89 } |
OLD | NEW |