Isolate GYP target and .isolate files for tests

Implemented according to the instructions at
http://www.chromium.org/developers/testing/isolated-testing

Workflow has been like this:
1. create _run GYP target
2. create a stripped down .isolate file
3. export GYP_DEFINES="$GYP_DEFINES test_isolation_mode=check"
4. runhooks
5. compile
6. test if the test would run (i.e. find it's dependencies) without
   actually executing it:
   tools/swarm_client/isolate.py run --isolated out/Release/testname.isolated
7. If failing, run the fix_test_cases.py script like this:
   tools/swarm_client/fix_test_cases.py --isolated out/Release/testname.isolated

All tests that run on the bots for WebRTC has got _run target
and .isolate file created.

"Normal tests" that run fine on any machine:
* audio_decoder_unittests
* common_audio_unittests
* common_video_unittests
* metrics_unittests
* modules_integrationtests
* modules_unittests
* neteq_unittests
* system_wrappers_unittests
* test_support_unittests
* tools_unittests
* video_engine_core_unittests
* voice_engine_unittests

Tests that requires bare-metal and audio/video devices:
* audio_device_integrationtests
* video_capture_integrationtests

I also added the isolate boilerplate code for the following
tests that are not yet pure gtest binaries (which means they
cannot run isolated yet):
* video_render_integrationtests
* vie_auto_test
* voe_auto_test

TEST=running isolate.py as described above.
BUG=1916
R=tommi@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@4547 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/common_audio/common_audio.gyp b/common_audio/common_audio.gyp
index 7955d23..ee43fa9 100644
--- a/common_audio/common_audio.gyp
+++ b/common_audio/common_audio.gyp
@@ -219,7 +219,25 @@
             },
           ],
         }],
-      ]
+        ['test_isolation_mode != "noop"', {
+          'targets': [
+            {
+              'target_name': 'common_audio_unittests_run',
+              'type': 'none',
+              'dependencies': [
+                'common_audio_unittests',
+              ],
+              'includes': [
+                '../../build/isolate.gypi',
+                'common_audio_unittests.isolate',
+              ],
+              'sources': [
+                'common_audio_unittests.isolate',
+              ],
+            },
+          ],
+        }],
+      ],
     }],
   ],  # conditions
 }
diff --git a/common_audio/common_audio_unittests.isolate b/common_audio/common_audio_unittests.isolate
new file mode 100644
index 0000000..7eedcd7
--- /dev/null
+++ b/common_audio/common_audio_unittests.isolate
@@ -0,0 +1,27 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/common_audio_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/run_isolated.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/common_audio_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/common_video/common_video.gyp b/common_video/common_video.gyp
index 554333c..e027cfd 100644
--- a/common_video/common_video.gyp
+++ b/common_video/common_video.gyp
@@ -122,6 +122,24 @@
             },
           ],
         }],
+        ['test_isolation_mode != "noop"', {
+          'targets': [
+            {
+              'target_name': 'common_video_unittests_run',
+              'type': 'none',
+              'dependencies': [
+                'common_video_unittests',
+              ],
+              'includes': [
+                '../../build/isolate.gypi',
+                'common_video_unittests.isolate',
+              ],
+              'sources': [
+                'common_video_unittests.isolate',
+              ],
+            },
+          ],
+        }],
       ],
     }],  # include_tests
   ],
diff --git a/common_video/common_video_unittests.isolate b/common_video/common_video_unittests.isolate
new file mode 100644
index 0000000..f173ff7
--- /dev/null
+++ b/common_video/common_video_unittests.isolate
@@ -0,0 +1,29 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/common_video_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../DEPS',
+          '../../resources/foreman_cif.yuv',
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../tools/swarm_client/run_isolated.py',
+          '../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/common_video_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/modules/audio_coding/neteq/neteq.gypi b/modules/audio_coding/neteq/neteq.gypi
index 9a460c4..570ebc2 100644
--- a/modules/audio_coding/neteq/neteq.gypi
+++ b/modules/audio_coding/neteq/neteq.gypi
@@ -231,6 +231,24 @@
             },
           ],
         }],
+        ['test_isolation_mode != "noop"', {
+          'targets': [
+            {
+              'target_name': 'neteq_unittests_run',
+              'type': 'none',
+              'dependencies': [
+                'neteq_unittests',
+              ],
+              'includes': [
+                '../../../../build/isolate.gypi',
+                'neteq_unittests.isolate',
+              ],
+              'sources': [
+                'neteq_unittests.isolate',
+              ],
+            },
+          ],
+        }],
       ],
     }], # include_tests
   ], # conditions
diff --git a/modules/audio_coding/neteq/neteq_unittests.isolate b/modules/audio_coding/neteq/neteq_unittests.isolate
new file mode 100644
index 0000000..a2c0613
--- /dev/null
+++ b/modules/audio_coding/neteq/neteq_unittests.isolate
@@ -0,0 +1,35 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../../../testing/test_env.py',
+          '../../../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/neteq_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_touched': [
+          '../../../../DEPS',
+        ],
+        'isolate_dependency_tracked': [
+          '../../../../resources/audio_coding/neteq_network_stats.dat',
+          '../../../../resources/audio_coding/neteq_rtcp_stats.dat',
+          '../../../../resources/audio_coding/neteq_universal.rtp',
+          '../../../../resources/audio_coding/neteq_universal_ref.pcm',
+          '../../../../resources/audio_coding/testfile32kHz.pcm',
+          '../../../../testing/test_env.py',
+          '../../../../tools/swarm_client/run_isolated.py',
+          '../../../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/neteq_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/modules/audio_coding/neteq4/audio_decoder_unittests.isolate b/modules/audio_coding/neteq4/audio_decoder_unittests.isolate
new file mode 100644
index 0000000..33c4a4b
--- /dev/null
+++ b/modules/audio_coding/neteq4/audio_decoder_unittests.isolate
@@ -0,0 +1,31 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../../../testing/test_env.py',
+          '../../../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/audio_decoder_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_touched': [
+          '../../../../DEPS',
+        ],
+        'isolate_dependency_tracked': [
+          '../../../../resources/audio_coding/testfile32kHz.pcm',
+          '../../../../testing/test_env.py',
+          '../../../../tools/swarm_client/run_isolated.py',
+          '../../../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/audio_decoder_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/modules/audio_coding/neteq4/neteq.gypi b/modules/audio_coding/neteq4/neteq.gypi
index ad6787c..a4ff143 100644
--- a/modules/audio_coding/neteq4/neteq.gypi
+++ b/modules/audio_coding/neteq4/neteq.gypi
@@ -204,6 +204,24 @@
             },
           ],
         }],
+        ['test_isolation_mode != "noop"', {
+          'targets': [
+            {
+              'target_name': 'audio_decoder_unittests_run',
+              'type': 'none',
+              'dependencies': [
+                'audio_decoder_unittests',
+              ],
+              'includes': [
+                '../../../../build/isolate.gypi',
+                'audio_decoder_unittests.isolate',
+              ],
+              'sources': [
+                'audio_decoder_unittests.isolate',
+              ],
+            },
+          ],
+        }],
       ],
     }], # include_tests
   ], # conditions
diff --git a/modules/audio_device/audio_device.gypi b/modules/audio_device/audio_device.gypi
index a2463f6..df1daec 100644
--- a/modules/audio_device/audio_device.gypi
+++ b/modules/audio_device/audio_device.gypi
@@ -219,8 +219,28 @@
             'test/func_test_manager.h',
           ],
         },
+      ], # targets
+      'conditions': [
+        ['test_isolation_mode != "noop"', {
+          'targets': [
+            {
+              'target_name': 'audio_device_integrationtests_run',
+              'type': 'none',
+              'dependencies': [
+                'audio_device_integrationtests',
+              ],
+              'includes': [
+                '../../../build/isolate.gypi',
+                'audio_device_integrationtests.isolate',
+              ],
+              'sources': [
+                'audio_device_integrationtests.isolate',
+              ],
+            },
+          ],
+        }],
       ],
-    }],
+    }], # include_tests
   ],
 }
 
diff --git a/modules/audio_device/audio_device_integrationtests.isolate b/modules/audio_device/audio_device_integrationtests.isolate
new file mode 100644
index 0000000..a55f095
--- /dev/null
+++ b/modules/audio_device/audio_device_integrationtests.isolate
@@ -0,0 +1,27 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/audio_device_integrationtests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/run_isolated.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/audio_device_integrationtests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/modules/audio_device/audio_device_test_api.isolate b/modules/audio_device/audio_device_test_api.isolate
new file mode 100644
index 0000000..ec04929
--- /dev/null
+++ b/modules/audio_device/audio_device_test_api.isolate
@@ -0,0 +1,27 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/audio_device_test_api<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/run_isolated.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/audio_device_test_api<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/modules/modules.gyp b/modules/modules.gyp
index 5f66103..748b6c8 100644
--- a/modules/modules.gyp
+++ b/modules/modules.gyp
@@ -335,6 +335,38 @@
             },
           ],
         }],
+        ['test_isolation_mode != "noop"', {
+          'targets': [
+            {
+              'target_name': 'modules_integrationtests_run',
+              'type': 'none',
+              'dependencies': [
+                'modules_integrationtests',
+              ],
+              'includes': [
+                '../../build/isolate.gypi',
+                'modules_integrationtests.isolate',
+              ],
+              'sources': [
+                'modules_integrationtests.isolate',
+              ],
+            },
+            {
+              'target_name': 'modules_unittests_run',
+              'type': 'none',
+              'dependencies': [
+                'modules_unittests',
+              ],
+              'includes': [
+                '../../build/isolate.gypi',
+                'modules_unittests.isolate',
+              ],
+              'sources': [
+                'modules_unittests.isolate',
+              ],
+            },
+          ],
+        }],
       ],
     }], # include_tests
   ], # conditions
diff --git a/modules/modules_integrationtests.isolate b/modules/modules_integrationtests.isolate
new file mode 100644
index 0000000..9283927
--- /dev/null
+++ b/modules/modules_integrationtests.isolate
@@ -0,0 +1,32 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/modules_integrationtests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../DEPS',
+          '../../resources/audio_coding/testfile32kHz.pcm',
+          '../../resources/audio_coding/teststereo32kHz.pcm',
+          '../../resources/foreman_cif.yuv',
+          '../../resources/paris_qcif.yuv',
+           '../../testing/test_env.py',
+          '../../tools/swarm_client/run_isolated.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/modules_integrationtests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/modules/modules_unittests.isolate b/modules/modules_unittests.isolate
index cfe2943..353c24e 100644
--- a/modules/modules_unittests.isolate
+++ b/modules/modules_unittests.isolate
@@ -15,5 +15,43 @@
         ],
       },
     }],
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/modules_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../data/voice_engine/audio_tiny48.wav',
+          '../../DEPS',
+          '../../resources/audio_coding/neteq_network_stats.dat',
+          '../../resources/audio_coding/neteq_rtcp_stats.dat',
+          '../../resources/audio_coding/neteq_universal_new.rtp',
+          '../../resources/audio_coding/neteq_universal_ref.pcm',
+          '../../resources/audio_coding/testfile32kHz.pcm',
+          '../../resources/deflicker_before_cif_short.yuv',
+          '../../resources/far16_stereo.pcm',
+          '../../resources/far32_stereo.pcm',
+          '../../resources/far8_stereo.pcm',
+          '../../resources/foremanColorEnhanced_cif_short.yuv',
+          '../../resources/foreman_cif.yuv',
+          '../../resources/foreman_cif_short.yuv',
+          '../../resources/near16_stereo.pcm',
+          '../../resources/near32_stereo.pcm',
+          '../../resources/near8_stereo.pcm',
+          '../../resources/video_coding/frame-ethernet-ii.pcap',
+          '../../resources/video_coding/frame-loopback.pcap',
+          '../../resources/video_coding/pltype103.rtp',
+          '../../resources/video_coding/ssrcs-2.pcap',
+          '../../resources/video_coding/ssrcs-3.pcap',
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/run_isolated.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/modules_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
   ],
-}
\ No newline at end of file
+}
diff --git a/modules/video_capture/video_capture.gypi b/modules/video_capture/video_capture.gypi
index 05f078b..b91d029 100644
--- a/modules/video_capture/video_capture.gypi
+++ b/modules/video_capture/video_capture.gypi
@@ -187,6 +187,26 @@
             }], # OS!="mac"
           ] # conditions
         },
+      ], # targets
+      'conditions': [
+        ['test_isolation_mode != "noop"', {
+          'targets': [
+            {
+              'target_name': 'video_capture_integrationtests_run',
+              'type': 'none',
+              'dependencies': [
+                'video_capture_integrationtests',
+              ],
+              'includes': [
+                '../../../build/isolate.gypi',
+                'video_capture_integrationtests.isolate',
+              ],
+              'sources': [
+                'video_capture_integrationtests.isolate',
+              ],
+            },
+          ],
+        }],
       ],
     }],
   ],
diff --git a/modules/video_capture/video_capture_integrationtests.isolate b/modules/video_capture/video_capture_integrationtests.isolate
new file mode 100644
index 0000000..be85ffb
--- /dev/null
+++ b/modules/video_capture/video_capture_integrationtests.isolate
@@ -0,0 +1,27 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/video_capture_integrationtests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/run_isolated.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/video_capture_integrationtests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/modules/video_capture/video_capture_module_test.isolate b/modules/video_capture/video_capture_module_test.isolate
new file mode 100644
index 0000000..1c3a4b5
--- /dev/null
+++ b/modules/video_capture/video_capture_module_test.isolate
@@ -0,0 +1,27 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/vp8_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/run_isolated.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/vp8_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/modules/video_render/video_render.gypi b/modules/video_render/video_render.gypi
index 9f6d486..77efd3b 100644
--- a/modules/video_render/video_render.gypi
+++ b/modules/video_render/video_render.gypi
@@ -200,6 +200,26 @@
           ] # conditions
         }, # video_render_module_test
       ], # targets
+      'conditions': [
+        ['test_isolation_mode != "noop"', {
+          'targets': [
+            {
+              'target_name': 'video_render_integrationtests_run',
+              'type': 'none',
+              'dependencies': [
+                'video_render_integrationtests',
+              ],
+              'includes': [
+                '../../../build/isolate.gypi',
+                'video_render_integrationtests.isolate',
+              ],
+              'sources': [
+                'video_render_integrationtests.isolate',
+              ],
+            },
+          ],
+        }],
+      ],
     }], # include_tests==0
   ], # conditions
 }
diff --git a/modules/video_render/video_render_integrationtests.isolate b/modules/video_render/video_render_integrationtests.isolate
new file mode 100644
index 0000000..83f609f
--- /dev/null
+++ b/modules/video_render/video_render_integrationtests.isolate
@@ -0,0 +1,27 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/video_render_integrationtests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/run_isolated.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/video_render_integrationtests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/modules/video_render/video_render_module_test.isolate b/modules/video_render/video_render_module_test.isolate
new file mode 100644
index 0000000..6157b6d
--- /dev/null
+++ b/modules/video_render/video_render_module_test.isolate
@@ -0,0 +1,27 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/video_render_module_test<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/run_isolated.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/video_render_module_test<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/system_wrappers/source/system_wrappers_tests.gyp b/system_wrappers/source/system_wrappers_tests.gyp
index a24b874..613bbee 100644
--- a/system_wrappers/source/system_wrappers_tests.gyp
+++ b/system_wrappers/source/system_wrappers_tests.gyp
@@ -73,6 +73,24 @@
         },
       ],
     }],
+    ['test_isolation_mode != "noop"', {
+      'targets': [
+        {
+          'target_name': 'system_wrappers_unittests_run',
+          'type': 'none',
+          'dependencies': [
+            'system_wrappers_unittests',
+          ],
+          'includes': [
+            '../../../build/isolate.gypi',
+            'system_wrappers_unittests.isolate',
+          ],
+          'sources': [
+            'system_wrappers_unittests.isolate',
+          ],
+        },
+      ],
+    }],
   ],
 }
 
diff --git a/system_wrappers/source/system_wrappers_unittests.isolate b/system_wrappers/source/system_wrappers_unittests.isolate
new file mode 100644
index 0000000..84672c7
--- /dev/null
+++ b/system_wrappers/source/system_wrappers_unittests.isolate
@@ -0,0 +1,27 @@
+# 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.
+
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/system_wrappers_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../../testing/test_env.py',
+          '../../../tools/swarm_client/run_isolated.py',
+          '../../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/system_wrappers_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/test/metrics.gyp b/test/metrics.gyp
index 0f0774a..05367a9 100644
--- a/test/metrics.gyp
+++ b/test/metrics.gyp
@@ -52,7 +52,7 @@
         }],
       ],
     },
-  ],
+  ], # targets
   'conditions': [
     # TODO(henrike): remove build_with_chromium==1 when the bots are using
     # Chromium's buildbots.
@@ -67,5 +67,23 @@
         },
       ],
     }],
+    ['test_isolation_mode != "noop"', {
+      'targets': [
+        {
+          'target_name': 'metrics_unittests_run',
+          'type': 'none',
+          'dependencies': [
+            'metrics_unittests',
+          ],
+          'includes': [
+            '../../build/isolate.gypi',
+            'metrics_unittests.isolate',
+          ],
+          'sources': [
+            'metrics_unittests.isolate',
+          ],
+        },
+      ],
+    }],
   ],
 }
diff --git a/test/metrics_unittests.isolate b/test/metrics_unittests.isolate
new file mode 100644
index 0000000..5254df0
--- /dev/null
+++ b/test/metrics_unittests.isolate
@@ -0,0 +1,29 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/metrics_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../DEPS',
+          '../../resources/foreman_cif_short.yuv',
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/run_isolated.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/metrics_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/test/test.gyp b/test/test.gyp
index f49e313..ad5d4d3 100644
--- a/test/test.gyp
+++ b/test/test.gyp
@@ -201,5 +201,23 @@
         },
       ],
     }],
+    ['test_isolation_mode != "noop"', {
+      'targets': [
+        {
+          'target_name': 'test_support_unittests_run',
+          'type': 'none',
+          'dependencies': [
+            'test_support_unittests',
+          ],
+          'includes': [
+            '../../build/isolate.gypi',
+            'test_support_unittests.isolate',
+          ],
+          'sources': [
+            'test_support_unittests.isolate',
+          ],
+        },
+      ],
+    }],
   ],
 }
diff --git a/test/test_support_unittests.isolate b/test/test_support_unittests.isolate
new file mode 100644
index 0000000..d60dce4
--- /dev/null
+++ b/test/test_support_unittests.isolate
@@ -0,0 +1,28 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/test_support_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../DEPS',
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/run_isolated.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/test_support_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/tools/tools.gyp b/tools/tools.gyp
index b7e6ac0..d5d7d0f 100644
--- a/tools/tools.gyp
+++ b/tools/tools.gyp
@@ -150,6 +150,24 @@
             },
           ],
         }],
+        ['test_isolation_mode != "noop"', {
+          'targets': [
+            {
+              'target_name': 'tools_unittests_run',
+              'type': 'none',
+              'dependencies': [
+                'tools_unittests',
+              ],
+              'includes': [
+                '../../build/isolate.gypi',
+                'tools_unittests.isolate',
+              ],
+              'sources': [
+                'tools_unittests.isolate',
+              ],
+            },
+          ],
+        }],
       ],
     }], # include_tests
   ], # conditions
diff --git a/tools/tools_unittests.isolate b/tools/tools_unittests.isolate
new file mode 100644
index 0000000..60c2231
--- /dev/null
+++ b/tools/tools_unittests.isolate
@@ -0,0 +1,29 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/tools_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../DEPS',
+          '../../resources/foreman_cif.yuv',
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/run_isolated.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/tools_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/video_engine/test/auto_test/vie_auto_test.gypi b/video_engine/test/auto_test/vie_auto_test.gypi
index 6a3bf6e..8e26429 100644
--- a/video_engine/test/auto_test/vie_auto_test.gypi
+++ b/video_engine/test/auto_test/vie_auto_test.gypi
@@ -126,4 +126,24 @@
       ],
     },
   ],
+  'conditions': [
+    ['test_isolation_mode != "noop"', {
+      'targets': [
+        {
+          'target_name': 'vie_auto_test_run',
+          'type': 'none',
+          'dependencies': [
+            'vie_auto_test',
+          ],
+          'includes': [
+            '../../../../build/isolate.gypi',
+            'vie_auto_test.isolate',
+          ],
+          'sources': [
+            'vie_auto_test.isolate',
+          ],
+        },
+      ],
+    }],
+  ],
 }
diff --git a/video_engine/test/auto_test/vie_auto_test.isolate b/video_engine/test/auto_test/vie_auto_test.isolate
new file mode 100644
index 0000000..fb3b930
--- /dev/null
+++ b/video_engine/test/auto_test/vie_auto_test.isolate
@@ -0,0 +1,30 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../../../testing/test_env.py',
+          '../../../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/vie_auto_test<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_touched': [
+          '../../../../DEPS',
+        ],
+        'isolate_dependency_tracked': [
+          '../../../../testing/test_env.py',
+          '../../../../tools/swarm_client/run_isolated.py',
+          '../../../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/vie_auto_test<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/video_engine/video_engine_core.gypi b/video_engine/video_engine_core.gypi
index 42100df..ef1836d 100644
--- a/video_engine/video_engine_core.gypi
+++ b/video_engine/video_engine_core.gypi
@@ -182,6 +182,24 @@
             },
           ],
         }],
+        ['test_isolation_mode != "noop"', {
+          'targets': [
+            {
+              'target_name': 'video_engine_core_unittests_run',
+              'type': 'none',
+              'dependencies': [
+                'video_engine_core_unittests',
+              ],
+              'includes': [
+                '../../build/isolate.gypi',
+                'video_engine_core_unittests.isolate',
+              ],
+              'sources': [
+                'video_engine_core_unittests.isolate',
+              ],
+            },
+          ],
+        }],
       ],
     }], # include_tests
   ], # conditions
diff --git a/video_engine/video_engine_core_unittests.isolate b/video_engine/video_engine_core_unittests.isolate
new file mode 100644
index 0000000..28f5151
--- /dev/null
+++ b/video_engine/video_engine_core_unittests.isolate
@@ -0,0 +1,27 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/video_engine_core_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/run_isolated.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/video_engine_core_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/voice_engine/voe_auto_test.isolate b/voice_engine/voe_auto_test.isolate
new file mode 100644
index 0000000..465ec1a
--- /dev/null
+++ b/voice_engine/voe_auto_test.isolate
@@ -0,0 +1,27 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/voe_auto_test<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/run_isolated.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/voe_auto_test<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}
diff --git a/voice_engine/voice_engine.gyp b/voice_engine/voice_engine.gyp
index 23c57da..9f13791 100644
--- a/voice_engine/voice_engine.gyp
+++ b/voice_engine/voice_engine.gyp
@@ -320,6 +320,38 @@
             },
           ],
         }],
+        ['test_isolation_mode != "noop"', {
+          'targets': [
+            {
+              'target_name': 'voice_engine_unittests_run',
+              'type': 'none',
+              'dependencies': [
+                'voice_engine_unittests',
+              ],
+              'includes': [
+                '../../build/isolate.gypi',
+                'voice_engine_unittests.isolate',
+              ],
+              'sources': [
+                'voice_engine_unittests.isolate',
+              ],
+            },
+            {
+              'target_name': 'voe_auto_test_run',
+              'type': 'none',
+              'dependencies': [
+                'voe_auto_test',
+              ],
+              'includes': [
+                '../../build/isolate.gypi',
+                'voe_auto_test.isolate',
+              ],
+              'sources': [
+                'voe_auto_test.isolate',
+              ],
+            },
+          ],
+        }],
       ],  # conditions
     }], # include_tests
   ], # conditions
diff --git a/voice_engine/voice_engine_unittests.isolate b/voice_engine/voice_engine_unittests.isolate
new file mode 100644
index 0000000..d90fa3c
--- /dev/null
+++ b/voice_engine/voice_engine_unittests.isolate
@@ -0,0 +1,27 @@
+# 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '<(PRODUCT_DIR)/voice_engine_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+        'isolate_dependency_tracked': [
+          '../../testing/test_env.py',
+          '../../tools/swarm_client/run_isolated.py',
+          '../../tools/swarm_client/googletest/run_test_cases.py',
+          '../../tools/swarm_client/third_party/upload.py',
+          '<(PRODUCT_DIR)/voice_engine_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+}