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"', { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 # More importantly, it means that even if a isolate_dependency_tracked | 53 # More importantly, it means that even if a isolate_dependency_tracked |
54 # file is missing, for example if a file was deleted and the .isolate | 54 # file is missing, for example if a file was deleted and the .isolate |
55 # file was not updated, that won't break the build, especially in the | 55 # file was not updated, that won't break the build, especially in the |
56 # case where foo_tests_run is not built! This should be reenabled once | 56 # case where foo_tests_run is not built! This should be reenabled once |
57 # the switch-over to running tests on Swarm is completed. | 57 # the switch-over to running tests on Swarm is completed. |
58 #'<@(isolate_dependency_tracked)', | 58 #'<@(isolate_dependency_tracked)', |
59 ], | 59 ], |
60 'outputs': [ | 60 'outputs': [ |
61 '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', | 61 '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', |
62 ], | 62 ], |
| 63 'action': [ |
| 64 'python', |
| 65 '<(DEPTH)/tools/swarming_client/isolate.py', |
| 66 '<(test_isolation_mode)', |
| 67 # Variables should use the -V FOO=<(FOO) form so frequent values, |
| 68 # like '0' or '1', aren't stripped out by GYP. |
| 69 '--variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ', |
| 70 '--variable', 'OS=<(OS)', |
| 71 '--result', '<@(_outputs)', |
| 72 '--isolate', '<(RULE_INPUT_PATH)', |
| 73 ], |
63 'conditions': [ | 74 'conditions': [ |
| 75 # Note: When gyp merges lists, it appends them to the old value. |
| 76 ['OS=="mac"', { |
| 77 # <(mac_product_name) can contain a space, so don't use FOO=<(FOO) |
| 78 # form. |
| 79 'action': [ '--variable', 'mac_product_name', '<(mac_product_name)' ], |
| 80 }], |
64 ["test_isolation_outdir==''", { | 81 ["test_isolation_outdir==''", { |
65 'action': [ | 82 # GYP will eliminate duplicate arguments so '<(PRODUCT_DIR)' cannot |
66 'python', | 83 # be provided twice. To work around this behavior, append '/'. |
67 '<(DEPTH)/tools/swarming_client/isolate.py', | 84 # |
68 '<(test_isolation_mode)', | 85 # Also have a space after <(PRODUCT_DIR) or visual studio will |
69 # GYP will eliminate duplicate arguments so '<(PRODUCT_DIR)' cannot | 86 # escape the argument wrappping " with the \ and merge it into |
70 # be provided twice. To work around this behavior, append '/'. | 87 # the following arguments. |
71 # | 88 'action': [ '--outdir', '<(PRODUCT_DIR)/ ' ], |
72 # Also have a space after <(PRODUCT_DIR) or visual studio will | |
73 # escape the argument wrappping " with the \ and merge it into | |
74 # the following arguments. | |
75 # | |
76 # Other variables should use the -V FOO=<(FOO) form so frequent | |
77 # values, like '0' or '1', aren't stripped out by GYP. | |
78 '--outdir', '<(PRODUCT_DIR)/ ', | |
79 '--variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ', | |
80 '--variable', 'OS=<(OS)', | |
81 '--result', '<@(_outputs)', | |
82 '--isolate', '<(RULE_INPUT_PATH)', | |
83 ], | |
84 }, { | 89 }, { |
85 'action': [ | 90 'action': [ '--outdir', '<(test_isolation_outdir)' ], |
86 'python', | |
87 '<(DEPTH)/tools/swarming_client/isolate.py', | |
88 '<(test_isolation_mode)', | |
89 '--outdir', '<(test_isolation_outdir)', | |
90 # See comment above. | |
91 '--variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ', | |
92 '--variable', 'OS=<(OS)', | |
93 '--result', '<@(_outputs)', | |
94 '--isolate', '<(RULE_INPUT_PATH)', | |
95 ], | |
96 }], | 91 }], |
97 ['test_isolation_fail_on_missing == 0', { | 92 ['test_isolation_fail_on_missing == 0', { |
98 'action': ['--ignore_broken_items'], | 93 'action': ['--ignore_broken_items'], |
99 }, | 94 }, |
100 ], | 95 ], |
101 ], | 96 ], |
102 | 97 |
103 'msvs_cygwin_shell': 0, | 98 'msvs_cygwin_shell': 0, |
104 }, | 99 }, |
105 ], | 100 ], |
106 } | 101 } |
OLD | NEW |