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.
5 # This file is meant to be included into a target to provide a rule
6 # to "build" .isolate files into a .isolated file.
8 # To use this, create a gyp target with the following form:
10 # ['test_isolation_mode != "noop"', {
13 # 'target_name': 'foo_test_run',
19 # '../build/isolate.gypi',
30 # Note: foo_test.isolate is included and a source file. It is an inherent
31 # property of the .isolate format. This permits to define GYP variables but is
32 # a stricter format than GYP so isolate.py can read it.
34 # The generated .isolated file will be:
35 # <(PRODUCT_DIR)/foo_test.isolated
37 # See http://dev.chromium.org/developers/testing/isolated-testing/for-swes
38 # for more information.
42 '../chrome/version.gypi',
46 'rule_name': 'isolate',
47 'extension': 'isolate',
49 # Files that are known to be involved in this step.
50 '<(DEPTH)/tools/swarming_client/isolate.py',
51 '<(DEPTH)/tools/swarming_client/run_isolated.py',
53 # Disable file tracking by the build driver for now. This means the
54 # project must have the proper build-time dependency for their runtime
55 # dependency. This improves the runtime of the build driver since it
56 # doesn't have to stat() all these files.
58 # More importantly, it means that even if a isolate_dependency_tracked
59 # file is missing, for example if a file was deleted and the .isolate
60 # file was not updated, that won't break the build, especially in the
61 # case where foo_tests_run is not built! This should be reenabled once
62 # the switch-over to running tests on Swarm is completed.
63 #'<@(isolate_dependency_tracked)',
66 '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
70 '<(DEPTH)/tools/swarming_client/isolate.py',
71 '<(test_isolation_mode)',
72 '--result', '<@(_outputs)',
73 '--isolate', '<(RULE_INPUT_PATH)',
75 # Variables should use the -V FOO=<(FOO) form so frequent values,
76 # like '0' or '1', aren't stripped out by GYP. Run 'isolate.py help' for
79 # This list needs to be kept in sync with the cmd line options
80 # in src/build/android/pylib/gtest/setup.py.
82 # Path variables are used to replace file paths when loading a .isolate
84 '--path-variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ',
86 # Extra variables are replaced on the 'command' entry and on paths in
87 # the .isolate file but are not considered relative paths.
88 '--extra-variable', 'version_full=<(version_full)',
90 '--config-variable', 'OS=<(OS)',
91 '--config-variable', 'component=<(component)',
92 # TODO(kbr): move this to chrome_tests.gypi:gles2_conform_tests_run
93 # once support for user-defined config variables is added.
95 'internal_gles2_conform_tests=<(internal_gles2_conform_tests)',
96 '--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
97 '--config-variable', 'use_openssl=<(use_openssl)',
100 # Note: When gyp merges lists, it appends them to the old value.
102 # <(mac_product_name) can contain a space, so don't use FOO=<(FOO)
105 '--extra-variable', 'mac_product_name', '<(mac_product_name)',
108 ["test_isolation_outdir==''", {
109 # GYP will eliminate duplicate arguments so '<(PRODUCT_DIR)' cannot
110 # be provided twice. To work around this behavior, append '/'.
112 # Also have a space after <(PRODUCT_DIR) or visual studio will
113 # escape the argument wrappping " with the \ and merge it into
114 # the following arguments.
115 'action': [ '--outdir', '<(PRODUCT_DIR)/ ' ],
117 'action': [ '--outdir', '<(test_isolation_outdir)' ],
119 ['test_isolation_fail_on_missing == 0', {
120 'action': ['--ignore_broken_items'],
125 'msvs_cygwin_shell': 0,