OLD | NEW |
| (Empty) |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 # This file is meant to be included into a target to provide a rule | |
6 # to "build" .isolate files into a .isolated file. | |
7 # | |
8 # To use this, create a gyp target with the following form: | |
9 # 'conditions': [ | |
10 # ['test_isolation_mode != "noop"', { | |
11 # 'targets': [ | |
12 # { | |
13 # 'target_name': 'foo_test_run', | |
14 # 'type': 'none', | |
15 # 'dependencies': [ | |
16 # 'foo_test', | |
17 # ], | |
18 # 'includes': [ | |
19 # '../build/isolate.gypi', | |
20 # ], | |
21 # 'sources': [ | |
22 # 'foo_test.isolate', | |
23 # ], | |
24 # }, | |
25 # ], | |
26 # }], | |
27 # ], | |
28 # | |
29 # Note: foo_test.isolate is included and a source file. It is an inherent | |
30 # property of the .isolate format. This permits to define GYP variables but is | |
31 # a stricter format than GYP so isolate.py can read it. | |
32 # | |
33 # The generated .isolated file will be: | |
34 # <(PRODUCT_DIR)/foo_test.isolated | |
35 # | |
36 # See http://dev.chromium.org/developers/testing/isolated-testing/for-swes | |
37 # for more information. | |
38 | |
39 { | |
40 'rules': [ | |
41 { | |
42 'rule_name': 'isolate', | |
43 'extension': 'isolate', | |
44 'inputs': [ | |
45 # Files that are known to be involved in this step. | |
46 '<(DEPTH)/tools/isolate_driver.py', | |
47 '<(DEPTH)/tools/swarming_client/isolate.py', | |
48 '<(DEPTH)/tools/swarming_client/run_isolated.py', | |
49 ], | |
50 'outputs': [], | |
51 'action': [ | |
52 'python', | |
53 '<(DEPTH)/tools/isolate_driver.py', | |
54 '<(test_isolation_mode)', | |
55 '--isolated', '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', | |
56 '--isolate', '<(RULE_INPUT_PATH)', | |
57 | |
58 # Variables should use the -V FOO=<(FOO) form so frequent values, | |
59 # like '0' or '1', aren't stripped out by GYP. Run 'isolate.py help' for | |
60 # more details. | |
61 | |
62 # Path variables are used to replace file paths when loading a .isolate | |
63 # file | |
64 '--path-variable', 'DEPTH', '<(DEPTH)', | |
65 '--path-variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ', | |
66 | |
67 # Note: This list must match DefaultConfigVariables() | |
68 # in build/android/pylib/utils/isolator.py | |
69 '--config-variable', 'CONFIGURATION_NAME=<(CONFIGURATION_NAME)', | |
70 '--config-variable', 'OS=<(OS)', | |
71 '--config-variable', 'asan=<(asan)', | |
72 '--config-variable', 'branding=<(branding)', | |
73 '--config-variable', 'chromeos=<(chromeos)', | |
74 '--config-variable', 'component=<(component)', | |
75 '--config-variable', 'disable_nacl=<(disable_nacl)', | |
76 '--config-variable', 'enable_pepper_cdms=<(enable_pepper_cdms)', | |
77 '--config-variable', 'enable_plugins=<(enable_plugins)', | |
78 '--config-variable', 'fastbuild=<(fastbuild)', | |
79 '--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)', | |
80 # TODO(kbr): move this to chrome_tests.gypi:gles2_conform_tests_run | |
81 # once support for user-defined config variables is added. | |
82 '--config-variable', | |
83 'internal_gles2_conform_tests=<(internal_gles2_conform_tests)', | |
84 '--config-variable', 'kasko=<(kasko)', | |
85 '--config-variable', 'lsan=<(lsan)', | |
86 '--config-variable', 'msan=<(msan)', | |
87 '--config-variable', 'target_arch=<(target_arch)', | |
88 '--config-variable', 'tsan=<(tsan)', | |
89 '--config-variable', 'use_custom_libcxx=<(use_custom_libcxx)', | |
90 '--config-variable', 'use_instrumented_libraries=<(use_instrumented_libr
aries)', | |
91 '--config-variable', | |
92 'use_prebuilt_instrumented_libraries=<(use_prebuilt_instrumented_librari
es)', | |
93 '--config-variable', 'use_ozone=<(use_ozone)', | |
94 '--config-variable', 'use_x11=<(use_x11)', | |
95 '--config-variable', 'v8_use_external_startup_data=<(v8_use_external_sta
rtup_data)', | |
96 ], | |
97 'conditions': [ | |
98 # Note: When gyp merges lists, it appends them to the old value. | |
99 # Extra variables are replaced on the 'command' entry and on paths in | |
100 # the .isolate file but are not considered relative paths. | |
101 ['OS=="mac"', { | |
102 'action': [ | |
103 '--extra-variable', 'mac_product_name=<(mac_product_name)', | |
104 ], | |
105 }], | |
106 ["test_isolation_mode == 'prepare'", { | |
107 'outputs': [ | |
108 '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated.gen.json', | |
109 ], | |
110 }, { | |
111 'outputs': [ | |
112 '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', | |
113 ], | |
114 }], | |
115 ['OS=="win"', { | |
116 'includes': ['../build/util/version.gypi'], | |
117 'action': [ | |
118 '--extra-variable', 'version_full=<(version_full)', | |
119 '--config-variable', 'msvs_version=<(MSVS_VERSION)', | |
120 ], | |
121 }, { | |
122 'action': [ | |
123 '--config-variable', 'msvs_version=0', | |
124 ], | |
125 }], | |
126 ], | |
127 }, | |
128 ], | |
129 } | |
OLD | NEW |