Create a 'webrtc_nonparallel_tests' target.

Used for tests that cannot be run in parallel due to using non-virtual
resources such as filesystems and sockets. Initially moves socket
unittests from rtc_unittest since
PhysicalSocketTest.TestUdpReadyToSendIPv4 is one of the worst flake
offenders.

Future prospect targets are GTEST_DEATH tests that are flaky on Mac in
parallel for instance.

BUG=chromium:445880
R=kjellander@webrtc.org

Review URL: https://codereview.webrtc.org/1426643003 .

Cr-Commit-Position: refs/heads/master@{#10446}
This commit is contained in:
Peter Boström 2015-10-29 12:41:56 +01:00
parent 6449990387
commit 95192fbb1e
4 changed files with 75 additions and 13 deletions

View File

@ -78,10 +78,8 @@
'multipart_unittest.cc',
'nat_unittest.cc',
'network_unittest.cc',
'nullsocketserver_unittest.cc',
'optionsfile_unittest.cc',
'pathutils_unittest.cc',
'physicalsocketserver_unittest.cc',
'profiler_unittest.cc',
'proxy_unittest.cc',
'proxydetect_unittest.cc',
@ -96,9 +94,6 @@
'sigslot_unittest.cc',
'sigslottester.h',
'sigslottester.h.pump',
'socket_unittest.cc',
'socket_unittest.h',
'socketaddress_unittest.cc',
'stream_unittest.cc',
'stringencode_unittest.cc',
'stringutils_unittest.cc',
@ -111,7 +106,6 @@
'timeutils_unittest.cc',
'urlencode_unittest.cc',
'versionparsing_unittest.cc',
'virtualsocket_unittest.cc',
# TODO(ronghuawu): Reenable this test.
# 'windowpicker_unittest.cc',
],
@ -128,23 +122,17 @@
'sources': [
'win32_unittest.cc',
'win32regkey_unittest.cc',
'win32socketserver_unittest.cc',
'win32window_unittest.cc',
'win32windowpicker_unittest.cc',
'winfirewall_unittest.cc',
],
'sources!': [
# TODO(ronghuawu): Fix TestUdpReadyToSendIPv6 on windows bot
# then reenable these tests.
'physicalsocketserver_unittest.cc',
'socket_unittest.cc',
'win32socketserver_unittest.cc',
# TODO(pbos): Reenable this test.
'win32windowpicker_unittest.cc',
],
}],
['OS=="mac"', {
'sources': [
'macsocketserver_unittest.cc',
'macutils_unittest.cc',
],
}],

View File

@ -201,6 +201,20 @@
'../../build/apk_test.gypi',
],
},
{
'target_name': 'webrtc_nonparallel_tests_apk',
'type': 'none',
'variables': {
'test_suite_name': 'webrtc_nonparallel_tests',
'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)webrtc_nonparallel_tests<(SHARED_LIB_SUFFIX)',
},
'dependencies': [
'<(webrtc_root)/webrtc.gyp:webrtc_nonparallel_tests',
],
'includes': [
'../../build/apk_test.gypi',
],
},
{
'target_name': 'audio_codec_speed_tests_apk',
'type': 'none',

View File

@ -103,6 +103,7 @@
'dependencies': [
'field_trial',
'histogram',
'test_support',
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
],

View File

@ -42,6 +42,7 @@
'video_loopback',
'video_replay',
'webrtc_perf_tests',
'webrtc_nonparallel_tests',
],
},
{
@ -232,6 +233,57 @@
}],
],
},
{
'target_name': 'webrtc_nonparallel_tests',
'type': '<(gtest_target_type)',
'sources': [
'base/nullsocketserver_unittest.cc',
'base/physicalsocketserver_unittest.cc',
'base/socket_unittest.cc',
'base/socket_unittest.h',
'base/socketaddress_unittest.cc',
'base/virtualsocket_unittest.cc',
],
'defines': [
'GTEST_RELATIVE_PATH',
],
'dependencies': [
'<(DEPTH)/testing/gtest.gyp:gtest',
'base/base.gyp:rtc_base',
'test/test.gyp:test_main',
],
'conditions': [
['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
}],
['OS=="win"', {
'sources': [
'base/win32socketserver_unittest.cc',
],
'sources!': [
# TODO(ronghuawu): Fix TestUdpReadyToSendIPv6 on windows bot
# then reenable these tests.
# TODO(pbos): Move test disabling to ifdefs within the test files
# instead of here.
'base/physicalsocketserver_unittest.cc',
'base/socket_unittest.cc',
'base/win32socketserver_unittest.cc',
],
}],
['OS=="mac"', {
'sources': [
'base/macsocketserver_unittest.cc',
],
}],
['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
'defines': [
'CARBON_DEPRECATED=YES',
],
}],
],
},
],
'conditions': [
['OS=="android"', {
@ -257,6 +309,13 @@
'<(apk_tests_path):webrtc_perf_tests_apk',
],
},
{
'target_name': 'webrtc_nonparallel_tests_apk_target',
'type': 'none',
'dependencies': [
'<(apk_tests_path):webrtc_nonparallel_tests_apk',
],
},
],
}],
['test_isolation_mode != "noop"', {