diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi index d534d28d4..1207cc195 100644 --- a/webrtc/build/common.gypi +++ b/webrtc/build/common.gypi @@ -25,13 +25,11 @@ 'build_with_libjingle': 1, 'webrtc_root%': '<(DEPTH)/third_party/webrtc', 'apk_tests_path%': '<(DEPTH)/third_party/webrtc/build/apk_tests.gyp', - 'import_isolate_path%': '<(DEPTH)/third_party/webrtc/build/import_isolate_chromium.gyp', 'modules_java_gyp_path%': '<(DEPTH)/third_party/webrtc/modules/modules_java_chromium.gyp', }, { 'build_with_libjingle%': 0, 'webrtc_root%': '<(DEPTH)/webrtc', 'apk_tests_path%': '<(DEPTH)/webrtc/build/apk_test_noop.gyp', - 'import_isolate_path%': '<(DEPTH)/webrtc/build/import_isolate_webrtc.gyp', 'modules_java_gyp_path%': '<(DEPTH)/webrtc/modules/modules_java.gyp', }], ], @@ -40,7 +38,6 @@ 'build_with_libjingle%': '<(build_with_libjingle)', 'webrtc_root%': '<(webrtc_root)', 'apk_tests_path%': '<(apk_tests_path)', - 'import_isolate_path%': '<(import_isolate_path)', 'modules_java_gyp_path%': '<(modules_java_gyp_path)', 'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8', @@ -51,7 +48,6 @@ 'build_with_libjingle%': '<(build_with_libjingle)', 'webrtc_root%': '<(webrtc_root)', 'apk_tests_path%': '<(apk_tests_path)', - 'import_isolate_path%': '<(import_isolate_path)', 'modules_java_gyp_path%': '<(modules_java_gyp_path)', 'webrtc_vp8_dir%': '<(webrtc_vp8_dir)', 'include_opus%': '<(include_opus)', diff --git a/webrtc/build/import_isolate_chromium.gyp b/webrtc/build/import_isolate_chromium.gyp deleted file mode 100644 index 587f9959d..000000000 --- a/webrtc/build/import_isolate_chromium.gyp +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -# See webrtc/build/import_isolate_webrtc.gyp for information about this file. -{ - 'targets': [ - { - 'target_name': 'import_isolate_gypi', - 'type': 'none', - 'includes': [ - # Relative path to isolate.gypi when WebRTC is built from inside - # Chromium (i.e. the webrtc/ folder is checked out into third_party/). - '../../../build/apk_test.gypi', - ], - }, - ], -} diff --git a/webrtc/build/import_isolate_webrtc.gyp b/webrtc/build/import_isolate_webrtc.gyp deleted file mode 100644 index b585faeba..000000000 --- a/webrtc/build/import_isolate_webrtc.gyp +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -# This file exists so we can find the isolate.gypi both when WebRTC is built -# stand-alone and when built as a part of Chrome. -# This is needed since GYP does not support evaluating variables in the -# includes sections of a target, so we cannot use <(DEPTH) or <(webrtc_root). -{ - 'targets': [ - { - 'target_name': 'import_isolate_gypi', - 'type': 'none', - 'includes': [ - # Relative path to isolate.gypi when WebRTC built as a stand-alone - # project (i.e. Chromium's build/ folder is checked out into the root). - '../../build/isolate.gypi', - ], - }, - ], -} diff --git a/webrtc/build/isolate.gypi b/webrtc/build/isolate.gypi new file mode 100644 index 000000000..91b92a66e --- /dev/null +++ b/webrtc/build/isolate.gypi @@ -0,0 +1,117 @@ +# Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +# Copied from Chromium's src/build/isolate.gypi +# +# It was necessary to copy this file to WebRTC, because the path to +# build/common.gypi is different for the standalone and Chromium builds. Gyp +# doesn't permit conditional inclusion or variable expansion in include paths. +# http://code.google.com/p/gyp/wiki/InputFormatReference#Including_Other_Files + +# 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', +# 'foo_test.isolate', +# ], +# '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 + +{ + 'rules': [ + { + 'rule_name': 'isolate', + 'extension': 'isolate', + 'inputs': [ + # Files that are known to be involved in this step. + '<(DEPTH)/tools/swarm_client/isolate.py', + '<(DEPTH)/tools/swarm_client/run_isolated.py', + '<(DEPTH)/tools/swarm_client/googletest/run_test_cases.py', + + # Disable file tracking by the build driver for now. This means the + # project must have the proper build-time dependency for their runtime + # dependency. This improves the runtime of the build driver since it + # doesn't have to stat() all these files. + # + # More importantly, it means that even if a isolate_dependency_tracked + # file is missing, for example if a file was deleted and the .isolate + # file was not updated, that won't break the build, especially in the + # case where foo_tests_run is not built! This should be reenabled once + # the switch-over to running tests on Swarm is completed. + #'<@(isolate_dependency_tracked)', + ], + 'outputs': [ + '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', + ], + 'conditions': [ + ["test_isolation_outdir==''", { + 'action': [ + 'python', + '<(DEPTH)/tools/swarm_client/isolate.py', + '<(test_isolation_mode)', + # GYP will eliminate duplicate arguments so '<(PRODUCT_DIR)' cannot + # be provided twice. To work around this behavior, append '/'. + # + # Also have a space after <(PRODUCT_DIR) or visual studio will + # escape the argument wrappping " with the \ and merge it into + # the following arguments. + # + # Other variables should use the -V FOO=<(FOO) form so frequent + # values, like '0' or '1', aren't stripped out by GYP. + '--outdir', '<(PRODUCT_DIR)/ ', + '--variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ', + '--variable', 'OS=<(OS)', + '--result', '<@(_outputs)', + '--isolate', '<(RULE_INPUT_PATH)', + ], + }, { + 'action': [ + 'python', + '<(DEPTH)/tools/swarm_client/isolate.py', + '<(test_isolation_mode)', + '--outdir', '<(test_isolation_outdir)', + # See comment above. + '--variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ', + '--variable', 'OS=<(OS)', + '--result', '<@(_outputs)', + '--isolate', '<(RULE_INPUT_PATH)', + ], + }], + ['test_isolation_fail_on_missing == 0', { + 'action': ['--ignore_broken_items'], + }, + ], + ], + + 'msvs_cygwin_shell': 0, + }, + ], +} diff --git a/webrtc/common_audio/common_audio.gyp b/webrtc/common_audio/common_audio.gyp index 131868484..da52673c3 100644 --- a/webrtc/common_audio/common_audio.gyp +++ b/webrtc/common_audio/common_audio.gyp @@ -236,10 +236,10 @@ 'target_name': 'common_audio_unittests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'common_audio_unittests', ], 'includes': [ + '../build/isolate.gypi', 'common_audio_unittests.isolate', ], 'sources': [ diff --git a/webrtc/common_video/common_video.gyp b/webrtc/common_video/common_video.gyp index 2ba168101..f4d9ceb17 100644 --- a/webrtc/common_video/common_video.gyp +++ b/webrtc/common_video/common_video.gyp @@ -114,10 +114,10 @@ 'target_name': 'common_video_unittests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'common_video_unittests', ], 'includes': [ + '../build/isolate.gypi', 'common_video_unittests.isolate', ], 'sources': [ diff --git a/webrtc/modules/audio_coding/neteq/neteq.gypi b/webrtc/modules/audio_coding/neteq/neteq.gypi index 31297ffe6..930613738 100644 --- a/webrtc/modules/audio_coding/neteq/neteq.gypi +++ b/webrtc/modules/audio_coding/neteq/neteq.gypi @@ -251,10 +251,10 @@ 'target_name': 'neteq_unittests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'neteq_unittests', ], 'includes': [ + '../../../build/isolate.gypi', 'neteq_unittests.isolate', ], 'sources': [ diff --git a/webrtc/modules/audio_coding/neteq4/neteq.gypi b/webrtc/modules/audio_coding/neteq4/neteq.gypi index e98178dff..1a01a342d 100644 --- a/webrtc/modules/audio_coding/neteq4/neteq.gypi +++ b/webrtc/modules/audio_coding/neteq4/neteq.gypi @@ -200,10 +200,10 @@ 'target_name': 'audio_decoder_unittests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'audio_decoder_unittests', ], 'includes': [ + '../../../build/isolate.gypi', 'audio_decoder_unittests.isolate', ], 'sources': [ diff --git a/webrtc/modules/audio_device/audio_device.gypi b/webrtc/modules/audio_device/audio_device.gypi index a56c81d14..75fbf73cd 100644 --- a/webrtc/modules/audio_device/audio_device.gypi +++ b/webrtc/modules/audio_device/audio_device.gypi @@ -241,10 +241,10 @@ 'target_name': 'audio_device_tests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'audio_device_tests', ], 'includes': [ + '../../build/isolate.gypi', 'audio_device_tests.isolate', ], 'sources': [ diff --git a/webrtc/modules/modules.gyp b/webrtc/modules/modules.gyp index 38f937704..3a93624aa 100644 --- a/webrtc/modules/modules.gyp +++ b/webrtc/modules/modules.gyp @@ -349,10 +349,10 @@ 'target_name': 'modules_tests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'modules_tests', ], 'includes': [ + '../build/isolate.gypi', 'modules_tests.isolate', ], 'sources': [ @@ -363,10 +363,10 @@ 'target_name': 'modules_unittests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'modules_unittests', ], 'includes': [ + '../build/isolate.gypi', 'modules_unittests.isolate', ], 'sources': [ diff --git a/webrtc/modules/video_capture/video_capture.gypi b/webrtc/modules/video_capture/video_capture.gypi index 1e392609b..ea6d04bb4 100644 --- a/webrtc/modules/video_capture/video_capture.gypi +++ b/webrtc/modules/video_capture/video_capture.gypi @@ -185,10 +185,10 @@ 'target_name': 'video_capture_tests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'video_capture_tests', ], 'includes': [ + '../../build/isolate.gypi', 'video_capture_tests.isolate', ], 'sources': [ diff --git a/webrtc/modules/video_render/video_render.gypi b/webrtc/modules/video_render/video_render.gypi index f8662c307..4f3844406 100644 --- a/webrtc/modules/video_render/video_render.gypi +++ b/webrtc/modules/video_render/video_render.gypi @@ -228,10 +228,10 @@ 'target_name': 'video_render_tests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'video_render_tests', ], 'includes': [ + '../../build/isolate.gypi', 'video_render_tests.isolate', ], 'sources': [ diff --git a/webrtc/system_wrappers/source/system_wrappers_tests.gyp b/webrtc/system_wrappers/source/system_wrappers_tests.gyp index 36c47d23b..b8587eb90 100644 --- a/webrtc/system_wrappers/source/system_wrappers_tests.gyp +++ b/webrtc/system_wrappers/source/system_wrappers_tests.gyp @@ -79,10 +79,10 @@ 'target_name': 'system_wrappers_unittests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'system_wrappers_unittests', ], 'includes': [ + '../../build/isolate.gypi', 'system_wrappers_unittests.isolate', ], 'sources': [ diff --git a/webrtc/test/metrics.gyp b/webrtc/test/metrics.gyp index 1a2714e73..3d61b6c0f 100644 --- a/webrtc/test/metrics.gyp +++ b/webrtc/test/metrics.gyp @@ -70,10 +70,10 @@ 'target_name': 'metrics_unittests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'metrics_unittests', ], 'includes': [ + '../build/isolate.gypi', 'metrics_unittests.isolate', ], 'sources': [ diff --git a/webrtc/test/test.gyp b/webrtc/test/test.gyp index 4e01b25d7..3991106d2 100644 --- a/webrtc/test/test.gyp +++ b/webrtc/test/test.gyp @@ -208,10 +208,10 @@ 'target_name': 'test_support_unittests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'test_support_unittests', ], 'includes': [ + '../build/isolate.gypi', 'test_support_unittests.isolate', ], 'sources': [ diff --git a/webrtc/tools/tools.gyp b/webrtc/tools/tools.gyp index 655181bed..fa790469d 100644 --- a/webrtc/tools/tools.gyp +++ b/webrtc/tools/tools.gyp @@ -150,10 +150,10 @@ 'target_name': 'tools_unittests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'tools_unittests', ], 'includes': [ + '../build/isolate.gypi', 'tools_unittests.isolate', ], 'sources': [ diff --git a/webrtc/video_engine/test/auto_test/vie_auto_test.gypi b/webrtc/video_engine/test/auto_test/vie_auto_test.gypi index 1c226b849..0a9250c19 100644 --- a/webrtc/video_engine/test/auto_test/vie_auto_test.gypi +++ b/webrtc/video_engine/test/auto_test/vie_auto_test.gypi @@ -133,10 +133,10 @@ 'target_name': 'vie_auto_test_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'vie_auto_test', ], 'includes': [ + '../../../build/isolate.gypi', 'vie_auto_test.isolate', ], 'sources': [ diff --git a/webrtc/video_engine/video_engine_core.gypi b/webrtc/video_engine/video_engine_core.gypi index b68347481..8bae1fd7f 100644 --- a/webrtc/video_engine/video_engine_core.gypi +++ b/webrtc/video_engine/video_engine_core.gypi @@ -185,10 +185,10 @@ 'target_name': 'video_engine_core_unittests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'video_engine_core_unittests', ], 'includes': [ + '../build/isolate.gypi', 'video_engine_core_unittests.isolate', ], 'sources': [ diff --git a/webrtc/voice_engine/voice_engine.gyp b/webrtc/voice_engine/voice_engine.gyp index 34070fabd..5e0007784 100644 --- a/webrtc/voice_engine/voice_engine.gyp +++ b/webrtc/voice_engine/voice_engine.gyp @@ -303,10 +303,10 @@ 'target_name': 'voice_engine_unittests_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'voice_engine_unittests', ], 'includes': [ + '../build/isolate.gypi', 'voice_engine_unittests.isolate', ], 'sources': [ @@ -317,10 +317,10 @@ 'target_name': 'voe_auto_test_run', 'type': 'none', 'dependencies': [ - '<(import_isolate_path):import_isolate_gypi', 'voe_auto_test', ], 'includes': [ + '../build/isolate.gypi', 'voe_auto_test.isolate', ], 'sources': [