kjellander@webrtc.org | 2a97317 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 1 | # Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
| 9 | # Copied from Chromium's src/build/isolate.gypi |
| 10 | # |
Henrik Kjellander | d6d27e7 | 2015-09-25 22:19:11 +0200 | [diff] [blame] | 11 | # It was necessary to copy this file because the path to build/common.gypi is |
| 12 | # different for the standalone and Chromium builds. Gyp doesn't permit |
| 13 | # conditional inclusion or variable expansion in include paths. |
kjellander@webrtc.org | 2a97317 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 14 | # http://code.google.com/p/gyp/wiki/InputFormatReference#Including_Other_Files |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 15 | # |
| 16 | # Local modifications: |
| 17 | # * Removed include of '../chrome/version.gypi'. |
Henrik Kjellander | d6d27e7 | 2015-09-25 22:19:11 +0200 | [diff] [blame] | 18 | # * Removed passing of version_full variable created in version.gypi: |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 19 | # '--extra-variable', 'version_full=<(version_full)', |
kjellander@webrtc.org | 2a97317 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 20 | |
| 21 | # This file is meant to be included into a target to provide a rule |
| 22 | # to "build" .isolate files into a .isolated file. |
| 23 | # |
| 24 | # To use this, create a gyp target with the following form: |
| 25 | # 'conditions': [ |
| 26 | # ['test_isolation_mode != "noop"', { |
| 27 | # 'targets': [ |
| 28 | # { |
| 29 | # 'target_name': 'foo_test_run', |
| 30 | # 'type': 'none', |
| 31 | # 'dependencies': [ |
| 32 | # 'foo_test', |
| 33 | # ], |
| 34 | # 'includes': [ |
| 35 | # '../build/isolate.gypi', |
| 36 | # 'foo_test.isolate', |
| 37 | # ], |
| 38 | # 'sources': [ |
| 39 | # 'foo_test.isolate', |
| 40 | # ], |
| 41 | # }, |
| 42 | # ], |
| 43 | # }], |
| 44 | # ], |
| 45 | # |
| 46 | # Note: foo_test.isolate is included and a source file. It is an inherent |
| 47 | # property of the .isolate format. This permits to define GYP variables but is |
| 48 | # a stricter format than GYP so isolate.py can read it. |
| 49 | # |
| 50 | # The generated .isolated file will be: |
| 51 | # <(PRODUCT_DIR)/foo_test.isolated |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 52 | # |
| 53 | # See http://dev.chromium.org/developers/testing/isolated-testing/for-swes |
| 54 | # for more information. |
kjellander@webrtc.org | 2a97317 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 55 | |
| 56 | { |
| 57 | 'rules': [ |
| 58 | { |
| 59 | 'rule_name': 'isolate', |
| 60 | 'extension': 'isolate', |
| 61 | 'inputs': [ |
| 62 | # Files that are known to be involved in this step. |
Henrik Kjellander | d6d27e7 | 2015-09-25 22:19:11 +0200 | [diff] [blame] | 63 | '<(DEPTH)/tools/isolate_driver.py', |
kjellander@webrtc.org | f9bdbe3 | 2013-12-11 13:37:12 +0000 | [diff] [blame] | 64 | '<(DEPTH)/tools/swarming_client/isolate.py', |
| 65 | '<(DEPTH)/tools/swarming_client/run_isolated.py', |
kjellander@webrtc.org | 2a97317 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 66 | ], |
Henrik Kjellander | d6d27e7 | 2015-09-25 22:19:11 +0200 | [diff] [blame] | 67 | 'outputs': [], |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 68 | 'action': [ |
| 69 | 'python', |
Henrik Kjellander | d6d27e7 | 2015-09-25 22:19:11 +0200 | [diff] [blame] | 70 | '<(DEPTH)/tools/isolate_driver.py', |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 71 | '<(test_isolation_mode)', |
Henrik Kjellander | d6d27e7 | 2015-09-25 22:19:11 +0200 | [diff] [blame] | 72 | '--isolated', '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 73 | '--isolate', '<(RULE_INPUT_PATH)', |
| 74 | |
| 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 |
| 77 | # more details. |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 78 | |
| 79 | # Path variables are used to replace file paths when loading a .isolate |
| 80 | # file |
kjellander@webrtc.org | a1bfc50 | 2014-06-13 09:02:15 +0000 | [diff] [blame] | 81 | '--path-variable', 'DEPTH', '<(DEPTH)', |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 82 | '--path-variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ', |
| 83 | |
Henrik Kjellander | d6d27e7 | 2015-09-25 22:19:11 +0200 | [diff] [blame] | 84 | # Note: This list must match DefaultConfigVariables() |
| 85 | # in build/android/pylib/utils/isolator.py |
| 86 | '--config-variable', 'CONFIGURATION_NAME=<(CONFIGURATION_NAME)', |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 87 | '--config-variable', 'OS=<(OS)', |
Henrik Kjellander | d6d27e7 | 2015-09-25 22:19:11 +0200 | [diff] [blame] | 88 | '--config-variable', 'asan=<(asan)', |
| 89 | '--config-variable', 'branding=<(branding)', |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 90 | '--config-variable', 'chromeos=<(chromeos)', |
| 91 | '--config-variable', 'component=<(component)', |
Henrik Kjellander | d6d27e7 | 2015-09-25 22:19:11 +0200 | [diff] [blame] | 92 | '--config-variable', 'disable_nacl=<(disable_nacl)', |
| 93 | '--config-variable', 'enable_pepper_cdms=<(enable_pepper_cdms)', |
| 94 | '--config-variable', 'enable_plugins=<(enable_plugins)', |
| 95 | '--config-variable', 'fastbuild=<(fastbuild)', |
| 96 | '--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)', |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 97 | # TODO(kbr): move this to chrome_tests.gypi:gles2_conform_tests_run |
| 98 | # once support for user-defined config variables is added. |
| 99 | '--config-variable', |
| 100 | 'internal_gles2_conform_tests=<(internal_gles2_conform_tests)', |
Henrik Kjellander | d6d27e7 | 2015-09-25 22:19:11 +0200 | [diff] [blame] | 101 | '--config-variable', 'kasko=<(kasko)', |
| 102 | '--config-variable', 'lsan=<(lsan)', |
| 103 | '--config-variable', 'msan=<(msan)', |
| 104 | '--config-variable', 'target_arch=<(target_arch)', |
| 105 | '--config-variable', 'tsan=<(tsan)', |
| 106 | '--config-variable', 'use_custom_libcxx=<(use_custom_libcxx)', |
| 107 | '--config-variable', 'use_instrumented_libraries=<(use_instrumented_libraries)', |
| 108 | '--config-variable', |
| 109 | 'use_prebuilt_instrumented_libraries=<(use_prebuilt_instrumented_libraries)', |
Henrik Kjellander | d6d27e7 | 2015-09-25 22:19:11 +0200 | [diff] [blame] | 110 | '--config-variable', 'use_ozone=<(use_ozone)', |
| 111 | '--config-variable', 'use_x11=<(use_x11)', |
| 112 | '--config-variable', 'v8_use_external_startup_data=<(v8_use_external_startup_data)', |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 113 | ], |
kjellander@webrtc.org | 2a97317 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 114 | 'conditions': [ |
kjellander@webrtc.org | 607c805 | 2014-02-09 18:38:31 +0000 | [diff] [blame] | 115 | # Note: When gyp merges lists, it appends them to the old value. |
| 116 | ['OS=="mac"', { |
kjellander@webrtc.org | 2a97317 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 117 | 'action': [ |
Henrik Kjellander | d6d27e7 | 2015-09-25 22:19:11 +0200 | [diff] [blame] | 118 | '--extra-variable', 'mac_product_name=<(mac_product_name)', |
| 119 | ], |
| 120 | }], |
| 121 | ["test_isolation_mode == 'prepare'", { |
| 122 | 'outputs': [ |
| 123 | '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated.gen.json', |
| 124 | ], |
| 125 | }, { |
| 126 | 'outputs': [ |
| 127 | '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', |
| 128 | ], |
| 129 | }], |
| 130 | ['OS=="win"', { |
| 131 | 'action': [ |
| 132 | '--config-variable', 'msvs_version=<(MSVS_VERSION)', |
| 133 | ], |
| 134 | }, { |
| 135 | 'action': [ |
| 136 | '--config-variable', 'msvs_version=0', |
kjellander@webrtc.org | 2a97317 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 137 | ], |
| 138 | }], |
kjellander@webrtc.org | 2a97317 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 139 | ], |
kjellander@webrtc.org | 2a97317 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 140 | }, |
| 141 | ], |
| 142 | } |