Revert 2213 - Moved the fuzz test under valgrind and added valgrind support to the video bot.

A series of CL:s by Patrik W. is breaking the auto-test. It started with CL 2211, but the later CL:s seems dependent on another. So I decided to go in reverse order and revert all of them.

BUG=
TEST=

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

TBR=phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/569013

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2224 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
turaj@webrtc.org
2012-05-10 22:55:57 +00:00
parent 449b525453
commit c2fe91256c
3 changed files with 118 additions and 70 deletions

View File

@@ -32,7 +32,7 @@ WEBRTC_SVN_LOCATION = 'http://webrtc.googlecode.com/svn/trunk'
WEBRTC_TRUNK_DIR = 'build/trunk'
WEBRTC_BUILD_DIR = 'build'
MEMCHECK_CMD = ['tools/valgrind-webrtc/webrtc_tests.sh', '-t']
VALGRIND_CMD = ['tools/valgrind-webrtc/webrtc_tests.sh', '-t', 'cmdline']
DEFAULT_COVERAGE_DIR = '/var/www/coverage'
DEFAULT_BLOAT_DIR = '/var/www/bloat'
@@ -615,14 +615,13 @@ class WebRTCLinuxFactory(WebRTCFactory):
"""
def __init__(self, build_status_oracle, is_try_slave=False,
run_with_memcheck=False, custom_deps_list=None):
valgrind_enabled=False, custom_deps_list=None):
WebRTCFactory.__init__(self, build_status_oracle=build_status_oracle,
is_try_slave=is_try_slave,
custom_deps_list=custom_deps_list)
self.build_enabled = False
self.coverage_enabled = False
self.run_with_memcheck = run_with_memcheck
self.compile_for_memory_tooling = False
self.valgrind_enabled = valgrind_enabled
def EnableCoverage(self, coverage_url, coverage_dir=DEFAULT_COVERAGE_DIR):
"""Enables coverage measurements using LCOV/GCOV.
@@ -642,12 +641,11 @@ class WebRTCLinuxFactory(WebRTCFactory):
self.coverage_dir = coverage_dir
def EnableBuild(self, release=False, build32=False, chrome_os=False,
clang=False, compile_for_memory_tooling=False):
clang=False):
if build32:
self.gyp_params.append('-Dtarget_arch=ia32')
self.build_enabled = True
self.compile_for_memory_tooling = compile_for_memory_tooling
self.release = release
self.AddSmartCleanStep()
@@ -655,7 +653,7 @@ class WebRTCLinuxFactory(WebRTCFactory):
# Valgrind bots need special GYP defines to enable memory profiling
# friendly compilation. They already has a custom .gclient configuration
# file created so they don't need one being generated like the other bots.
if self.compile_for_memory_tooling:
if self.valgrind_enabled:
for gyp_define in MEMORY_TOOLS_GYP_DEFINES:
self.gyp_params.append('-D' + gyp_define)
self.AddGclientSyncStep()
@@ -685,8 +683,8 @@ class WebRTCLinuxFactory(WebRTCFactory):
if cmd is None:
test_folder = 'Release' if self.release else 'Debug'
cmd = ['out/%s/%s' % (test_folder, test)]
if self.run_with_memcheck:
cmd = MEMCHECK_CMD + cmd
if self.valgrind_enabled:
cmd = VALGRIND_CMD + cmd
self.AddCommonStep(cmd, descriptor=descriptor, halt_build_on_failure=False)
def AddXvfbTestRunStep(self, test_name, test_binary, test_arguments=''):
@@ -793,25 +791,12 @@ class WebRTCLinuxFactory(WebRTCFactory):
# TODO(phoglund): Enable the full stack test once it is completed and
# nonflaky.
binary = 'out/Debug/vie_auto_test'
filter = '-ViEVideoVerificationTest.RunsFullStack*:ViERtpFuzzTest*'
args = (
'--automated --gtest_filter="%s" '
'--capture_test_ensure_resolution_alignment_in_capture_device=false')
args = args % filter
'--automated --gtest_filter="'
'-ViEVideoVerificationTest.RunsFullStackWithoutErrors" '
'--capture_test_ensure_resolution_alignment_in_capture_device=false')
self.AddXvfbTestRunStep(test_name=test, test_binary=binary,
test_arguments=args)
# Set up the fuzz tests as a separate step under memcheck.
# If this test is run we require that we have compiled for memory tools.
# We need to use some special black magic here: -- is replaced with ++
# when calling the webrtc_tests.sh script since we want those parameters
# to not be caught by webrtc_tests.sh's options parser, but be passed on
# to vie_auto_test. This is a part of webrtc_tests.sh's contract.
assert self.compile_for_memory_tooling
fuzz_binary = (' '.join(MEMCHECK_CMD) + ' ' + binary +
' ++automated ++gtest_filter=ViERtpFuzzTest*')
self.AddXvfbTestRunStep(test_name=test + ' (fuzz tests)',
test_binary=fuzz_binary)
elif test == 'video_render_module_test':
self.AddXvfbTestRunStep(test_name=test,
test_binary='out/Debug/video_render_module_test')