Reorganize test targets in WebRTC

This CL will lower the number of test targets in WebRTC by:

Add common_audio_unittests and merge the following targets into it (copied from http://review.webrtc.org/1584006):
* resampler_unittests
* signal_processing_unittests
* vad_unittests

Merge into modules_unittests:
* bitrate_controller_unittests
* desktop_capture_unittests
* media_file_unittests
* remote_bitrate_estimator_unittests
* rtp_rtcp_unittests
* paced_sender_unittests

Merge into test_support_unittests:
* channel_transport_unittests

channel_transport.gyp was also removed in favor for test.gyp.

I had to remove a main method from rtcp_format_remb_unittest.cc
since it caused the fileutils.h code to not be able to find the
right project root path in ordrer to provide correct paths
to test files.

Buildbot configuration update will be synced with the commit of this CL.

TEST=trybots
BUG=1843
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@4213 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/common_audio/common_audio.gyp b/common_audio/common_audio.gyp
index bec3980..a931e91 100644
--- a/common_audio/common_audio.gyp
+++ b/common_audio/common_audio.gyp
@@ -167,10 +167,9 @@
       ],  # targets
     }],
     ['include_tests==1', {
-      # TODO(ajm): Use a single common_audio_unittests target.
       'targets' : [
         {
-          'target_name': 'resampler_unittests',
+          'target_name': 'common_audio_unittests',
           'type': 'executable',
           'dependencies': [
             'common_audio',
@@ -186,30 +185,8 @@
             'resampler/sinc_resampler_unittest.cc',
             'resampler/sinusoidal_linear_chirp_source.cc',
             'resampler/sinusoidal_linear_chirp_source.h',
-          ],
-        },
-        {
-          'target_name': 'signal_processing_unittests',
-          'type': 'executable',
-          'dependencies': [
-            'common_audio',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
-            '<(webrtc_root)/test/test.gyp:test_support_main',
-          ],
-          'sources': [
             'signal_processing/real_fft_unittest.cc',
             'signal_processing/signal_processing_unittest.cc',
-          ],
-        },
-        {
-          'target_name': 'vad_unittests',
-          'type': 'executable',
-          'dependencies': [
-            'common_audio',
-            '<(webrtc_root)/test/test.gyp:test_support_main',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
-          ],
-          'sources': [
             'vad/vad_core_unittest.cc',
             'vad/vad_filterbank_unittest.cc',
             'vad/vad_gmm_unittest.cc',
diff --git a/modules/bitrate_controller/bitrate_controller.gypi b/modules/bitrate_controller/bitrate_controller.gypi
index 76c678d..5d37b91 100644
--- a/modules/bitrate_controller/bitrate_controller.gypi
+++ b/modules/bitrate_controller/bitrate_controller.gypi
@@ -34,24 +34,4 @@
       'msvs_disabled_warnings': [ 4267, ],
     },
   ], # targets
-
-  'conditions': [
-    ['include_tests==1', {
-      'targets' : [
-        {
-          'target_name': 'bitrate_controller_unittests',
-          'type': 'executable',
-          'dependencies': [
-            'bitrate_controller',
-            '<(webrtc_root)/test/test.gyp:test_support_main',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
-          ],
-          'sources': [
-            'bitrate_controller_unittest.cc',
-           ],
-         },
-       ], # targets
-    }], # include_tests
-  ], # conditions
-
 }
diff --git a/modules/desktop_capture/desktop_capture.gypi b/modules/desktop_capture/desktop_capture.gypi
index 3f70d03..269c583 100644
--- a/modules/desktop_capture/desktop_capture.gypi
+++ b/modules/desktop_capture/desktop_capture.gypi
@@ -7,16 +7,6 @@
 # be found in the AUTHORS file in the root of the source tree.
 
 {
-  'variables': {
-    'conditions': [
-      # Desktop capturer is supported only on Windows, OSX and Linux.
-      ['OS=="win" or OS=="mac" or OS=="linux"', {
-        'desktop_capture_supported%': 1,
-      }, {
-        'desktop_capture_supported%': 0,
-      }],
-    ],
-  },
   'targets': [
     {
       'target_name': 'desktop_capture',
@@ -124,47 +114,5 @@
         },
       ],  # targets
     }],
-    ['include_tests==1', {
-      'targets': [
-        {
-          'target_name': 'desktop_capture_unittests',
-          'type': 'executable',
-          'dependencies': [
-            'desktop_capture',
-            '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-            '<(webrtc_root)/test/test.gyp:test_support',
-            '<(webrtc_root)/test/test.gyp:test_support_main',
-            '<(DEPTH)/testing/gmock.gyp:gmock',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
-          ],
-          'sources': [
-            "desktop_region_unittest.cc",
-            "differ_block_unittest.cc",
-            "differ_unittest.cc",
-            "screen_capturer_helper_unittest.cc",
-            "screen_capturer_mac_unittest.cc",
-            "screen_capturer_mock_objects.h",
-            "screen_capturer_unittest.cc",
-            "window_capturer_unittest.cc",
-            "win/cursor_unittest.cc",
-            "win/cursor_unittest_resources.h",
-            "win/cursor_unittest_resources.rc",
-          ],
-          'conditions': [
-            # Run screen/window capturer tests only on platforms where they are
-            # supported.
-            ['desktop_capture_supported==1', {
-              'sources!': [
-                "screen_capturer_helper_unittest.cc",
-                "screen_capturer_mac_unittest.cc",
-                "screen_capturer_mock_objects.h",
-                "screen_capturer_unittest.cc",
-                "window_capturer_unittest.cc",
-              ],
-            }],
-          ],
-        },
-      ],  # targets
-    }],  # include_tests==1
   ],
 }
diff --git a/modules/media_file/source/media_file.gypi b/modules/media_file/source/media_file.gypi
index 60c8b40..1214571 100644
--- a/modules/media_file/source/media_file.gypi
+++ b/modules/media_file/source/media_file.gypi
@@ -42,22 +42,4 @@
       'msvs_disabled_warnings': [ 4267, ],
     },
   ], # targets
-  'conditions': [
-    ['include_tests==1', {
-      'targets': [
-        {
-          'target_name': 'media_file_unittests',
-          'type': 'executable',
-          'dependencies': [
-            'media_file',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
-            '<(webrtc_root)/test/test.gyp:test_support_main',
-          ],
-          'sources': [
-            'media_file_unittest.cc',
-          ],
-        }, # media_file_unittests
-      ], # targets
-    }], # include_tests
-  ], # conditions
 }
diff --git a/modules/modules.gyp b/modules/modules.gyp
index 8d0ec05..9193a25 100644
--- a/modules/modules.gyp
+++ b/modules/modules.gyp
@@ -44,26 +44,106 @@
         'audio_coding/codecs/isac/isac_test.gypi',
         'audio_coding/codecs/isac/isacfix_test.gypi',
         'audio_processing/audio_processing_tests.gypi',
-        'rtp_rtcp/source/rtp_rtcp_tests.gypi',
         'rtp_rtcp/test/testFec/test_fec.gypi',
         'video_coding/main/source/video_coding_test.gypi',
         'video_coding/codecs/test/video_codecs_test_framework.gypi',
         'video_coding/codecs/tools/video_codecs_tools.gypi',
         'video_processing/main/test/vpm_tests.gypi',
       ], # includes
+     'variables': {
+        'conditions': [
+          # Desktop capturer is supported only on Windows, OSX and Linux.
+          ['OS=="win" or OS=="mac" or OS=="linux"', {
+            'desktop_capture_supported%': 1,
+          }, {
+            'desktop_capture_supported%': 0,
+          }],
+        ],
+      },
       'targets': [
         {
           'target_name': 'modules_unittests',
           'type': 'executable',
           'dependencies': [
+            'bitrate_controller',
+            'desktop_capture',
+            'media_file',
+            'paced_sender',
+            'remote_bitrate_estimator',
+            'rtp_rtcp',
             'webrtc_utility',
+            '<(DEPTH)/testing/gmock.gyp:gmock',
             '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
             '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'sources': [
             'module_common_types_unittest.cc',
+            'bitrate_controller/bitrate_controller_unittest.cc',
+            'desktop_capture/desktop_region_unittest.cc',
+            'desktop_capture/differ_block_unittest.cc',
+            'desktop_capture/differ_unittest.cc',
+            'desktop_capture/screen_capturer_helper_unittest.cc',
+            'desktop_capture/screen_capturer_mac_unittest.cc',
+            'desktop_capture/screen_capturer_mock_objects.h',
+            'desktop_capture/screen_capturer_unittest.cc',
+            'desktop_capture/window_capturer_unittest.cc',
+            "desktop_capture/win/cursor_unittest.cc",
+            "desktop_capture/win/cursor_unittest_resources.h",
+            "desktop_capture/win/cursor_unittest_resources.rc",
+            'media_file/source/media_file_unittest.cc',
+            'pacing/paced_sender_unittest.cc',
+            'remote_bitrate_estimator/include/mock/mock_remote_bitrate_observer.h',
+            'remote_bitrate_estimator/bitrate_estimator_unittest.cc',
+            'remote_bitrate_estimator/remote_bitrate_estimator_multi_stream_unittest.cc',
+            'remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc',
+            'remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc',
+            'remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h',
+            'remote_bitrate_estimator/rtp_to_ntp_unittest.cc',
+            'rtp_rtcp/source/mock/mock_rtp_payload_strategy.h',
+            'rtp_rtcp/source/mock/mock_rtp_receiver_video.h',
+            'rtp_rtcp/source/fec_test_helper.cc',
+            'rtp_rtcp/source/fec_test_helper.h',
+            'rtp_rtcp/source/nack_rtx_unittest.cc',
+            'rtp_rtcp/source/producer_fec_unittest.cc',
+            'rtp_rtcp/source/receiver_fec_unittest.cc',
+            'rtp_rtcp/source/rtcp_format_remb_unittest.cc',
+            'rtp_rtcp/source/rtcp_sender_unittest.cc',
+            'rtp_rtcp/source/rtcp_receiver_unittest.cc',
+            'rtp_rtcp/source/rtp_fec_unittest.cc',
+            'rtp_rtcp/source/rtp_format_vp8_unittest.cc',
+            'rtp_rtcp/source/rtp_format_vp8_test_helper.cc',
+            'rtp_rtcp/source/rtp_format_vp8_test_helper.h',
+            'rtp_rtcp/source/rtp_packet_history_unittest.cc',
+            'rtp_rtcp/source/rtp_payload_registry_unittest.cc',
+            'rtp_rtcp/source/rtp_utility_unittest.cc',
+            'rtp_rtcp/source/rtp_header_extension_unittest.cc',
+            'rtp_rtcp/source/rtp_sender_unittest.cc',
+            'rtp_rtcp/source/vp8_partition_aggregator_unittest.cc',
+            'rtp_rtcp/test/testAPI/test_api.cc',
+            'rtp_rtcp/test/testAPI/test_api.h',
+            'rtp_rtcp/test/testAPI/test_api_audio.cc',
+            'rtp_rtcp/test/testAPI/test_api_rtcp.cc',
+            'rtp_rtcp/test/testAPI/test_api_video.cc',
             'utility/source/audio_frame_operations_unittest.cc',
           ],
+          'conditions': [
+            # Run screen/window capturer tests only on platforms where they are
+            # supported.
+            ['desktop_capture_supported==1', {
+              'sources!': [
+                'desktop_capture/screen_capturer_helper_unittest.cc',
+                'desktop_capture/screen_capturer_mac_unittest.cc',
+                'desktop_capture/screen_capturer_mock_objects.h',
+                'desktop_capture/screen_capturer_unittest.cc',
+                'desktop_capture/window_capturer_unittest.cc',
+              ],
+            }],
+          ],
+          # Disable warnings to enable Win64 build, issue 1323.
+          'msvs_disabled_warnings': [
+            4267,  # size_t to int truncation.
+          ],
         },
       ],
     }], # include_tests
diff --git a/modules/pacing/pacing.gypi b/modules/pacing/pacing.gypi
index 91693ec..a21f394 100644
--- a/modules/pacing/pacing.gypi
+++ b/modules/pacing/pacing.gypi
@@ -23,25 +23,4 @@
       ],
     },
   ], # targets
-
-  'conditions': [
-    ['include_tests==1', {
-      'targets' : [
-        {
-          'target_name': 'paced_sender_unittests',
-          'type': 'executable',
-          'dependencies': [
-            'paced_sender',
-            '<(webrtc_root)/test/test.gyp:test_support_main',
-            '<(DEPTH)/testing/gmock.gyp:gmock',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
-          ],
-          'sources': [
-            'paced_sender_unittest.cc',
-           ],
-         },
-       ], # targets
-    }], # include_tests
-  ], # conditions
-
 }
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi b/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi
index 829adf1..3920492 100644
--- a/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi
+++ b/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi
@@ -44,29 +44,4 @@
       ], # source
     },
   ], # targets
-  'conditions': [
-    ['include_tests==1', {
-      'targets': [
-        {
-          'target_name': 'remote_bitrate_estimator_unittests',
-          'type': 'executable',
-          'dependencies': [
-            'remote_bitrate_estimator',
-            '<(DEPTH)/testing/gmock.gyp:gmock',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
-            '<(webrtc_root)/test/test.gyp:test_support_main',
-          ],
-          'sources': [
-            'include/mock/mock_remote_bitrate_observer.h',
-            'bitrate_estimator_unittest.cc',
-            'remote_bitrate_estimator_multi_stream_unittest.cc',
-            'remote_bitrate_estimator_single_stream_unittest.cc',
-            'remote_bitrate_estimator_unittest_helper.cc',
-            'remote_bitrate_estimator_unittest_helper.h',
-            'rtp_to_ntp_unittest.cc',
-          ],
-        },
-      ], # targets
-    }], # build_with_chromium
-  ], # conditions
 }
diff --git a/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc b/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
index 4afc61c..bb91440 100644
--- a/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
@@ -125,9 +125,3 @@
   EXPECT_EQ(0, rtcp_sender_->SendRTCP(kRtcpRemb));
 }
 } // namespace
-
-int main(int argc, char** argv) {
-  ::testing::InitGoogleTest(&argc, argv);
-
-  return RUN_ALL_TESTS();
-}
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_tests.gypi b/modules/rtp_rtcp/source/rtp_rtcp_tests.gypi
deleted file mode 100644
index c1818cf..0000000
--- a/modules/rtp_rtcp/source/rtp_rtcp_tests.gypi
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright (c) 2012 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.
-
-{
-  'targets': [
-    {
-      'target_name': 'rtp_rtcp_unittests',
-      'type': 'executable',
-      'dependencies': [
-        'rtp_rtcp',
-        '<(DEPTH)/testing/gmock.gyp:gmock',
-        '<(DEPTH)/testing/gtest.gyp:gtest',
-        '<(webrtc_root)/test/test.gyp:test_support_main',
-        '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-      ],
-      'include_dirs': [
-        '../../../',
-      ],
-      'sources': [
-        '../test/testAPI/test_api.cc',
-        '../test/testAPI/test_api.h',
-        '../test/testAPI/test_api_audio.cc',
-        '../test/testAPI/test_api_rtcp.cc',
-        '../test/testAPI/test_api_video.cc',
-        'mock/mock_rtp_payload_strategy.h',
-        'mock/mock_rtp_receiver_video.h',
-        'fec_test_helper.cc',
-        'fec_test_helper.h',
-        'nack_rtx_unittest.cc',
-        'producer_fec_unittest.cc',
-        'receiver_fec_unittest.cc',
-        'rtcp_format_remb_unittest.cc',
-        'rtcp_sender_unittest.cc',
-        'rtcp_receiver_unittest.cc',
-        'rtp_fec_unittest.cc',
-        'rtp_format_vp8_unittest.cc',
-        'rtp_format_vp8_test_helper.cc',
-        'rtp_format_vp8_test_helper.h',
-        'rtp_packet_history_unittest.cc',
-        'rtp_payload_registry_unittest.cc',
-        'rtp_utility_unittest.cc',
-        'rtp_header_extension_unittest.cc',
-        'rtp_sender_unittest.cc',
-        'vp8_partition_aggregator_unittest.cc',
-      ],
-      # Disable warnings to enable Win64 build, issue 1323.
-      'msvs_disabled_warnings': [
-        4267,  # size_t to int truncation.
-      ],
-    },
-  ],
-}
diff --git a/test/channel_transport.gyp b/test/channel_transport.gyp
deleted file mode 100644
index 10808db..0000000
--- a/test/channel_transport.gyp
+++ /dev/null
@@ -1,67 +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.
-
-{
-  'includes': [
-    '../build/common.gypi',
-  ],
-  'targets': [
-    {
-      'target_name': 'channel_transport',
-      'type': 'static_library',
-      'dependencies': [
-        '<(DEPTH)/testing/gtest.gyp:gtest',
-        '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-      ],
-      'sources': [
-        # PLATFORM INDEPENDENT SOURCE FILES
-        'channel_transport/channel_transport.cc',
-        'channel_transport/include/channel_transport.h',
-        'channel_transport/udp_transport.h',
-        'channel_transport/udp_transport_impl.cc',
-        'channel_transport/udp_socket_wrapper.cc',
-        'channel_transport/udp_socket_manager_wrapper.cc',
-        'channel_transport/udp_transport_impl.h',
-        'channel_transport/udp_socket_wrapper.h',
-        'channel_transport/udp_socket_manager_wrapper.h',
-        # PLATFORM SPECIFIC SOURCE FILES - Will be filtered below
-        # Posix (Linux/Mac)
-        'channel_transport/udp_socket_posix.cc',
-        'channel_transport/udp_socket_posix.h',
-        'channel_transport/udp_socket_manager_posix.cc',
-        'channel_transport/udp_socket_manager_posix.h',
-        # win
-        'channel_transport/udp_socket2_manager_win.cc',
-        'channel_transport/udp_socket2_manager_win.h',
-        'channel_transport/udp_socket2_win.cc',
-        'channel_transport/udp_socket2_win.h',
-        'channel_transport/traffic_control_win.cc',
-        'channel_transport/traffic_control_win.h',
-      ], # source
-    },
-    {
-      'target_name': 'channel_transport_unittests',
-      'type': 'executable',
-      'dependencies': [
-        'channel_transport',
-        '<(DEPTH)/testing/gtest.gyp:gtest',
-        '<(DEPTH)/testing/gmock.gyp:gmock',
-        '<(webrtc_root)/test/test.gyp:test_support_main',
-      ],
-      'sources': [
-        'channel_transport/udp_transport_unittest.cc',
-        'channel_transport/udp_socket_manager_unittest.cc',
-        'channel_transport/udp_socket_wrapper_unittest.cc',
-      ],
-      # Disable warnings to enable Win64 build, issue 1323.
-      'msvs_disabled_warnings': [
-        4267,  # size_t to int truncation.
-      ],
-    }, # channel_transport_unittests
-  ], # targets
-}
diff --git a/test/test.gyp b/test/test.gyp
index e6058ea..7f12a71 100644
--- a/test/test.gyp
+++ b/test/test.gyp
@@ -13,6 +13,35 @@
   ],
   'targets': [
     {
+      'target_name': 'channel_transport',
+      'type': 'static_library',
+      'dependencies': [
+        '<(DEPTH)/testing/gtest.gyp:gtest',
+        '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
+      ],
+      'sources': [
+        'channel_transport/channel_transport.cc',
+        'channel_transport/include/channel_transport.h',
+        'channel_transport/traffic_control_win.cc',
+        'channel_transport/traffic_control_win.h',
+        'channel_transport/udp_socket_manager_posix.cc',
+        'channel_transport/udp_socket_manager_posix.h',
+        'channel_transport/udp_socket_manager_wrapper.cc',
+        'channel_transport/udp_socket_manager_wrapper.h',
+        'channel_transport/udp_socket_posix.cc',
+        'channel_transport/udp_socket_posix.h',
+        'channel_transport/udp_socket_wrapper.cc',
+        'channel_transport/udp_socket_wrapper.h',
+        'channel_transport/udp_socket2_manager_win.cc',
+        'channel_transport/udp_socket2_manager_win.h',
+        'channel_transport/udp_socket2_win.cc',
+        'channel_transport/udp_socket2_win.h',
+        'channel_transport/udp_transport.h',
+        'channel_transport/udp_transport_impl.cc',
+        'channel_transport/udp_transport_impl.h',
+      ],
+    },
+    {
       'target_name': 'test_support',
       'type': 'static_library',
       'include_dirs': [
@@ -84,10 +113,15 @@
       'target_name': 'test_support_unittests',
       'type': 'executable',
       'dependencies': [
+        'channel_transport',
         'test_support_main',
+        '<(DEPTH)/testing/gmock.gyp:gmock',
         '<(DEPTH)/testing/gtest.gyp:gtest',
       ],
       'sources': [
+        'channel_transport/udp_transport_unittest.cc',
+        'channel_transport/udp_socket_manager_unittest.cc',
+        'channel_transport/udp_socket_wrapper_unittest.cc',
         'testsupport/unittest_utils.h',
         'testsupport/fileutils_unittest.cc',
         'testsupport/frame_reader_unittest.cc',
@@ -95,6 +129,10 @@
         'testsupport/packet_reader_unittest.cc',
         'testsupport/perf_test_unittest.cc',
       ],
+      # Disable warnings to enable Win64 build, issue 1323.
+      'msvs_disabled_warnings': [
+        4267,  # size_t to int truncation.
+      ],
     },
     {
       'target_name': 'buildbot_tests_scripts',
diff --git a/video_engine/test/android/android_video_demo.gypi b/video_engine/test/android/android_video_demo.gypi
index 5f70174..df39899 100644
--- a/video_engine/test/android/android_video_demo.gypi
+++ b/video_engine/test/android/android_video_demo.gypi
@@ -12,7 +12,7 @@
       'type': 'none',
       'dependencies': [
         '<(webrtc_root)/modules/modules.gyp:*',
-        '<(webrtc_root)/test/channel_transport.gyp:channel_transport',
+        '<(webrtc_root)/test/test.gyp:channel_transport',
         '<(webrtc_root)/video_engine/video_engine.gyp:video_engine_core',
         '<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine',
       ],
diff --git a/video_engine/test/auto_test/vie_auto_test.gypi b/video_engine/test/auto_test/vie_auto_test.gypi
index b1a24d9..9d8434f 100644
--- a/video_engine/test/auto_test/vie_auto_test.gypi
+++ b/video_engine/test/auto_test/vie_auto_test.gypi
@@ -19,8 +19,8 @@
         '<(DEPTH)/testing/gtest.gyp:gtest',
         '<(DEPTH)/third_party/google-gflags/google-gflags.gyp:google-gflags',
         '<(webrtc_root)/test/metrics.gyp:metrics',
+        '<(webrtc_root)/test/test.gyp:channel_transport',
         '<(webrtc_root)/test/test.gyp:test_support',
-        '<(webrtc_root)/test/channel_transport.gyp:channel_transport',
         '<(webrtc_root)/test/libtest/libtest.gyp:libtest',
         'video_engine_core',
         'libvietest',
diff --git a/voice_engine/voice_engine.gyp b/voice_engine/voice_engine.gyp
index d9e0f5e..65e6b8c 100644
--- a/voice_engine/voice_engine.gyp
+++ b/voice_engine/voice_engine.gyp
@@ -125,7 +125,6 @@
           'dependencies': [
             'voice_engine',
             '<(DEPTH)/testing/gtest.gyp:gtest',
-            '<(webrtc_root)/test/test.gyp:test_support_main',
             # The rest are to satisfy the unittests' include chain.
             # This would be unnecessary if we used qualified includes.
             '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
@@ -137,6 +136,7 @@
             '<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
             '<(webrtc_root)/modules/modules.gyp:webrtc_utility',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'include_dirs': [
             'include',
@@ -155,13 +155,13 @@
           'type': 'executable',
           'dependencies': [
             'voice_engine',
-            '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-            '<(webrtc_root)/test/test.gyp:test_support',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
             '<(DEPTH)/testing/gmock.gyp:gmock',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
             '<(DEPTH)/third_party/google-gflags/google-gflags.gyp:google-gflags',
+            '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
             '<(webrtc_root)/test/libtest/libtest.gyp:libtest',
-            '<(webrtc_root)/test/channel_transport.gyp:channel_transport',
+            '<(webrtc_root)/test/test.gyp:channel_transport',
+            '<(webrtc_root)/test/test.gyp:test_support',
            ],
           'include_dirs': [
             'auto_test',
@@ -239,11 +239,11 @@
           'target_name': 'voe_cmd_test',
           'type': 'executable',
           'dependencies': [
-            '<(webrtc_root)/test/test.gyp:test_support',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
             'voice_engine',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-            '<(webrtc_root)/test/channel_transport.gyp:channel_transport',
+            '<(webrtc_root)/test/test.gyp:channel_transport',
+            '<(webrtc_root)/test/test.gyp:test_support',
           ],
           'sources': [
             'test/cmd_test/voe_cmd_test.cc',