OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 is meant to be included into a target to provide a rule | 5 # This file is meant to be included into a target to provide a rule |
6 # to "build" .isolate files into a .isolated file. | 6 # to "build" .isolate files into a .isolated file. |
7 # | 7 # |
8 # To use this, create a gyp target with the following form: | 8 # To use this, create a gyp target with the following form: |
9 # 'conditions': [ | 9 # 'conditions': [ |
10 # ['test_isolation_mode != "noop"', { | 10 # ['test_isolation_mode != "noop"', { |
11 # 'targets': [ | 11 # 'targets': [ |
12 # { | 12 # { |
13 # 'target_name': 'foo_test_run', | 13 # 'target_name': 'foo_test_run', |
14 # 'type': 'none', | 14 # 'type': 'none', |
15 # 'dependencies': [ | 15 # 'dependencies': [ |
16 # 'foo_test', | 16 # 'foo_test', |
17 # ], | 17 # ], |
18 # 'includes': [ | 18 # 'includes': [ |
19 # '../build/isolate.gypi', | 19 # '../build/isolate.gypi', |
20 # 'foo_test.isolate', | |
21 # ], | 20 # ], |
22 # 'sources': [ | 21 # 'sources': [ |
23 # 'foo_test.isolate', | 22 # 'foo_test.isolate', |
24 # ], | 23 # ], |
25 # }, | 24 # }, |
26 # ], | 25 # ], |
27 # }], | 26 # }], |
28 # ], | 27 # ], |
29 # | 28 # |
30 # Note: foo_test.isolate is included and a source file. It is an inherent | 29 # Note: foo_test.isolate is included and a source file. It is an inherent |
(...skipping 12 matching lines...) Expand all Loading... |
43 ], | 42 ], |
44 'rules': [ | 43 'rules': [ |
45 { | 44 { |
46 'rule_name': 'isolate', | 45 'rule_name': 'isolate', |
47 'extension': 'isolate', | 46 'extension': 'isolate', |
48 'inputs': [ | 47 'inputs': [ |
49 # Files that are known to be involved in this step. | 48 # Files that are known to be involved in this step. |
50 '<(DEPTH)/tools/isolate_driver.py', | 49 '<(DEPTH)/tools/isolate_driver.py', |
51 '<(DEPTH)/tools/swarming_client/isolate.py', | 50 '<(DEPTH)/tools/swarming_client/isolate.py', |
52 '<(DEPTH)/tools/swarming_client/run_isolated.py', | 51 '<(DEPTH)/tools/swarming_client/run_isolated.py', |
53 | |
54 # Disable file tracking by the build driver for now. This means the | |
55 # project must have the proper build-time dependency for their runtime | |
56 # dependency. This improves the runtime of the build driver since it | |
57 # doesn't have to stat() all these files. | |
58 # | |
59 # More importantly, it means that even if a isolate_dependency_tracked | |
60 # file is missing, for example if a file was deleted and the .isolate | |
61 # file was not updated, that won't break the build, especially in the | |
62 # case where foo_tests_run is not built! This should be reenabled once | |
63 # the switch-over to running tests on Swarm is completed. | |
64 #'<@(isolate_dependency_tracked)', | |
65 ], | 52 ], |
66 'outputs': [], | 53 'outputs': [], |
67 'action': [ | 54 'action': [ |
68 'python', | 55 'python', |
69 '<(DEPTH)/tools/isolate_driver.py', | 56 '<(DEPTH)/tools/isolate_driver.py', |
70 '<(test_isolation_mode)', | 57 '<(test_isolation_mode)', |
71 '--isolated', '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', | 58 '--isolated', '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', |
72 '--isolate', '<(RULE_INPUT_PATH)', | 59 '--isolate', '<(RULE_INPUT_PATH)', |
73 | 60 |
74 # Variables should use the -V FOO=<(FOO) form so frequent values, | 61 # Variables should use the -V FOO=<(FOO) form so frequent values, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 ], | 112 ], |
126 }, { | 113 }, { |
127 'outputs': [ | 114 'outputs': [ |
128 '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', | 115 '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', |
129 ], | 116 ], |
130 }], | 117 }], |
131 ], | 118 ], |
132 }, | 119 }, |
133 ], | 120 ], |
134 } | 121 } |
OLD | NEW |