blob: 085ed5d31b25c62b3402d8a7b0b44b26f56417e8 [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001# Copyright 2015 the V8 project authors. All rights reserved.
2# Copyright (c) 2012 The Chromium Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6# This file is meant to be included into a target to provide a rule
7# to "build" .isolate files into a .isolated file.
8#
9# To use this, create a gyp target with the following form:
10# 'conditions': [
11# ['test_isolation_mode != "noop"', {
12# 'targets': [
13# {
14# 'target_name': 'foo_test_run',
15# 'type': 'none',
16# 'dependencies': [
17# 'foo_test',
18# ],
19# 'includes': [
Ben Murdochc5610432016-08-08 18:44:38 +010020# '../gypfiles/isolate.gypi',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000021# ],
22# 'sources': [
23# 'foo_test.isolate',
24# ],
25# },
26# ],
27# }],
28# ],
29#
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.
33#
34# The generated .isolated file will be:
35# <(PRODUCT_DIR)/foo_test.isolated
36#
37# See http://dev.chromium.org/developers/testing/isolated-testing/for-swes
38# for more information.
39
40{
41 'rules': [
42 {
43 'rule_name': 'isolate',
44 'extension': 'isolate',
45 'inputs': [
46 # Files that are known to be involved in this step.
47 '<(DEPTH)/tools/isolate_driver.py',
48 '<(DEPTH)/tools/swarming_client/isolate.py',
49 '<(DEPTH)/tools/swarming_client/run_isolated.py',
50 ],
51 'outputs': [
52 '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
53 ],
54 'action': [
55 'python',
56 '<(DEPTH)/tools/isolate_driver.py',
57 '<(test_isolation_mode)',
58 '--isolated', '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
59 '--isolate', '<(RULE_INPUT_PATH)',
60
61 # Variables should use the -V FOO=<(FOO) form so frequent values,
62 # like '0' or '1', aren't stripped out by GYP. Run 'isolate.py help'
63 # for more details.
64
65 # Path variables are used to replace file paths when loading a .isolate
66 # file
67 '--path-variable', 'DEPTH', '<(DEPTH)',
68 '--path-variable', 'PRODUCT_DIR', '<(PRODUCT_DIR)',
69
70 '--config-variable', 'CONFIGURATION_NAME=<(CONFIGURATION_NAME)',
71 '--config-variable', 'OS=<(OS)',
72 '--config-variable', 'asan=<(asan)',
73 '--config-variable', 'cfi_vptr=<(cfi_vptr)',
Ben Murdoch097c5b22016-05-18 11:27:45 +010074 '--config-variable', 'gcmole=<(gcmole)',
75 '--config-variable', 'has_valgrind=<(has_valgrind)',
Ben Murdoch61f157c2016-09-16 13:49:30 +010076 '--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000077 '--config-variable', 'msan=<(msan)',
78 '--config-variable', 'tsan=<(tsan)',
Ben Murdochda12d292016-06-02 14:46:10 +010079 '--config-variable', 'coverage=<(coverage)',
80 '--config-variable', 'sanitizer_coverage=<(sanitizer_coverage)',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000081 '--config-variable', 'component=<(component)',
82 '--config-variable', 'target_arch=<(target_arch)',
83 '--config-variable', 'use_custom_libcxx=<(use_custom_libcxx)',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000084 '--config-variable', 'v8_use_external_startup_data=<(v8_use_external_startup_data)',
85 '--config-variable', 'v8_use_snapshot=<(v8_use_snapshot)',
86 ],
87 'conditions': [
88 ['OS=="win"', {
89 'action': [
90 '--config-variable', 'msvs_version=2013',
91 ],
92 }, {
93 'action': [
94 '--config-variable', 'msvs_version=0',
95 ],
96 }],
97 ],
98 },
99 ],
100}