3 # Copyright 2013, Google Inc.
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are met:
8 # 1. Redistributions of source code must retain the above copyright notice,
9 # this list of conditions and the following disclaimer.
10 # 2. Redistributions in binary form must reproduce the above copyright notice,
11 # this list of conditions and the following disclaimer in the documentation
12 # and/or other materials provided with the distribution.
13 # 3. The name of the author may not be used to endorse or promote products
14 # derived from this software without specific prior written permission.
16 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19 # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 # Copied from Chromium's src/build/isolate.gypi
30 # It was necessary to copy this file to libjingle , because the path to
31 # build/common.gypi is different for the standalone and Chromium builds. Gyp
32 # doesn't permit conditional inclusion or variable expansion in include paths.
33 # http://code.google.com/p/gyp/wiki/InputFormatReference#Including_Other_Files
35 # Local modifications:
36 # * Removed include of '../chrome/version.gypi'.
37 # * Removal passing of version_full variable created in version.gypi:
38 # '--extra-variable', 'version_full=<(version_full)',
40 # This file is meant to be included into a target to provide a rule
41 # to "build" .isolate files into a .isolated file.
43 # To use this, create a gyp target with the following form:
45 # ['test_isolation_mode != "noop"', {
48 # 'target_name': 'foo_test_run',
54 # '../build/isolate.gypi',
65 # Note: foo_test.isolate is included and a source file. It is an inherent
66 # property of the .isolate format. This permits to define GYP variables but is
67 # a stricter format than GYP so isolate.py can read it.
69 # The generated .isolated file will be:
70 # <(PRODUCT_DIR)/foo_test.isolated
72 # See http://dev.chromium.org/developers/testing/isolated-testing/for-swes
73 # for more information.
78 'rule_name': 'isolate',
79 'extension': 'isolate',
81 # Files that are known to be involved in this step.
82 '<(DEPTH)/tools/swarming_client/isolate.py',
83 '<(DEPTH)/tools/swarming_client/run_isolated.py',
85 # Disable file tracking by the build driver for now. This means the
86 # project must have the proper build-time dependency for their runtime
87 # dependency. This improves the runtime of the build driver since it
88 # doesn't have to stat() all these files.
90 # More importantly, it means that even if a isolate_dependency_tracked
91 # file is missing, for example if a file was deleted and the .isolate
92 # file was not updated, that won't break the build, especially in the
93 # case where foo_tests_run is not built! This should be reenabled once
94 # the switch-over to running tests on Swarm is completed.
95 #'<@(isolate_dependency_tracked)',
98 '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
102 '<(DEPTH)/tools/swarming_client/isolate.py',
103 '<(test_isolation_mode)',
104 '--result', '<@(_outputs)',
105 '--isolate', '<(RULE_INPUT_PATH)',
107 # Variables should use the -V FOO=<(FOO) form so frequent values,
108 # like '0' or '1', aren't stripped out by GYP. Run 'isolate.py help' for
111 # This list needs to be kept in sync with the cmd line options
112 # in src/build/android/pylib/gtest/setup.py.
114 # Path variables are used to replace file paths when loading a .isolate
116 '--path-variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ',
118 '--config-variable', 'OS=<(OS)',
119 '--config-variable', 'chromeos=<(chromeos)',
120 '--config-variable', 'component=<(component)',
121 # TODO(kbr): move this to chrome_tests.gypi:gles2_conform_tests_run
122 # once support for user-defined config variables is added.
124 'internal_gles2_conform_tests=<(internal_gles2_conform_tests)',
125 '--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
126 '--config-variable', 'use_openssl=<(use_openssl)',
129 # Note: When gyp merges lists, it appends them to the old value.
131 # <(mac_product_name) can contain a space, so don't use FOO=<(FOO)
134 '--extra-variable', 'mac_product_name', '<(mac_product_name)',
137 ["test_isolation_outdir!=''", {
138 'action': [ '--isolate-server', '<(test_isolation_outdir)' ],
140 ['test_isolation_fail_on_missing == 0', {
141 'action': ['--ignore_broken_items'],