2012-10-20 08:16:31 +04:00
|
|
|
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
# This file is meant to be included into a target to provide a rule
|
|
|
|
# to "build" .isolate files into a .isolated file.
|
|
|
|
#
|
|
|
|
# To use this, create a gyp target with the following form:
|
|
|
|
# 'conditions': [
|
|
|
|
# ['test_isolation_mode != "noop"', {
|
|
|
|
# 'targets': [
|
|
|
|
# {
|
|
|
|
# 'target_name': 'foo_test_run',
|
|
|
|
# 'type': 'none',
|
|
|
|
# 'dependencies': [
|
|
|
|
# 'foo_test',
|
|
|
|
# ],
|
|
|
|
# 'includes': [
|
|
|
|
# '../build/isolate.gypi',
|
|
|
|
# ],
|
|
|
|
# 'sources': [
|
|
|
|
# 'foo_test.isolate',
|
|
|
|
# ],
|
|
|
|
# },
|
|
|
|
# ],
|
|
|
|
# }],
|
|
|
|
# ],
|
|
|
|
#
|
|
|
|
# Note: foo_test.isolate is included and a source file. It is an inherent
|
|
|
|
# property of the .isolate format. This permits to define GYP variables but is
|
|
|
|
# a stricter format than GYP so isolate.py can read it.
|
|
|
|
#
|
|
|
|
# The generated .isolated file will be:
|
|
|
|
# <(PRODUCT_DIR)/foo_test.isolated
|
2013-12-16 17:53:20 +04:00
|
|
|
#
|
|
|
|
# See http://dev.chromium.org/developers/testing/isolated-testing/for-swes
|
|
|
|
# for more information.
|
2012-10-20 08:16:31 +04:00
|
|
|
|
|
|
|
{
|
2014-01-16 23:34:46 +04:00
|
|
|
'includes': [
|
2014-02-21 07:14:02 +04:00
|
|
|
'../build/util/version.gypi',
|
2014-01-16 23:34:46 +04:00
|
|
|
],
|
2012-10-20 08:16:31 +04:00
|
|
|
'rules': [
|
|
|
|
{
|
|
|
|
'rule_name': 'isolate',
|
|
|
|
'extension': 'isolate',
|
|
|
|
'inputs': [
|
2013-04-10 21:51:23 +04:00
|
|
|
# Files that are known to be involved in this step.
|
2014-04-04 07:44:03 +04:00
|
|
|
'<(DEPTH)/tools/isolate_driver.py',
|
2013-10-31 17:34:31 +04:00
|
|
|
'<(DEPTH)/tools/swarming_client/isolate.py',
|
|
|
|
'<(DEPTH)/tools/swarming_client/run_isolated.py',
|
2012-10-20 08:16:31 +04:00
|
|
|
],
|
2014-09-09 11:20:13 +04:00
|
|
|
'outputs': [],
|
2013-12-03 22:15:11 +04:00
|
|
|
'action': [
|
|
|
|
'python',
|
2014-04-04 07:44:03 +04:00
|
|
|
'<(DEPTH)/tools/isolate_driver.py',
|
2013-12-03 22:15:11 +04:00
|
|
|
'<(test_isolation_mode)',
|
2014-09-09 11:20:13 +04:00
|
|
|
'--isolated', '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
|
2014-01-22 13:05:59 +04:00
|
|
|
'--isolate', '<(RULE_INPUT_PATH)',
|
|
|
|
|
2013-12-03 22:15:11 +04:00
|
|
|
# Variables should use the -V FOO=<(FOO) form so frequent values,
|
2014-01-22 13:05:59 +04:00
|
|
|
# like '0' or '1', aren't stripped out by GYP. Run 'isolate.py help' for
|
|
|
|
# more details.
|
|
|
|
|
|
|
|
# Path variables are used to replace file paths when loading a .isolate
|
|
|
|
# file
|
2014-06-12 18:29:01 +04:00
|
|
|
'--path-variable', 'DEPTH', '<(DEPTH)',
|
2013-12-16 17:53:20 +04:00
|
|
|
'--path-variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ',
|
2014-01-22 13:05:59 +04:00
|
|
|
|
|
|
|
# Extra variables are replaced on the 'command' entry and on paths in
|
|
|
|
# the .isolate file but are not considered relative paths.
|
|
|
|
'--extra-variable', 'version_full=<(version_full)',
|
|
|
|
|
2015-04-08 23:49:06 +03:00
|
|
|
# Note: This list must match DefaultConfigVariables()
|
|
|
|
# in build/android/pylib/utils/isolator.py
|
2014-07-08 16:46:13 +04:00
|
|
|
'--config-variable', 'CONFIGURATION_NAME=<(CONFIGURATION_NAME)',
|
2015-02-04 21:18:04 +03:00
|
|
|
'--config-variable', 'OS=<(OS)',
|
2014-09-24 22:01:01 +04:00
|
|
|
'--config-variable', 'asan=<(asan)',
|
2015-04-08 23:48:46 +03:00
|
|
|
'--config-variable', 'branding=<(branding)',
|
2014-01-31 03:20:25 +04:00
|
|
|
'--config-variable', 'chromeos=<(chromeos)',
|
2014-01-22 13:05:59 +04:00
|
|
|
'--config-variable', 'component=<(component)',
|
2015-02-04 21:18:04 +03:00
|
|
|
'--config-variable', 'disable_nacl=<(disable_nacl)',
|
2015-04-08 23:48:46 +03:00
|
|
|
'--config-variable', 'enable_pepper_cdms=<(enable_pepper_cdms)',
|
2015-04-04 00:47:18 +03:00
|
|
|
'--config-variable', 'enable_plugins=<(enable_plugins)',
|
2014-07-22 23:51:31 +04:00
|
|
|
'--config-variable', 'fastbuild=<(fastbuild)',
|
2015-02-04 21:18:04 +03:00
|
|
|
'--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
|
2014-01-08 01:40:22 +04:00
|
|
|
# TODO(kbr): move this to chrome_tests.gypi:gles2_conform_tests_run
|
|
|
|
# once support for user-defined config variables is added.
|
|
|
|
'--config-variable',
|
2014-01-22 13:05:59 +04:00
|
|
|
'internal_gles2_conform_tests=<(internal_gles2_conform_tests)',
|
2015-05-05 00:19:42 +03:00
|
|
|
'--config-variable', 'kasko=<(kasko)',
|
2014-02-11 01:14:46 +04:00
|
|
|
'--config-variable', 'libpeer_target_type=<(libpeer_target_type)',
|
2015-02-04 21:18:04 +03:00
|
|
|
'--config-variable', 'lsan=<(lsan)',
|
|
|
|
'--config-variable', 'msan=<(msan)',
|
2014-07-10 02:50:06 +04:00
|
|
|
'--config-variable', 'target_arch=<(target_arch)',
|
2015-02-04 21:18:04 +03:00
|
|
|
'--config-variable', 'tsan=<(tsan)',
|
|
|
|
'--config-variable', 'use_custom_libcxx=<(use_custom_libcxx)',
|
|
|
|
'--config-variable', 'use_instrumented_libraries=<(use_instrumented_libraries)',
|
2015-03-24 18:05:42 +03:00
|
|
|
'--config-variable',
|
|
|
|
'use_prebuilt_instrumented_libraries=<(use_prebuilt_instrumented_libraries)',
|
2015-02-04 21:18:04 +03:00
|
|
|
'--config-variable', 'use_openssl=<(use_openssl)',
|
2014-09-25 04:27:50 +04:00
|
|
|
'--config-variable', 'use_ozone=<(use_ozone)',
|
2015-03-10 21:01:07 +03:00
|
|
|
'--config-variable', 'use_x11=<(use_x11)',
|
2015-02-04 21:18:04 +03:00
|
|
|
'--config-variable', 'v8_use_external_startup_data=<(v8_use_external_startup_data)',
|
2013-12-03 22:15:11 +04:00
|
|
|
],
|
2013-03-11 20:32:27 +04:00
|
|
|
'conditions': [
|
2013-12-03 22:15:11 +04:00
|
|
|
# Note: When gyp merges lists, it appends them to the old value.
|
|
|
|
['OS=="mac"', {
|
2013-12-16 17:53:20 +04:00
|
|
|
'action': [
|
2015-05-23 04:37:56 +03:00
|
|
|
'--extra-variable', 'mac_product_name=<(mac_product_name)',
|
2013-12-16 17:53:20 +04:00
|
|
|
],
|
2013-12-03 22:15:11 +04:00
|
|
|
}],
|
2014-09-09 11:20:13 +04:00
|
|
|
["test_isolation_mode == 'prepare'", {
|
|
|
|
'outputs': [
|
|
|
|
'<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated.gen.json',
|
|
|
|
],
|
|
|
|
}, {
|
|
|
|
'outputs': [
|
|
|
|
'<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
|
|
|
|
],
|
|
|
|
}],
|
2013-03-11 20:32:27 +04:00
|
|
|
],
|
2012-10-20 08:16:31 +04:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|