Update isolate.gypi files + link to isolate_driver.py

This updates the isolate.gypi copies we're forced to
maintain in our code repo to Chromium revision c264a05.

Since isolated testing is now using a new launch script
in tools: isolate_driver.py, that is added to our links
script.

BUG=395700
TESTED=Ran one of our tests with:
ninja -C out/Release tools_unittests_run
tools/isolate_driver.py run --isolated out/Release/tools_unittests.isolated --isolate webrtc/tools/tools_unittests.isolate

R=henrika@webrtc.org, jam@chromium.org

Review URL: https://webrtc-codereview.appspot.com/26649004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7327 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 1d82318..c315717 100755
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -186,6 +186,7 @@
                   r'^tools/clang/.*\.py$',
                   r'^tools/gn/.*\.py$',
                   r'^tools/gyp/.*\.py$',
+                  r'^tools/isolate_driver.py$',
                   r'^tools/perf_expectations/.*\.py$',
                   r'^tools/protoc_wrapper/.*\.py$',
                   r'^tools/python/.*\.py$',
diff --git a/setup_links.py b/setup_links.py
index c403ca8..6682975 100755
--- a/setup_links.py
+++ b/setup_links.py
@@ -85,6 +85,7 @@
 FILES = {
   '.gn': None,
   'tools/find_depot_tools.py': None,
+  'tools/isolate_driver.py': None,
   'third_party/BUILD.gn': None,
 }
 
diff --git a/talk/build/isolate.gypi b/talk/build/isolate.gypi
index 24f7ea1..6d96e01 100644
--- a/talk/build/isolate.gypi
+++ b/talk/build/isolate.gypi
@@ -27,15 +27,16 @@
 
 # Copied from Chromium's src/build/isolate.gypi
 #
-# It was necessary to copy this file to libjingle , 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.
+# It was necessary to copy this file 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
 #
 # Local modifications:
 # * Removed include of '../chrome/version.gypi'.
-# * Removal passing of version_full variable created in version.gypi:
+# * Removed passing of version_full variable created in version.gypi:
 #   '--extra-variable', 'version_full=<(version_full)',
+# * Removed condition for test_isolation_fail_on_missing == 0
 
 # This file is meant to be included into a target to provide a rule
 # to "build" .isolate files into a .isolated file.
@@ -79,6 +80,7 @@
       'extension': 'isolate',
       'inputs': [
         # Files that are known to be involved in this step.
+        '<(DEPTH)/tools/isolate_driver.py',
         '<(DEPTH)/tools/swarming_client/isolate.py',
         '<(DEPTH)/tools/swarming_client/run_isolated.py',
 
@@ -94,14 +96,12 @@
         # the switch-over to running tests on Swarm is completed.
         #'<@(isolate_dependency_tracked)',
       ],
-      'outputs': [
-        '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
-      ],
+      'outputs': [],
       'action': [
         'python',
-        '<(DEPTH)/tools/swarming_client/isolate.py',
+        '<(DEPTH)/tools/isolate_driver.py',
         '<(test_isolation_mode)',
-        '--result', '<@(_outputs)',
+        '--isolated', '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
         '--isolate', '<(RULE_INPUT_PATH)',
 
         # Variables should use the -V FOO=<(FOO) form so frequent values,
@@ -117,14 +117,20 @@
         '--path-variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ',
 
         '--config-variable', 'OS=<(OS)',
+        '--config-variable', 'CONFIGURATION_NAME=<(CONFIGURATION_NAME)',
+        '--config-variable', 'asan=<(asan)',
         '--config-variable', 'chromeos=<(chromeos)',
         '--config-variable', 'component=<(component)',
+        '--config-variable', 'fastbuild=<(fastbuild)',
         # TODO(kbr): move this to chrome_tests.gypi:gles2_conform_tests_run
         # once support for user-defined config variables is added.
         '--config-variable',
           'internal_gles2_conform_tests=<(internal_gles2_conform_tests)',
         '--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
+        '--config-variable', 'libpeer_target_type=<(libpeer_target_type)',
         '--config-variable', 'use_openssl=<(use_openssl)',
+        '--config-variable', 'target_arch=<(target_arch)',
+        '--config-variable', 'use_ozone=<(use_ozone)',
       ],
       'conditions': [
         # Note: When gyp merges lists, it appends them to the old value.
@@ -138,8 +144,14 @@
         ["test_isolation_outdir!=''", {
           'action': [ '--isolate-server', '<(test_isolation_outdir)' ],
         }],
-        ['test_isolation_fail_on_missing == 0', {
-          'action': ['--ignore_broken_items'],
+        ["test_isolation_mode == 'prepare'", {
+          'outputs': [
+            '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated.gen.json',
+          ],
+        }, {
+          'outputs': [
+            '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
+          ],
         }],
       ],
     },
diff --git a/webrtc/build/isolate.gypi b/webrtc/build/isolate.gypi
index ce90575..56c23e2 100644
--- a/webrtc/build/isolate.gypi
+++ b/webrtc/build/isolate.gypi
@@ -8,15 +8,16 @@
 
 # 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.
+# It was necessary to copy this file 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
 #
 # Local modifications:
 # * Removed include of '../chrome/version.gypi'.
-# * Removal passing of version_full variable created in version.gypi:
+# * Removed passing of version_full variable created in version.gypi:
 #   '--extra-variable', 'version_full=<(version_full)',
+# * Removed condition for test_isolation_fail_on_missing == 0
 
 # This file is meant to be included into a target to provide a rule
 # to "build" .isolate files into a .isolated file.
@@ -60,6 +61,7 @@
       'extension': 'isolate',
       'inputs': [
         # Files that are known to be involved in this step.
+        '<(DEPTH)/tools/isolate_driver.py',
         '<(DEPTH)/tools/swarming_client/isolate.py',
         '<(DEPTH)/tools/swarming_client/run_isolated.py',
 
@@ -75,14 +77,12 @@
         # the switch-over to running tests on Swarm is completed.
         #'<@(isolate_dependency_tracked)',
       ],
-      'outputs': [
-        '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
-      ],
+      'outputs': [],
       'action': [
         'python',
-        '<(DEPTH)/tools/swarming_client/isolate.py',
+        '<(DEPTH)/tools/isolate_driver.py',
         '<(test_isolation_mode)',
-        '--result', '<@(_outputs)',
+        '--isolated', '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
         '--isolate', '<(RULE_INPUT_PATH)',
 
         # Variables should use the -V FOO=<(FOO) form so frequent values,
@@ -98,14 +98,20 @@
         '--path-variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ',
 
         '--config-variable', 'OS=<(OS)',
+        '--config-variable', 'CONFIGURATION_NAME=<(CONFIGURATION_NAME)',
+        '--config-variable', 'asan=<(asan)',
         '--config-variable', 'chromeos=<(chromeos)',
         '--config-variable', 'component=<(component)',
+        '--config-variable', 'fastbuild=<(fastbuild)',
         # TODO(kbr): move this to chrome_tests.gypi:gles2_conform_tests_run
         # once support for user-defined config variables is added.
         '--config-variable',
           'internal_gles2_conform_tests=<(internal_gles2_conform_tests)',
         '--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
+        '--config-variable', 'libpeer_target_type=<(libpeer_target_type)',
         '--config-variable', 'use_openssl=<(use_openssl)',
+        '--config-variable', 'target_arch=<(target_arch)',
+        '--config-variable', 'use_ozone=<(use_ozone)',
       ],
       'conditions': [
         # Note: When gyp merges lists, it appends them to the old value.
@@ -119,8 +125,14 @@
         ["test_isolation_outdir!=''", {
           'action': [ '--isolate-server', '<(test_isolation_outdir)' ],
         }],
-        ['test_isolation_fail_on_missing == 0', {
-          'action': ['--ignore_broken_items'],
+        ["test_isolation_mode == 'prepare'", {
+          'outputs': [
+            '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated.gen.json',
+          ],
+        }, {
+          'outputs': [
+            '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
+          ],
         }],
       ],
     },