From 646fa2c5f23233ebdc6fb2c9bae74127010abaad Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Tue, 7 Feb 2012 15:51:18 +0000 Subject: [PATCH] Added Valgrind buildbot slave. Renamed and reordered some of the bots in the configuration. BUG= TEST=Tested on personal build master. Review URL: http://webrtc-codereview.appspot.com/389001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1625 4adac7df-926f-26a2-2b94-8c16560cd09d --- tools/continuous_build/master.cfg | 96 +++++++++++++------ .../continuous_build/webrtc_buildbot/utils.py | 55 +++++++++-- 2 files changed, 114 insertions(+), 37 deletions(-) diff --git a/tools/continuous_build/master.cfg b/tools/continuous_build/master.cfg index b01445c319..29bce1b243 100755 --- a/tools/continuous_build/master.cfg +++ b/tools/continuous_build/master.cfg @@ -37,6 +37,7 @@ c['slaves'] = [BuildSlave("android", "pass", max_builds=1), BuildSlave("linux-slave-4", "pass", max_builds=1), BuildSlave("linux-slave-5", "pass", max_builds=1), BuildSlave("linux-slave-gcc-4.6", "pass", max_builds=1), + BuildSlave("linux-valgrind", "pass", max_builds=1), BuildSlave("linux_video", "pass", max_builds=1), BuildSlave("mac-slave-1", "pass", max_builds=1), BuildSlave("win-slave", "pass", max_builds=1), @@ -70,15 +71,17 @@ webrtc_scheduler = Scheduler(name="all", branch=None, treeStableTimer=5*60, builderNames=["Win32Debug", "Win32Release", "MacOS", - "ChromeOS", - "LinuxCLANG", - "Linux64bitDBG", - "Linux32bitRelease", - "Linux64bitRelease", - "Linux32bitDBG", - "Linux64bitDBG-GCC4.6", + "Linux32DBG", + "Linux32Release", + "Linux64DBG", + "Linux64Release", + "LinuxClang", + "LinuxValgrind", + "Linux64DBG-GCC4.6", + "LinuxVideoTest", "Android", - "LinuxVideoTest"]) + "ChromeOS" + ]) c['schedulers'] = [webrtc_scheduler] @@ -132,8 +135,9 @@ NORMAL_TESTS = { "test_support_unittests": (True, True, True), "udp_transport_unittests": (True, True, True), "vad_unittests": (True, True, True), - "video_codecs_test_framework_integrationtests": (True, True, True), - "video_codecs_test_framework_unittests": (False, False, False), # Issue 260 + # Below: Issue 262 and 260 + "video_codecs_test_framework_integrationtests": (False, False, False), + "video_codecs_test_framework_unittests": (False, False, False), "video_coding_unittests": (True, True, False), # Issue 259 "video_engine_core_unittests": (True, True, True), "video_processing_unittests": (True, True, True), @@ -148,6 +152,13 @@ PHYSICAL_MACHINE_TESTS = { "voe_auto_test": (True, False, False), } +VALGRIND_DISABLED_TESTS = [ + "audio_coding_module_test", # Issue 270 + "audioproc_unittest", # Fixed point mode fails; issue 272 + "rtp_rtcp_unittests", # Issue 268 + "test_fec", # Too slow at the moment; issue 269 +] + linux_normal_tests = utils.GetEnabledTests(NORMAL_TESTS, "Linux") mac_normal_tests = utils.GetEnabledTests(NORMAL_TESTS, "Mac") windows_normal_tests = utils.GetEnabledTests(NORMAL_TESTS, "Windows") @@ -192,7 +203,14 @@ linux_clang = utils.WebRTCLinuxFactory() linux_clang.EnableBuild(clang=True) linux_clang.EnableTests(linux_normal_tests) -############# Mac Builders ####################################### +linux_valgrind = utils.WebRTCLinuxFactory(enable_valgrind=True) +linux_valgrind.EnableBuild(release=True) +# Filter out disabled Valgrind tests: +valgrind_tests = filter(lambda test: test not in VALGRIND_DISABLED_TESTS, + linux_normal_tests) +linux_valgrind.EnableTests(valgrind_tests) + +############## Mac Builders ####################################### mac_factory = utils.WebRTCMacFactory() mac_factory.EnableBuild(build_type="both") mac_factory.EnableTests(mac_normal_tests) @@ -209,31 +227,31 @@ win_factory_32_Release.EnableTests(windows_normal_tests) android_factory = utils.WebRTCAndroidFactory() android_factory.EnableBuild(product="toro") -linux_builder_1 = { - 'name': "Linux64bitDBG", +linux_builder_64_debug = { + 'name': "Linux64DBG", 'slavename': "linux-slave-1", 'builddir': "linux-slave-1", 'factory': linux_factory_64_dbg, } -linux_builder_2 = { - 'name': "Linux32bitRelease", +linux_builder_32_release = { + 'name': "Linux32Release", 'slavename': "linux-slave-2", 'builddir': "linux-slave-2", 'factory': linux_factory_32_release, } -linux_builder_3 = { - 'name': "Linux64bitRelease", +linux_builder_64_release = { + 'name': "Linux64Release", 'slavename': "linux-slave-5", 'builddir': "linux-slave-5", 'factory': linux_factory_64_release, } -linux_builder_4 = { - 'name': "Linux32bitDBG", +linux_builder_32_debug = { + 'name': "Linux32DBG", 'slavename': "linux-slave-4", 'builddir': "linux-slave-4", 'factory': linux_factory_32_dbg, } -mac_builder_1 = { +mac_builder_32_debug = { 'name': "MacOS", 'slavename': "mac-slave-1", 'builddir': "mac-slave-1", @@ -245,30 +263,36 @@ chromeos_builder = { 'builddir': "chromeos", 'factory': chromeos_factory, } -win_builder_1 = { +win_builder_32_debug = { 'name': "Win32Debug", 'slavename': "win-slave", 'builddir': "win-32-dbg", 'factory': win_factory_32_Debug, } -win_builder_2 = { +win_builder_32_release = { 'name': "Win32Release", 'slavename': "win-slave32", 'builddir': "win-32-release", 'factory': win_factory_32_Release, } -linux_video_builder = { +linux_builder_video = { 'name': "LinuxVideoTest", 'slavename': "linux_video", 'builddir': "video", 'factory': linux_factory_video, } -linux_clang_builder = { - 'name': "LinuxCLANG", +linux_builder_clang = { + 'name': "LinuxClang", 'slavename': "linux-clang", 'builddir': "linux-clang", 'factory': linux_clang, } +linux_builder_valgrind = { + 'name': "LinuxValgrind", + 'slavename': "linux-valgrind", + 'builddir': "linux-valgrind", + 'factory': linux_valgrind, + } android_builder_1 = { 'name': "Android", 'slavename': "android", @@ -276,16 +300,26 @@ android_builder_1 = { 'factory': android_factory, } linux_builder_gcc_4_6 = { - 'name': "Linux64bitDBG-GCC4.6", + 'name': "Linux64DBG-GCC4.6", 'slavename': "linux-slave-gcc-4.6", 'builddir': "linux-slave-gcc-4.6", 'factory': linux_factory_64_dbg_no_coverage, } -c['builders'] = [win_builder_1, win_builder_2, mac_builder_1, chromeos_builder, - linux_builder_1, linux_clang_builder, linux_builder_2, - linux_builder_3, linux_builder_4, android_builder_1, - linux_video_builder, linux_builder_gcc_4_6] - +c['builders'] = [ + win_builder_32_debug, + win_builder_32_release, + mac_builder_32_debug, + linux_builder_32_debug, + linux_builder_32_release, + linux_builder_64_release, + linux_builder_64_debug, + linux_builder_clang, + linux_builder_valgrind, + linux_builder_gcc_4_6, + linux_builder_video, + android_builder_1, + chromeos_builder, + ] ####### STATUS TARGETS diff --git a/tools/continuous_build/webrtc_buildbot/utils.py b/tools/continuous_build/webrtc_buildbot/utils.py index 29b7dad105..372707b355 100755 --- a/tools/continuous_build/webrtc_buildbot/utils.py +++ b/tools/continuous_build/webrtc_buildbot/utils.py @@ -22,17 +22,50 @@ import sys SUPPORTED_PLATFORMS = ("Linux", "Mac", "Windows") SVN_LOCATION = "http://webrtc.googlecode.com/svn/trunk" +VALGRIND_CMD = ["tools/valgrind-webrtc/webrtc_tests.sh", "-t", "cmdline"] + +# Copied from Chromium's +# trunk/tools/build/scripts/master/factory/chromium_factory.py +# but converted to a list since we set defines instead of using an environment +# variable. +# +# On valgrind bots, override the optimizer settings so we don't inline too +# much and make the stacks harder to figure out. Use the same settings +# on all buildbot masters to make it easier to move bots. +MEMORY_TOOLS_GYP_DEFINES = [ + # GCC flags + 'mac_debug_optimization=1 ', + 'mac_release_optimization=1 ', + 'release_optimize=1 ', + 'no_gc_sections=1 ', + 'debug_extra_cflags="-g -fno-inline -fno-omit-frame-pointer ' + '-fno-builtin -fno-optimize-sibling-calls" ', + 'release_extra_cflags="-g -fno-inline -fno-omit-frame-pointer ' + '-fno-builtin -fno-optimize-sibling-calls" ', + # MSVS flags + 'win_debug_RuntimeChecks=0 ', + 'win_debug_disable_iterator_debugging=1 ', + 'win_debug_Optimization=1 ', + 'win_debug_InlineFunctionExpansion=0 ', + 'win_release_InlineFunctionExpansion=0 ', + 'win_release_OmitFramePointers=0 ', + + 'linux_use_tcmalloc=1 ', + 'release_valgrind_build=1 ', + 'werror= ', +] class WebRTCFactory(factory.BuildFactory): """A Build Factory affected by properties.""" def __init__(self, build_factory_properties=None, steps=None, - enable_coverage=False, account=None): + enable_coverage=False, enable_valgrind=False, account=None): factory.BuildFactory.__init__(self, steps) self.properties = properties.Properties() self.enable_build = False self.force_sync = False self.enable_coverage = enable_coverage + self.enable_valgrind = enable_valgrind self.gyp_params = [] self.account = account self.coverage_dir = "" @@ -217,9 +250,9 @@ class WebRTCLinuxFactory(WebRTCFactory): """A Build Factory affected by properties.""" def __init__(self, build_factory_properties=None, steps=None, - enable_coverage=False, account=None): + enable_coverage=False, enable_valgrind=False, account=None): WebRTCFactory.__init__(self, build_factory_properties, steps, - enable_coverage, account) + enable_coverage, enable_valgrind, account) def EnableBuild(self, force_sync=False, release=False, build32=False, chrome_os=False, clang=False): @@ -231,8 +264,16 @@ class WebRTCLinuxFactory(WebRTCFactory): """Linux specific Build""" self.release = release self.AddCommonStep(["rm", "-rf", "trunk"], descriptor="Cleanup") - self.AddCommonStep(["gclient", "config", SVN_LOCATION], - descriptor="gclient_config") + # 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.enable_valgrind: + for gyp_define in MEMORY_TOOLS_GYP_DEFINES: + self.gyp_params.append("-D" + gyp_define) + else: + self.AddCommonStep(["gclient", "config", SVN_LOCATION], + descriptor="gclient_config") cmd = ["gclient", "sync"] if force_sync: @@ -263,6 +304,8 @@ class WebRTCLinuxFactory(WebRTCFactory): test_descriptor = [test, descriptor] if cmd is None: cmd = ["out/%s/%s" % (test_folder, test)] + if self.enable_valgrind: + cmd = VALGRIND_CMD + cmd self.addStep(shell.ShellCommand(command=cmd, workdir=workdir, description=["Running"]+test_descriptor, descriptionDone=test_descriptor+["finished"], @@ -515,4 +558,4 @@ def GetEnabledTests(test_dict, platform): if enabled_platforms[platform_index]: result.append(test_name) result.sort() - return result \ No newline at end of file + return result