- Moved methods where they should be.
- Removed unnecessary arguments. - Added comments. BUG= TEST= Review URL: https://webrtc-codereview.appspot.com/389008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1693 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -29,20 +29,20 @@ c = BuildmasterConfig = {}
|
|||||||
|
|
||||||
from buildbot.buildslave import BuildSlave
|
from buildbot.buildslave import BuildSlave
|
||||||
|
|
||||||
c['slaves'] = [BuildSlave("android", "pass", max_builds=1),
|
c['slaves'] = [BuildSlave('android', 'pass', max_builds=1),
|
||||||
BuildSlave("chromeos", "pass", max_builds=1),
|
BuildSlave('chromeos', 'pass', max_builds=1),
|
||||||
BuildSlave("linux-clang", "pass", max_builds=1),
|
BuildSlave('linux-clang', 'pass', max_builds=1),
|
||||||
BuildSlave("linux-slave-1", "pass", max_builds=1),
|
BuildSlave('linux-slave-1', 'pass', max_builds=1),
|
||||||
BuildSlave("linux-slave-2", "pass", max_builds=1),
|
BuildSlave('linux-slave-2', 'pass', max_builds=1),
|
||||||
BuildSlave("linux-slave-4", "pass", max_builds=1),
|
BuildSlave('linux-slave-4', 'pass', max_builds=1),
|
||||||
BuildSlave("linux-slave-5", "pass", max_builds=1),
|
BuildSlave('linux-slave-5', 'pass', max_builds=1),
|
||||||
BuildSlave("linux-slave-gcc-4.6", "pass", max_builds=1),
|
BuildSlave('linux-slave-gcc-4.6', 'pass', max_builds=1),
|
||||||
BuildSlave("linux-valgrind", "pass", max_builds=1),
|
BuildSlave('linux-valgrind', 'pass', max_builds=1),
|
||||||
BuildSlave("linux_video", "pass", max_builds=1),
|
BuildSlave('linux_video', 'pass', max_builds=1),
|
||||||
BuildSlave("mac-slave-3", "pass", max_builds=1),
|
BuildSlave('mac-slave-3', 'pass', max_builds=1),
|
||||||
BuildSlave("mac-slave-2", "pass", max_builds=1),
|
BuildSlave('mac-slave-2', 'pass', max_builds=1),
|
||||||
BuildSlave("win-slave", "pass", max_builds=1),
|
BuildSlave('win-slave', 'pass', max_builds=1),
|
||||||
BuildSlave("win-slave32", "pass", max_builds=1)]
|
BuildSlave('win-slave32', 'pass', max_builds=1)]
|
||||||
|
|
||||||
# 'slavePortnum' defines the TCP port to listen on. This must match the value
|
# 'slavePortnum' defines the TCP port to listen on. This must match the value
|
||||||
# configured into the buildslaves (with their --master option)
|
# configured into the buildslaves (with their --master option)
|
||||||
@@ -68,21 +68,21 @@ c['change_source'] = svn_poller
|
|||||||
## configure the Schedulers
|
## configure the Schedulers
|
||||||
|
|
||||||
from buildbot.scheduler import Scheduler
|
from buildbot.scheduler import Scheduler
|
||||||
webrtc_scheduler = Scheduler(name="all", branch=None, treeStableTimer=5*60,
|
webrtc_scheduler = Scheduler(name='all', branch=None, treeStableTimer=5*60,
|
||||||
builderNames=["Win32Debug",
|
builderNames=['Win32Debug',
|
||||||
"Win32Release",
|
'Win32Release',
|
||||||
"MacOS32DBG",
|
'MacOS32DBG',
|
||||||
"MacOS32Release",
|
'MacOS32Release',
|
||||||
"Linux32DBG",
|
'Linux32DBG',
|
||||||
"Linux32Release",
|
'Linux32Release',
|
||||||
"Linux64DBG",
|
'Linux64DBG',
|
||||||
"Linux64Release",
|
'Linux64Release',
|
||||||
"LinuxClang",
|
'LinuxClang',
|
||||||
"LinuxValgrind",
|
'LinuxValgrind',
|
||||||
"Linux64DBG-GCC4.6",
|
'Linux64DBG-GCC4.6',
|
||||||
"LinuxVideoTest",
|
'LinuxVideoTest',
|
||||||
"Android",
|
'Android',
|
||||||
"ChromeOS"
|
'ChromeOS'
|
||||||
])
|
])
|
||||||
c['schedulers'] = [webrtc_scheduler]
|
c['schedulers'] = [webrtc_scheduler]
|
||||||
|
|
||||||
@@ -116,60 +116,60 @@ from webrtc_buildbot import utils
|
|||||||
# enabled on Linux, Mac and/or Windows (in that order; defined in utils.py).
|
# enabled on Linux, Mac and/or Windows (in that order; defined in utils.py).
|
||||||
NORMAL_TESTS = {
|
NORMAL_TESTS = {
|
||||||
# Test name Linux Mac Windows
|
# Test name Linux Mac Windows
|
||||||
"audio_coding_module_test": (True, True, True),
|
'audio_coding_module_test': (True, True, True),
|
||||||
"audio_coding_unittests": (True, True, True),
|
'audio_coding_unittests': (True, True, True),
|
||||||
"audio_conference_mixer_unittests":(True, True, True),
|
'audio_conference_mixer_unittests':(True, True, True),
|
||||||
"audio_device_test_api": (True, False, False), # Issue 257
|
'audio_device_test_api': (True, False, False), # Issue 257
|
||||||
"audioproc_unittest": (True, True, True),
|
'audioproc_unittest': (True, True, True),
|
||||||
"cng_unittests": (True, True, True),
|
'cng_unittests': (True, True, True),
|
||||||
"g711_unittests": (True, True, True),
|
'g711_unittests': (True, True, True),
|
||||||
"g722_unittests": (True, True, True),
|
'g722_unittests': (True, True, True),
|
||||||
"libyuv_unittests": (True, True, True),
|
'libyuv_unittests': (True, True, True),
|
||||||
"jpeg_unittests": (True, True, True),
|
'jpeg_unittests': (True, True, True),
|
||||||
"media_file_unittests": (True, True, True),
|
'media_file_unittests': (True, True, True),
|
||||||
"neteq_unittests": (True, True, True),
|
'neteq_unittests': (True, True, True),
|
||||||
"pcm16b_unittests": (True, True, True),
|
'pcm16b_unittests': (True, True, True),
|
||||||
"resampler_unittests": (True, True, True),
|
'resampler_unittests': (True, True, True),
|
||||||
"rtp_rtcp_unittests": (True, True, True),
|
'rtp_rtcp_unittests': (True, True, True),
|
||||||
"signal_processing_unittests": (True, True, True),
|
'signal_processing_unittests': (True, True, True),
|
||||||
"system_wrappers_unittests": (True, True, True),
|
'system_wrappers_unittests': (True, True, True),
|
||||||
"test_bwe": (True, True, True),
|
'test_bwe': (True, True, True),
|
||||||
"test_fec": (True, True, True),
|
'test_fec': (True, True, True),
|
||||||
"test_support_unittests": (True, True, True),
|
'test_support_unittests': (True, True, True),
|
||||||
"udp_transport_unittests": (True, True, True),
|
'udp_transport_unittests': (True, True, True),
|
||||||
"vad_unittests": (True, True, True),
|
'vad_unittests': (True, True, True),
|
||||||
"video_codecs_test_framework_integrationtests": (True, True, True),
|
'video_codecs_test_framework_integrationtests': (True, True, True),
|
||||||
"video_codecs_test_framework_unittests": (True, True, True),
|
'video_codecs_test_framework_unittests': (True, True, True),
|
||||||
"video_coding_unittests": (True, True, True),
|
'video_coding_unittests': (True, True, True),
|
||||||
"video_engine_core_unittests": (True, True, True),
|
'video_engine_core_unittests': (True, True, True),
|
||||||
"video_processing_unittests": (True, True, True),
|
'video_processing_unittests': (True, True, True),
|
||||||
"voice_engine_unittests": (True, True, True),
|
'voice_engine_unittests': (True, True, True),
|
||||||
"vp8_unittests": (True, False, True), # Issue 273.
|
'vp8_unittests': (True, False, True), # Issue 273.
|
||||||
"webrtc_utility_unittests": (True, True, False),
|
'webrtc_utility_unittests': (True, True, False),
|
||||||
}
|
}
|
||||||
|
|
||||||
PHYSICAL_MACHINE_TESTS = {
|
PHYSICAL_MACHINE_TESTS = {
|
||||||
# Test name Linux Mac Windows
|
# Test name Linux Mac Windows
|
||||||
"video_render_module_test": (True, False, False),
|
'video_render_module_test': (True, False, False),
|
||||||
"vie_auto_test": (True, False, False),
|
'vie_auto_test': (True, False, False),
|
||||||
"voe_auto_test": (True, False, False),
|
'voe_auto_test': (True, False, False),
|
||||||
}
|
}
|
||||||
|
|
||||||
VALGRIND_DISABLED_TESTS = [
|
VALGRIND_DISABLED_TESTS = [
|
||||||
"audio_coding_module_test", # Issue 270
|
'audio_coding_module_test', # Issue 270
|
||||||
"test_fec", # Too slow for Valgrind
|
'test_fec', # Too slow for Valgrind
|
||||||
]
|
]
|
||||||
|
|
||||||
linux_normal_tests = utils.GetEnabledTests(NORMAL_TESTS, "Linux")
|
linux_normal_tests = utils.GetEnabledTests(NORMAL_TESTS, 'Linux')
|
||||||
mac_normal_tests = utils.GetEnabledTests(NORMAL_TESTS, "Mac")
|
mac_normal_tests = utils.GetEnabledTests(NORMAL_TESTS, 'Mac')
|
||||||
windows_normal_tests = utils.GetEnabledTests(NORMAL_TESTS, "Windows")
|
windows_normal_tests = utils.GetEnabledTests(NORMAL_TESTS, 'Windows')
|
||||||
|
|
||||||
linux_physical_machine_tests = utils.GetEnabledTests(PHYSICAL_MACHINE_TESTS,
|
linux_physical_machine_tests = utils.GetEnabledTests(PHYSICAL_MACHINE_TESTS,
|
||||||
"Linux")
|
'Linux')
|
||||||
mac_physical_machine_tests = utils.GetEnabledTests(PHYSICAL_MACHINE_TESTS,
|
mac_physical_machine_tests = utils.GetEnabledTests(PHYSICAL_MACHINE_TESTS,
|
||||||
"Mac")
|
'Mac')
|
||||||
windows_physical_machine_tests = utils.GetEnabledTests(PHYSICAL_MACHINE_TESTS,
|
windows_physical_machine_tests = utils.GetEnabledTests(PHYSICAL_MACHINE_TESTS,
|
||||||
"Windows")
|
'Windows')
|
||||||
|
|
||||||
############# Linux Builders #######################################
|
############# Linux Builders #######################################
|
||||||
linux_factory_64_dbg = utils.WebRTCLinuxFactory()
|
linux_factory_64_dbg = utils.WebRTCLinuxFactory()
|
||||||
@@ -188,15 +188,15 @@ linux_factory_64_release = utils.WebRTCLinuxFactory()
|
|||||||
linux_factory_64_release.EnableBuild(release=True)
|
linux_factory_64_release.EnableBuild(release=True)
|
||||||
linux_factory_64_release.EnableTests(linux_normal_tests)
|
linux_factory_64_release.EnableTests(linux_normal_tests)
|
||||||
|
|
||||||
linux_factory_32_dbg = utils.WebRTCLinuxFactory(
|
linux_factory_32_dbg = utils.WebRTCLinuxFactory()
|
||||||
enable_coverage=True,
|
linux_factory_32_dbg.EnableCoverage(
|
||||||
coverage_url="http://webrtc-cb-linux-slave-4.cbf.corp.google.com/")
|
coverage_url='http://webrtc-cb-linux-slave-4.cbf.corp.google.com/')
|
||||||
linux_factory_32_dbg.EnableBuild(build32=True)
|
linux_factory_32_dbg.EnableBuild(build32=True)
|
||||||
linux_factory_32_dbg.EnableTests(linux_normal_tests)
|
linux_factory_32_dbg.EnableTests(linux_normal_tests)
|
||||||
|
|
||||||
linux_factory_video = utils.WebRTCLinuxFactory(
|
linux_factory_video = utils.WebRTCLinuxFactory()
|
||||||
enable_coverage=True,
|
linux_factory_video.EnableCoverage(
|
||||||
coverage_url="http://webrtc-build-bot-se.lul/")
|
coverage_url='http://webrtc-build-bot-se.lul/')
|
||||||
linux_factory_video.EnableBuild()
|
linux_factory_video.EnableBuild()
|
||||||
linux_factory_video.EnableTests(linux_physical_machine_tests)
|
linux_factory_video.EnableTests(linux_physical_machine_tests)
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ linux_clang = utils.WebRTCLinuxFactory()
|
|||||||
linux_clang.EnableBuild(clang=True)
|
linux_clang.EnableBuild(clang=True)
|
||||||
linux_clang.EnableTests(linux_normal_tests)
|
linux_clang.EnableTests(linux_normal_tests)
|
||||||
|
|
||||||
linux_valgrind = utils.WebRTCLinuxFactory(enable_valgrind=True)
|
linux_valgrind = utils.WebRTCLinuxFactory(valgrind_enabled=True)
|
||||||
linux_valgrind.EnableBuild(release=True)
|
linux_valgrind.EnableBuild(release=True)
|
||||||
# Filter out disabled Valgrind tests:
|
# Filter out disabled Valgrind tests:
|
||||||
valgrind_tests = filter(lambda test: test not in VALGRIND_DISABLED_TESTS,
|
valgrind_tests = filter(lambda test: test not in VALGRIND_DISABLED_TESTS,
|
||||||
@@ -217,107 +217,107 @@ linux_valgrind.EnableTests(valgrind_tests)
|
|||||||
|
|
||||||
############## Mac Builders #######################################
|
############## Mac Builders #######################################
|
||||||
mac_factory_32_dbg = utils.WebRTCMacFactory()
|
mac_factory_32_dbg = utils.WebRTCMacFactory()
|
||||||
mac_factory_32_dbg.EnableBuild(build_type="both")
|
mac_factory_32_dbg.EnableBuild(build_type='both')
|
||||||
mac_factory_32_dbg.EnableTests(mac_normal_tests)
|
mac_factory_32_dbg.EnableTests(mac_normal_tests)
|
||||||
|
|
||||||
mac_factory_32_release = utils.WebRTCMacFactory()
|
mac_factory_32_release = utils.WebRTCMacFactory()
|
||||||
mac_factory_32_release.EnableBuild(build_type="both", release=True)
|
mac_factory_32_release.EnableBuild(build_type='both', release=True)
|
||||||
mac_factory_32_release.EnableTests(mac_normal_tests)
|
mac_factory_32_release.EnableTests(mac_normal_tests)
|
||||||
|
|
||||||
############# Windows Builders #######################################
|
############# Windows Builders #######################################
|
||||||
win_factory_32_Debug = utils.WebRTCWinFactory()
|
win_factory_32_Debug = utils.WebRTCWinFactory()
|
||||||
win_factory_32_Debug.EnableBuild(configuration="Debug")
|
win_factory_32_Debug.EnableBuild(configuration='Debug')
|
||||||
win_factory_32_Debug.EnableTests(windows_normal_tests)
|
win_factory_32_Debug.EnableTests(windows_normal_tests)
|
||||||
|
|
||||||
win_factory_32_Release = utils.WebRTCWinFactory()
|
win_factory_32_Release = utils.WebRTCWinFactory()
|
||||||
win_factory_32_Release.EnableBuild(configuration="Release")
|
win_factory_32_Release.EnableBuild(configuration='Release')
|
||||||
win_factory_32_Release.EnableTests(windows_normal_tests)
|
win_factory_32_Release.EnableTests(windows_normal_tests)
|
||||||
|
|
||||||
android_factory = utils.WebRTCAndroidFactory()
|
android_factory = utils.WebRTCAndroidFactory()
|
||||||
android_factory.EnableBuild(product="toro")
|
android_factory.EnableBuild(product='toro')
|
||||||
|
|
||||||
linux_builder_64_debug = {
|
linux_builder_64_debug = {
|
||||||
'name': "Linux64DBG",
|
'name': 'Linux64DBG',
|
||||||
'slavename': "linux-slave-1",
|
'slavename': 'linux-slave-1',
|
||||||
'builddir': "linux-slave-1",
|
'builddir': 'linux-slave-1',
|
||||||
'factory': linux_factory_64_dbg,
|
'factory': linux_factory_64_dbg,
|
||||||
}
|
}
|
||||||
linux_builder_32_release = {
|
linux_builder_32_release = {
|
||||||
'name': "Linux32Release",
|
'name': 'Linux32Release',
|
||||||
'slavename': "linux-slave-2",
|
'slavename': 'linux-slave-2',
|
||||||
'builddir': "linux-slave-2",
|
'builddir': 'linux-slave-2',
|
||||||
'factory': linux_factory_32_release,
|
'factory': linux_factory_32_release,
|
||||||
}
|
}
|
||||||
linux_builder_64_release = {
|
linux_builder_64_release = {
|
||||||
'name': "Linux64Release",
|
'name': 'Linux64Release',
|
||||||
'slavename': "linux-slave-5",
|
'slavename': 'linux-slave-5',
|
||||||
'builddir': "linux-slave-5",
|
'builddir': 'linux-slave-5',
|
||||||
'factory': linux_factory_64_release,
|
'factory': linux_factory_64_release,
|
||||||
}
|
}
|
||||||
linux_builder_32_debug = {
|
linux_builder_32_debug = {
|
||||||
'name': "Linux32DBG",
|
'name': 'Linux32DBG',
|
||||||
'slavename': "linux-slave-4",
|
'slavename': 'linux-slave-4',
|
||||||
'builddir': "linux-slave-4",
|
'builddir': 'linux-slave-4',
|
||||||
'factory': linux_factory_32_dbg,
|
'factory': linux_factory_32_dbg,
|
||||||
}
|
}
|
||||||
mac_builder_32_debug = {
|
mac_builder_32_debug = {
|
||||||
'name': "MacOS32DBG",
|
'name': 'MacOS32DBG',
|
||||||
'slavename': "mac-slave-3",
|
'slavename': 'mac-slave-3',
|
||||||
'builddir': "mac-slave-3",
|
'builddir': 'mac-slave-3',
|
||||||
'factory': mac_factory_32_dbg,
|
'factory': mac_factory_32_dbg,
|
||||||
}
|
}
|
||||||
mac_builder_32_release = {
|
mac_builder_32_release = {
|
||||||
'name': "MacOS32Release",
|
'name': 'MacOS32Release',
|
||||||
'slavename': "mac-slave-2",
|
'slavename': 'mac-slave-2',
|
||||||
'builddir': "mac-slave-2",
|
'builddir': 'mac-slave-2',
|
||||||
'factory': mac_factory_32_release,
|
'factory': mac_factory_32_release,
|
||||||
}
|
}
|
||||||
chromeos_builder = {
|
chromeos_builder = {
|
||||||
'name': "ChromeOS",
|
'name': 'ChromeOS',
|
||||||
'slavename': "chromeos",
|
'slavename': 'chromeos',
|
||||||
'builddir': "chromeos",
|
'builddir': 'chromeos',
|
||||||
'factory': chromeos_factory,
|
'factory': chromeos_factory,
|
||||||
}
|
}
|
||||||
win_builder_32_debug = {
|
win_builder_32_debug = {
|
||||||
'name': "Win32Debug",
|
'name': 'Win32Debug',
|
||||||
'slavename': "win-slave",
|
'slavename': 'win-slave',
|
||||||
'builddir': "win-32-dbg",
|
'builddir': 'win-32-dbg',
|
||||||
'factory': win_factory_32_Debug,
|
'factory': win_factory_32_Debug,
|
||||||
}
|
}
|
||||||
win_builder_32_release = {
|
win_builder_32_release = {
|
||||||
'name': "Win32Release",
|
'name': 'Win32Release',
|
||||||
'slavename': "win-slave32",
|
'slavename': 'win-slave32',
|
||||||
'builddir': "win-32-release",
|
'builddir': 'win-32-release',
|
||||||
'factory': win_factory_32_Release,
|
'factory': win_factory_32_Release,
|
||||||
}
|
}
|
||||||
linux_builder_video = {
|
linux_builder_video = {
|
||||||
'name': "LinuxVideoTest",
|
'name': 'LinuxVideoTest',
|
||||||
'slavename': "linux_video",
|
'slavename': 'linux_video',
|
||||||
'builddir': "video",
|
'builddir': 'video',
|
||||||
'factory': linux_factory_video,
|
'factory': linux_factory_video,
|
||||||
}
|
}
|
||||||
linux_builder_clang = {
|
linux_builder_clang = {
|
||||||
'name': "LinuxClang",
|
'name': 'LinuxClang',
|
||||||
'slavename': "linux-clang",
|
'slavename': 'linux-clang',
|
||||||
'builddir': "linux-clang",
|
'builddir': 'linux-clang',
|
||||||
'factory': linux_clang,
|
'factory': linux_clang,
|
||||||
}
|
}
|
||||||
linux_builder_valgrind = {
|
linux_builder_valgrind = {
|
||||||
'name': "LinuxValgrind",
|
'name': 'LinuxValgrind',
|
||||||
'slavename': "linux-valgrind",
|
'slavename': 'linux-valgrind',
|
||||||
'builddir': "linux-valgrind",
|
'builddir': 'linux-valgrind',
|
||||||
'factory': linux_valgrind,
|
'factory': linux_valgrind,
|
||||||
}
|
}
|
||||||
android_builder_1 = {
|
android_builder_1 = {
|
||||||
'name': "Android",
|
'name': 'Android',
|
||||||
'slavename': "android",
|
'slavename': 'android',
|
||||||
'builddir': "android",
|
'builddir': 'android',
|
||||||
'factory': android_factory,
|
'factory': android_factory,
|
||||||
}
|
}
|
||||||
linux_builder_gcc_4_6 = {
|
linux_builder_gcc_4_6 = {
|
||||||
'name': "Linux64DBG-GCC4.6",
|
'name': 'Linux64DBG-GCC4.6',
|
||||||
'slavename': "linux-slave-gcc-4.6",
|
'slavename': 'linux-slave-gcc-4.6',
|
||||||
'builddir': "linux-slave-gcc-4.6",
|
'builddir': 'linux-slave-gcc-4.6',
|
||||||
'factory': linux_factory_64_dbg_no_coverage,
|
'factory': linux_factory_64_dbg_no_coverage,
|
||||||
}
|
}
|
||||||
c['builders'] = [
|
c['builders'] = [
|
||||||
@@ -348,8 +348,8 @@ from buildbot.status import mail
|
|||||||
|
|
||||||
web_page = html.WebStatus(http_port=8010, allowForce=True)
|
web_page = html.WebStatus(http_port=8010, allowForce=True)
|
||||||
email_notification = mail.MailNotifier(
|
email_notification = mail.MailNotifier(
|
||||||
fromaddr="webrtc-cb-watchlist@google.com",
|
fromaddr='webrtc-cb-watchlist@google.com',
|
||||||
extraRecipients=["webrtc-cb-watchlist@google.com"],
|
extraRecipients=['webrtc-cb-watchlist@google.com'],
|
||||||
sendToInterestedUsers=True,
|
sendToInterestedUsers=True,
|
||||||
mode='failing')
|
mode='failing')
|
||||||
c['status'] = [web_page, email_notification]
|
c['status'] = [web_page, email_notification]
|
||||||
@@ -363,15 +363,15 @@ c['status'] = [web_page, email_notification]
|
|||||||
# before you have a functioning 'sources' set up). The debug tool uses the
|
# before you have a functioning 'sources' set up). The debug tool uses the
|
||||||
# same port number as the slaves do: 'slavePortnum'.
|
# same port number as the slaves do: 'slavePortnum'.
|
||||||
|
|
||||||
#c['debugPassword'] = "debugpassword"
|
#c['debugPassword'] = 'debugpassword'
|
||||||
|
|
||||||
# if you set 'manhole', you can ssh into the buildmaster and get an
|
# if you set 'manhole', you can ssh into the buildmaster and get an
|
||||||
# interactive python shell, which may be useful for debugging buildbot
|
# interactive python shell, which may be useful for debugging buildbot
|
||||||
# internals. It is probably only useful for buildbot developers. You can also
|
# internals. It is probably only useful for buildbot developers. You can also
|
||||||
# use an authorized_keys file, or plain telnet.
|
# use an authorized_keys file, or plain telnet.
|
||||||
#from buildbot import manhole
|
#from buildbot import manhole
|
||||||
#c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1",
|
#c['manhole'] = manhole.PasswordManhole('tcp:9999:interface=127.0.0.1',
|
||||||
# "admin", "password")
|
# 'admin', 'password')
|
||||||
|
|
||||||
|
|
||||||
####### PROJECT IDENTITY
|
####### PROJECT IDENTITY
|
||||||
@@ -381,8 +381,8 @@ c['status'] = [web_page, email_notification]
|
|||||||
# waterfall HTML page. The 'projectURL' string will be used to provide a link
|
# waterfall HTML page. The 'projectURL' string will be used to provide a link
|
||||||
# from buildbot HTML pages to your project's home page.
|
# from buildbot HTML pages to your project's home page.
|
||||||
|
|
||||||
c['projectName'] = "WebRTC"
|
c['projectName'] = 'WebRTC'
|
||||||
c['projectURL'] = "http://www.webrtc.org"
|
c['projectURL'] = 'http://www.webrtc.org'
|
||||||
|
|
||||||
# the 'buildbotURL' string should point to the location where the buildbot's
|
# the 'buildbotURL' string should point to the location where the buildbot's
|
||||||
# internal web server (usually the html.Waterfall page) is visible. This
|
# internal web server (usually the html.Waterfall page) is visible. This
|
||||||
@@ -390,4 +390,4 @@ c['projectURL'] = "http://www.webrtc.org"
|
|||||||
# with an externally-visible host name which the buildbot cannot figure out
|
# with an externally-visible host name which the buildbot cannot figure out
|
||||||
# without some help.
|
# without some help.
|
||||||
|
|
||||||
c['buildbotURL'] = "http://webrtc-cb-linux-master.cbf.corp.google.com:8010/"
|
c['buildbotURL'] = 'http://webrtc-cb-linux-master.cbf.corp.google.com:8010/'
|
||||||
|
|||||||
@@ -16,18 +16,18 @@ from buildbot.process import properties
|
|||||||
from buildbot.process.properties import WithProperties
|
from buildbot.process.properties import WithProperties
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import urlparse
|
||||||
|
|
||||||
# Defines the order of the booleans of the supported platforms in the test
|
# Defines the order of the booleans of the supported platforms in the test
|
||||||
# dictionaries in master.cfg.
|
# dictionaries in master.cfg.
|
||||||
SUPPORTED_PLATFORMS = ("Linux", "Mac", "Windows")
|
SUPPORTED_PLATFORMS = ('Linux', 'Mac', 'Windows')
|
||||||
|
|
||||||
SVN_LOCATION = "http://webrtc.googlecode.com/svn/trunk"
|
SVN_LOCATION = 'http://webrtc.googlecode.com/svn/trunk'
|
||||||
VALGRIND_CMD = ["tools/valgrind-webrtc/webrtc_tests.sh", "-t", "cmdline"]
|
VALGRIND_CMD = ['tools/valgrind-webrtc/webrtc_tests.sh', '-t', 'cmdline']
|
||||||
|
|
||||||
DEFAULT_COVERAGE_DIR = "/var/www"
|
DEFAULT_COVERAGE_DIR = '/var/www/'
|
||||||
|
|
||||||
# Copied from Chromium's
|
# Copied from trunk/tools/build/scripts/master/factory/chromium_factory.py
|
||||||
# trunk/tools/build/scripts/master/factory/chromium_factory.py
|
|
||||||
# but converted to a list since we set defines instead of using an environment
|
# but converted to a list since we set defines instead of using an environment
|
||||||
# variable.
|
# variable.
|
||||||
#
|
#
|
||||||
@@ -58,249 +58,310 @@ MEMORY_TOOLS_GYP_DEFINES = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
class WebRTCFactory(factory.BuildFactory):
|
class WebRTCFactory(factory.BuildFactory):
|
||||||
"""A Build Factory affected by properties."""
|
"""Abstract superclass for all build factories.
|
||||||
|
|
||||||
|
A build factory defines a sequence of steps to take in a build process.
|
||||||
|
This class provides some helper methods and some abstract methods that
|
||||||
|
can be overridden to create customized build sequences.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
factory.BuildFactory.__init__(self)
|
||||||
|
|
||||||
def __init__(self, build_factory_properties=None, steps=None,
|
|
||||||
enable_coverage=False, enable_valgrind=False,
|
|
||||||
account='webrtc-cb', coverage_url=None,
|
|
||||||
coverage_dir=DEFAULT_COVERAGE_DIR):
|
|
||||||
factory.BuildFactory.__init__(self, steps)
|
|
||||||
self.properties = properties.Properties()
|
self.properties = properties.Properties()
|
||||||
self.enable_build = False
|
self.build_enabled = False
|
||||||
self.force_sync = False
|
self.force_sync = False
|
||||||
self.enable_coverage = enable_coverage
|
|
||||||
self.enable_valgrind = enable_valgrind
|
|
||||||
self.gyp_params = []
|
self.gyp_params = []
|
||||||
self.release = False
|
self.release = False
|
||||||
self.coverage_url = coverage_url
|
|
||||||
self.coverage_dir = coverage_dir
|
|
||||||
|
|
||||||
def EnableBuild(self, force_sync):
|
def EnableBuild(self, force_sync):
|
||||||
"""Build the binary [must be overridden]."""
|
"""Adds steps for building WebRTC [must be overridden].
|
||||||
pass
|
|
||||||
|
|
||||||
def AddCommonTestSteps(self, test):
|
Implementations of this method must add clean and build steps so that
|
||||||
"""Add common steps for test.
|
when all steps have been run, we have an up-to-date, complete and correct
|
||||||
|
build of WebRTC for the platform. It is up to the method how to do this.
|
||||||
|
|
||||||
test: test to be run.
|
Args:
|
||||||
|
force_sync: the method must pass --force to 'gclient sync' if it is
|
||||||
|
used.
|
||||||
"""
|
"""
|
||||||
self.AddCommonMakeStep(test)
|
|
||||||
self.AddCommonTestRunStep(test)
|
|
||||||
|
|
||||||
def AddCommonStep(self, cmd, descriptor="", workdir="build",
|
|
||||||
warnOnFailure=False,):
|
|
||||||
"""Define common step."""
|
|
||||||
if type(descriptor) is str:
|
|
||||||
descriptor = [descriptor]
|
|
||||||
warn = warnOnFailure
|
|
||||||
flunkOnFailure = not warn
|
|
||||||
self.addStep(shell.ShellCommand(command=cmd, workdir=workdir,
|
|
||||||
description=descriptor + ["running..."],
|
|
||||||
descriptionDone=descriptor + ["done..."],
|
|
||||||
warnOnFailure=warn,
|
|
||||||
flunkOnFailure=flunkOnFailure,
|
|
||||||
name="".join(descriptor)))
|
|
||||||
|
|
||||||
def AddCommonTestRunStep(self):
|
|
||||||
"""Define common test run step [must be overridden]."""
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def AddCommonMakeStep(self):
|
|
||||||
"""Define common make step [must be overridden]."""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def AddCommonGYPStep(self, gyp_file, gyp_params=[], descriptor="gyp"):
|
|
||||||
cmd = ["./build/gyp_chromium", "--depth=.", gyp_file]
|
|
||||||
cmd += gyp_params + self.gyp_params
|
|
||||||
self.addStep(shell.ShellCommand(command=cmd, workdir="build/trunk",
|
|
||||||
description=[descriptor, "running..."],
|
|
||||||
descriptionDone=[descriptor, "done..."],
|
|
||||||
name="gyp_%s" % descriptor))
|
|
||||||
|
|
||||||
def EnableTest(self, test):
|
|
||||||
"""Enable Test to be run. May be overridden.
|
|
||||||
|
|
||||||
Override to handle special cases for specific platforms.
|
|
||||||
|
|
||||||
test: test to be run.
|
|
||||||
"""
|
|
||||||
self.AddCommonTestRunStep(test)
|
|
||||||
|
|
||||||
def EnableTests(self, tests):
|
def EnableTests(self, tests):
|
||||||
"""Enable Test to be run.
|
"""Adds test run steps for all tests in the list.
|
||||||
|
|
||||||
|
This method must be run after enabling the build.
|
||||||
|
|
||||||
|
Args:
|
||||||
tests: list of test to be run.
|
tests: list of test to be run.
|
||||||
"""
|
"""
|
||||||
if self.enable_coverage:
|
|
||||||
self.EnableBaseCoverage()
|
|
||||||
for test in tests:
|
for test in tests:
|
||||||
self.EnableTest(test)
|
self.EnableTest(test)
|
||||||
if self.enable_coverage:
|
|
||||||
self.EnableCoverage()
|
|
||||||
|
|
||||||
def EnableBaseCoverage(self):
|
def AddCommonStep(self, cmd, descriptor='', workdir='build',
|
||||||
"""Enable base coverage data [must be overridden]."""
|
warn_on_failure=False,):
|
||||||
|
"""Adds a common step which will run as a shell command on the slave.
|
||||||
|
|
||||||
|
A common step can be anything except a test execution step.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
cmd: The command to run. This command follows the contract for
|
||||||
|
ShellCommand, so see that documentation for more details.
|
||||||
|
descriptor: A string, or a list of strings, describing what the step
|
||||||
|
does. The descriptor gets printed in the waterfall display.
|
||||||
|
workdir: The working directory to run the command in.
|
||||||
|
warnOnFailure: Enable if you want a warning on failure instead of
|
||||||
|
an error. Enable for less critical commands.
|
||||||
|
"""
|
||||||
|
if type(descriptor) is str:
|
||||||
|
descriptor = [descriptor]
|
||||||
|
|
||||||
|
flunk_on_failure = not warn_on_failure
|
||||||
|
self.addStep(shell.ShellCommand(command=cmd, workdir=workdir,
|
||||||
|
description=descriptor + ['running...'],
|
||||||
|
descriptionDone=descriptor + ['done...'],
|
||||||
|
warnOnFailure=warn_on_failure,
|
||||||
|
flunkOnFailure=flunk_on_failure,
|
||||||
|
name=''.join(descriptor)))
|
||||||
|
|
||||||
|
def AddCommonTestRunStep(self, test, descriptor='', cmd=None,
|
||||||
|
workdir='build/trunk'):
|
||||||
|
"""Adds a step for running a single test [must be overridden].
|
||||||
|
|
||||||
|
Args:
|
||||||
|
test: The test binary name. The step will attempt to execute this
|
||||||
|
binary in the binary output folder, except if the cmd argument is
|
||||||
|
defined (in that case, we will run cmd instead and just use the
|
||||||
|
test name in the descriptor).
|
||||||
|
descriptor: This should either be a string or a list of strings. The
|
||||||
|
descriptor or descriptors are appended to the test name and
|
||||||
|
displayed in the waterfall.
|
||||||
|
cmd: If necessary, you can specify this argument to override the
|
||||||
|
default behavior, which is to just run the binary specified in
|
||||||
|
test without arguments.
|
||||||
|
workdir: The base working directory to run the command in. This
|
||||||
|
directory will map to the WebRTC project root, e.g. the trunk
|
||||||
|
directory. This method will make sure that the test binary is run
|
||||||
|
in the correct output directory for the platform.
|
||||||
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def EnableCoverage(self):
|
def EnableTest(self, test):
|
||||||
"""Enable coverage data [must be overridden]."""
|
"""Makes a test run in the build sequence. May be overridden.
|
||||||
pass
|
|
||||||
|
|
||||||
|
Override to handle special cases for specific platforms, for instance if
|
||||||
|
a particular test binary requires command line arguments.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
test: The test name to enable.
|
||||||
|
"""
|
||||||
|
self.AddCommonTestRunStep(test)
|
||||||
|
|
||||||
|
def AddCommonGYPStep(self, gyp_file, gyp_params=[], descriptor='gyp'):
|
||||||
|
"""Helper method for invoking GYP on WebRTC.
|
||||||
|
|
||||||
|
GYP will generate makefiles or its equivalent in a platform-specific
|
||||||
|
manner.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
gyp_file: The root GYP file to use.
|
||||||
|
gyp_params: Custom GYP parameters (same semantics as the GYP_PARAMS
|
||||||
|
environment variable).
|
||||||
|
descriptor: The descriptor to use for the step.
|
||||||
|
"""
|
||||||
|
cmd = ['./build/gyp_chromium', '--depth=.', gyp_file]
|
||||||
|
cmd += gyp_params + self.gyp_params
|
||||||
|
self.addStep(shell.ShellCommand(command=cmd, workdir='build/trunk',
|
||||||
|
description=[descriptor, 'running...'],
|
||||||
|
descriptionDone=[descriptor, 'done...'],
|
||||||
|
name='gyp_%s' % descriptor))
|
||||||
|
|
||||||
class GenerateCodeCoverage(ShellCommand):
|
class GenerateCodeCoverage(ShellCommand):
|
||||||
warnOnFailure = True
|
"""This custom shell command generates coverage HTML using genhtml.
|
||||||
|
|
||||||
|
The command will dump the HTML output into coverage_dir, in a directory
|
||||||
|
whose name is generated from the build number and slave name. We will
|
||||||
|
expect that the coverage directory is the web server root (i.e. public html
|
||||||
|
root) corresponding to the web server URL. That is, if we write Foo to
|
||||||
|
the coverage directory we expect that directory to be reachable from
|
||||||
|
url/Foo.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, coverage_url, coverage_dir, coverage_file, **kwargs):
|
||||||
|
"""Prepares the coverage command.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
coverage_url: The base URL for the serving web server we will use
|
||||||
|
when we generate the link to the coverage. This will generally
|
||||||
|
be the slave's URL (something like http://slave-hostname/).
|
||||||
|
coverage_dir: Where to write coverage HTML.
|
||||||
|
coverage_file: The LCOV file to generate the coverage from.
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, coverage_url=None, coverage_dir=None, **kwargs):
|
|
||||||
if coverage_url is None or coverage_dir is None:
|
|
||||||
raise TypeError("coverage location required")
|
|
||||||
ShellCommand.__init__(self, **kwargs)
|
ShellCommand.__init__(self, **kwargs)
|
||||||
self.addFactoryArguments(coverage_url=coverage_url,
|
self.addFactoryArguments(coverage_url=coverage_url,
|
||||||
coverage_dir=coverage_dir)
|
coverage_dir=coverage_dir,
|
||||||
|
coverage_file=coverage_file)
|
||||||
self.setDefaultWorkdir("build/trunk")
|
self.setDefaultWorkdir("build/trunk")
|
||||||
self.coverage_url = coverage_url
|
self.coverage_url = coverage_url
|
||||||
self.coverage_dir = coverage_dir
|
self.coverage_dir = coverage_dir
|
||||||
|
self.coverage_file = coverage_file
|
||||||
self.description = ["Coverage Report"]
|
self.description = ["Coverage Report"]
|
||||||
self.setCommand(["./tools/continuous_build/generate_coverage_html.sh",
|
output_dir = os.path.join(coverage_dir,
|
||||||
"final.info",
|
'%(buildername)s_%(buildnumber)s')
|
||||||
WithProperties(coverage_dir + "/%(buildername)s_%(buildnumber)s")])
|
self.setCommand(['./tools/continuous_build/generate_coverage_html.sh',
|
||||||
|
coverage_file, WithProperties(output_dir)])
|
||||||
|
|
||||||
def createSummary(self, log):
|
def createSummary(self, log):
|
||||||
coverage_url = "%s/%s_%s" % (self.coverage_url,
|
coverage_url = urlparse.urljoin(self.coverage_url,
|
||||||
self.getProperty("buildername"), self.getProperty("buildnumber"))
|
'%s_%s' % (self.getProperty('buildername'),
|
||||||
self.addURL("coverage", coverage_url)
|
self.getProperty('buildnumber')))
|
||||||
|
self.addURL('click here', coverage_url)
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
ShellCommand.start(self)
|
ShellCommand.start(self)
|
||||||
|
|
||||||
################################################################################
|
|
||||||
class WebRTCAndroidFactory(WebRTCFactory):
|
class WebRTCAndroidFactory(WebRTCFactory):
|
||||||
"""A Build Factory affected by properties."""
|
"""Sets up the Android build."""
|
||||||
|
|
||||||
def __init__(self, build_factory_properties=None, steps=None,
|
def __init__(self):
|
||||||
enable_coverage=False, account=None):
|
WebRTCFactory.__init__(self)
|
||||||
WebRTCFactory.__init__(self, build_factory_properties, steps,
|
|
||||||
enable_coverage, account)
|
|
||||||
|
|
||||||
def EnableBuild(self, product="toro"):
|
def EnableBuild(self, product='toro'):
|
||||||
prefix = "rm -rf out/target/product/%s/obj/" % product
|
prefix = 'rm -rf out/target/product/%s/obj/' % product
|
||||||
cleanup_list = [
|
cleanup_list = [
|
||||||
"rm -rf external/webrtc",
|
'rm -rf external/webrtc',
|
||||||
prefix + "STATIC_LIBRARIES/libwebrtc_*",
|
prefix + 'STATIC_LIBRARIES/libwebrtc_*',
|
||||||
prefix + "SHARE_LIBRARIES/libwebrtc_*",
|
prefix + 'SHARE_LIBRARIES/libwebrtc_*',
|
||||||
prefix + "EXECUTABLES/webrtc_*"
|
prefix + 'EXECUTABLES/webrtc_*'
|
||||||
]
|
]
|
||||||
cmd = " ; ".join(cleanup_list)
|
cmd = ' ; '.join(cleanup_list)
|
||||||
self.addStep(shell.Compile(command=(cmd), workdir="build/trunk",
|
self.addStep(shell.Compile(command=(cmd), workdir='build/trunk',
|
||||||
description=["cleanup", "running..."], haltOnFailure=False,
|
description=['cleanup', 'running...'], haltOnFailure=False,
|
||||||
warnOnFailure=True, flunkOnFailure=False,
|
warn_on_failure=True, flunkOnFailure=False,
|
||||||
descriptionDone=["cleanup", "done..."], name="cleanup"))
|
descriptionDone=['cleanup', 'done...'], name='cleanup'))
|
||||||
cmd = "svn checkout %s external/webrtc" % SVN_LOCATION
|
cmd = 'svn checkout %s external/webrtc' % SVN_LOCATION
|
||||||
self.addStep(shell.Compile(command=(cmd),
|
self.addStep(shell.Compile(command=(cmd),
|
||||||
workdir="build/trunk", description=["svn", "running..."],
|
workdir='build/trunk', description=['svn', 'running...'],
|
||||||
haltOnFailure=False, descriptionDone=["svn", "done..."], name="svn"))
|
haltOnFailure=False, descriptionDone=['svn', 'done...'], name='svn'))
|
||||||
cmd = ("source build/envsetup.sh && lunch full_%s-eng "
|
cmd = ('source build/envsetup.sh && lunch full_%s-eng '
|
||||||
"&& mmm external/webrtc showcommands" % product)
|
'&& mmm external/webrtc showcommands' % product)
|
||||||
self.addStep(shell.Compile(command=(cmd),
|
self.addStep(shell.Compile(command=(cmd),
|
||||||
workdir="build/trunk", description=["build", "running..."],
|
workdir='build/trunk', description=['build', 'running...'],
|
||||||
haltOnFailure=False,
|
haltOnFailure=False,
|
||||||
descriptionDone=["build", "done..."], name="build"))
|
descriptionDone=['build', 'done...'], name='build'))
|
||||||
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
class WebRTCChromeFactory(WebRTCFactory):
|
class WebRTCChromeFactory(WebRTCFactory):
|
||||||
"""A Build Factory affected by properties."""
|
"""Sets up the Chrome OS build."""
|
||||||
|
|
||||||
def __init__(self, build_factory_properties=None, steps=None,
|
def __init__(self):
|
||||||
enable_coverage=False, account=None):
|
WebRTCFactory.__init__(self)
|
||||||
WebRTCFactory.__init__(self, build_factory_properties, steps,
|
|
||||||
enable_coverage, account)
|
|
||||||
|
|
||||||
def EnableBuild(self):
|
def EnableBuild(self):
|
||||||
self.AddCommonStep(["rm", "-rf", "src"], descriptor="Cleanup")
|
self.AddCommonStep(['rm', '-rf', 'src'], descriptor='Cleanup')
|
||||||
cmd = ["gclient", "sync", "--force"]
|
cmd = ['gclient', 'sync', '--force']
|
||||||
self.AddCommonStep(cmd, descriptor="Sync")
|
self.AddCommonStep(cmd, descriptor='Sync')
|
||||||
self.AddCommonMakeStep("chrome")
|
self.AddCommonMakeStep('chrome')
|
||||||
|
|
||||||
def AddCommonMakeStep(self, make, descriptor="", make_extra=None):
|
def AddCommonMakeStep(self, make, descriptor='', make_extra=None):
|
||||||
make_descriptor = [make, descriptor]
|
make_descriptor = [make, descriptor]
|
||||||
cmd = ["make", make, "-j100"]
|
cmd = ['make', make, '-j100']
|
||||||
if make_extra is not None:
|
if make_extra is not None:
|
||||||
cmd.append(make_extra)
|
cmd.append(make_extra)
|
||||||
self.addStep(shell.ShellCommand(command=cmd,
|
self.addStep(shell.ShellCommand(command=cmd,
|
||||||
workdir="build/src", description=["Making"] + make_descriptor,
|
workdir='build/src', description=['Making'] + make_descriptor,
|
||||||
descriptionDone=make_descriptor + ["built"],
|
descriptionDone=make_descriptor + ['built'],
|
||||||
name="_".join(make_descriptor)))
|
name='_'.join(make_descriptor)))
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
class WebRTCLinuxFactory(WebRTCFactory):
|
class WebRTCLinuxFactory(WebRTCFactory):
|
||||||
"""A Build Factory affected by properties."""
|
"""Sets up the Linux build.
|
||||||
|
|
||||||
def __init__(self, build_factory_properties=None, steps=None,
|
This factory is quite configurable and can run a variety of builds.
|
||||||
enable_coverage=False, enable_valgrind=False, account=None,
|
"""
|
||||||
coverage_url=None, coverage_dir=DEFAULT_COVERAGE_DIR):
|
|
||||||
WebRTCFactory.__init__(self, build_factory_properties, steps,
|
def __init__(self, valgrind_enabled=False):
|
||||||
enable_coverage, enable_valgrind, account,
|
WebRTCFactory.__init__(self)
|
||||||
coverage_url, coverage_dir)
|
|
||||||
|
self.coverage_enabled = False
|
||||||
|
self.valgrind_enabled = valgrind_enabled
|
||||||
|
|
||||||
|
def EnableCoverage(self, coverage_url, coverage_dir=DEFAULT_COVERAGE_DIR):
|
||||||
|
"""Enables coverage measurements using LCOV/GCOV.
|
||||||
|
|
||||||
|
This method must be called before enabling build.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
coverage_url: See the GenerateCodeCoverage command's contract for
|
||||||
|
this argument.
|
||||||
|
coverage_dir: See the GenerateCodeCoverage command's contract for
|
||||||
|
this argument.
|
||||||
|
"""
|
||||||
|
|
||||||
|
assert self.build_enabled is False
|
||||||
|
|
||||||
|
self.coverage_enabled = True
|
||||||
|
self.coverage_url = coverage_url
|
||||||
|
self.coverage_dir = coverage_dir
|
||||||
|
|
||||||
def EnableBuild(self, force_sync=False, release=False, build32=False,
|
def EnableBuild(self, force_sync=False, release=False, build32=False,
|
||||||
chrome_os=False, clang=False):
|
chrome_os=False, clang=False):
|
||||||
if build32:
|
if build32:
|
||||||
self.gyp_params.append("-Dtarget_arch=ia32")
|
self.gyp_params.append('-Dtarget_arch=ia32')
|
||||||
|
|
||||||
self.enable_build = True
|
self.build_enabled = True
|
||||||
self.force_sync = force_sync
|
self.force_sync = force_sync
|
||||||
"""Linux specific Build"""
|
|
||||||
self.release = release
|
self.release = release
|
||||||
|
|
||||||
self.AddCommonStep(["rm", "-rf", "trunk"], descriptor="Cleanup")
|
self.AddCommonStep(['rm', '-rf', 'trunk'], descriptor='Cleanup')
|
||||||
|
|
||||||
# Valgrind bots need special GYP defines to enable memory profiling
|
# Valgrind bots need special GYP defines to enable memory profiling
|
||||||
# friendly compilation. They already has a custom .gclient
|
# friendly compilation. They already has a custom .gclient configuration
|
||||||
# configuration file created so they don't need one being
|
# file created so they don't need one being generated like the other bots.
|
||||||
# generated like the other bots.
|
if self.valgrind_enabled:
|
||||||
if self.enable_valgrind:
|
|
||||||
for gyp_define in MEMORY_TOOLS_GYP_DEFINES:
|
for gyp_define in MEMORY_TOOLS_GYP_DEFINES:
|
||||||
self.gyp_params.append("-D" + gyp_define)
|
self.gyp_params.append('-D' + gyp_define)
|
||||||
else:
|
else:
|
||||||
self.AddCommonStep(["gclient", "config", SVN_LOCATION],
|
self.AddCommonStep(['gclient', 'config', SVN_LOCATION],
|
||||||
descriptor="gclient_config")
|
descriptor='gclient_config')
|
||||||
|
|
||||||
cmd = ["gclient", "sync"]
|
cmd = ['gclient', 'sync']
|
||||||
if force_sync:
|
if force_sync:
|
||||||
cmd.append("--force")
|
cmd.append('--force')
|
||||||
self.AddCommonStep(cmd, descriptor="Sync")
|
self.AddCommonStep(cmd, descriptor='Sync')
|
||||||
if chrome_os:
|
if chrome_os:
|
||||||
self.gyp_params.append("-Dchromeos=1")
|
self.gyp_params.append('-Dchromeos=1')
|
||||||
|
|
||||||
if clang:
|
if clang:
|
||||||
self.gyp_params.append("-Dclang=1")
|
self.gyp_params.append('-Dclang=1')
|
||||||
|
|
||||||
if self.enable_coverage:
|
if self.coverage_enabled:
|
||||||
self.gyp_params.append("-Dcoverage=1")
|
self.gyp_params.append('-Dcoverage=1')
|
||||||
self.AddCommonGYPStep("webrtc.gyp", descriptor="CommonGYP")
|
self.AddCommonGYPStep('webrtc.gyp', descriptor='CommonGYP')
|
||||||
|
|
||||||
if clang:
|
if clang:
|
||||||
self.AddCommonStep(["trunk/tools/clang/scripts/update.sh"],
|
self.AddCommonStep(['trunk/tools/clang/scripts/update.sh'],
|
||||||
descriptor="Update_Clang")
|
descriptor='Update_Clang')
|
||||||
|
|
||||||
if self.release:
|
if self.release:
|
||||||
self.AddCommonMakeStep("all", make_extra="BUILDTYPE=Release")
|
self.AddCommonMakeStep('all', make_extra='BUILDTYPE=Release')
|
||||||
else:
|
else:
|
||||||
self.AddCommonMakeStep("all")
|
self.AddCommonMakeStep('all')
|
||||||
|
|
||||||
def AddCommonTestRunStep(self, test, descriptor="", cmd=None,
|
def AddCommonTestRunStep(self, test, descriptor='', cmd=None,
|
||||||
workdir="build/trunk"):
|
workdir='build/trunk'):
|
||||||
test_folder = "Release" if self.release else "Debug"
|
test_folder = 'Release' if self.release else 'Debug'
|
||||||
test_descriptor = [test, descriptor]
|
test_descriptor = [test, descriptor]
|
||||||
if cmd is None:
|
if cmd is None:
|
||||||
cmd = ["out/%s/%s" % (test_folder, test)]
|
cmd = ['out/%s/%s' % (test_folder, test)]
|
||||||
if self.enable_valgrind:
|
if self.valgrind_enabled:
|
||||||
cmd = VALGRIND_CMD + cmd
|
cmd = VALGRIND_CMD + cmd
|
||||||
self.addStep(shell.ShellCommand(command=cmd,
|
self.addStep(shell.ShellCommand(command=cmd,
|
||||||
workdir=workdir, description=["Running"] + test_descriptor,
|
workdir=workdir, description=['Running'] + test_descriptor,
|
||||||
descriptionDone=test_descriptor + ["finished"],
|
descriptionDone=test_descriptor + ['finished'],
|
||||||
name="_".join(test_descriptor)))
|
name='_'.join(test_descriptor)))
|
||||||
|
|
||||||
def AddXvfbTestRunStep(self, test_name, test_binary, test_arguments=''):
|
def AddXvfbTestRunStep(self, test_name, test_binary, test_arguments=''):
|
||||||
""" Adds a test to be run inside a XVFB window manager."""
|
""" Adds a test to be run inside a XVFB window manager."""
|
||||||
@@ -309,81 +370,91 @@ class WebRTCLinuxFactory(WebRTCFactory):
|
|||||||
'%s %s' % (test_binary, test_arguments))
|
'%s %s' % (test_binary, test_arguments))
|
||||||
self.AddCommonTestRunStep(test=test_name, cmd=cmd)
|
self.AddCommonTestRunStep(test=test_name, cmd=cmd)
|
||||||
|
|
||||||
def AddCommonMakeStep(self, make, descriptor="", make_extra=None):
|
def AddCommonMakeStep(self, make, descriptor='', make_extra=None):
|
||||||
make_descriptor = [make, descriptor]
|
make_descriptor = [make, descriptor]
|
||||||
#cpu = `grep -i \"processor\" /proc/cpuinfo | sort -u | wc -l`
|
cmd = ['make', make, '-j100']
|
||||||
cmd = ["make", make, "-j100"]
|
|
||||||
if make_extra is not None:
|
if make_extra is not None:
|
||||||
cmd.append(make_extra)
|
cmd.append(make_extra)
|
||||||
self.addStep(shell.ShellCommand(command=cmd,
|
self.addStep(shell.ShellCommand(command=cmd,
|
||||||
workdir="build/trunk", description=["Making"] + make_descriptor,
|
workdir='build/trunk', description=['Making'] + make_descriptor,
|
||||||
descriptionDone=make_descriptor + ["built"],
|
descriptionDone=make_descriptor + ['built'],
|
||||||
name="_".join(make_descriptor)))
|
name='_'.join(make_descriptor)))
|
||||||
|
|
||||||
def EnableBaseCoverage(self):
|
def AddStepsToEstablishCoverageBaseline(self):
|
||||||
self.AddCommonStep(["lcov", "--directory", ".", "--zerocounters"],
|
self.AddCommonStep(['lcov', '--directory', '.', '--capture', '-b',
|
||||||
workdir="build/trunk",
|
'.', '--initial',
|
||||||
warnOnFailure=True,
|
'--output-file', 'webrtc_base.info'],
|
||||||
descriptor=["LCOV", "Zero"])
|
workdir='build/trunk',
|
||||||
self.AddCommonStep(["lcov", "--directory", ".", "--capture", "-b",
|
warn_on_failure=True,
|
||||||
".", "--initial",
|
descriptor=['LCOV', 'Baseline', 'Capture'])
|
||||||
"--output-file", "webrtc_base.info"],
|
|
||||||
workdir="build/trunk",
|
|
||||||
warnOnFailure=True,
|
|
||||||
descriptor=["LCOV", "Base", "Capture"])
|
|
||||||
self.AddCommonStep(['lcov', '--extract', 'webrtc_base.info', '*/src/*',
|
self.AddCommonStep(['lcov', '--extract', 'webrtc_base.info', '*/src/*',
|
||||||
'--output', 'filtered.info'],
|
'--output', 'filtered.info'],
|
||||||
workdir="build/trunk",
|
workdir='build/trunk',
|
||||||
warnOnFailure=True,
|
warn_on_failure=True,
|
||||||
descriptor=["LCOV", "Base", "Extract"])
|
descriptor=['LCOV', 'Baseline', 'Extract'])
|
||||||
self.AddCommonStep(["lcov", "--remove", "filtered.info", "*/usr/include/*",
|
self.AddCommonStep(['lcov', '--remove', 'filtered.info', '*/usr/include/*',
|
||||||
"/third*", "/testing/*", "*/test/*", "*_unittest.*",
|
'/third*', '/testing/*', '*/test/*', '*_unittest.*',
|
||||||
"*/mock/*", "--output",
|
'*/mock/*', '--output',
|
||||||
"webrtc_base_filtered_final.info"],
|
'webrtc_base_filtered_final.info'],
|
||||||
workdir="build/trunk",
|
workdir='build/trunk',
|
||||||
warnOnFailure=True,
|
warn_on_failure=True,
|
||||||
descriptor=["LCOV", "Base", "Filter"])
|
descriptor=['LCOV', 'Baseline', 'Filter'])
|
||||||
|
|
||||||
def EnableCoverage(self):
|
def AddStepsToComputeCoverage(self):
|
||||||
"""Enable coverage data."""
|
"""Enable coverage data."""
|
||||||
|
|
||||||
# Delete all third-party .gcda files to save time and work around a bug
|
# Delete all third-party .gcda files to save time and work around a bug
|
||||||
# in lcov which tends to hang when capturing on libjpgturbo.
|
# in lcov which tends to hang when capturing on libjpgturbo.
|
||||||
self.AddCommonStep(["./tools/continuous_build/clean_third_party_gcda.sh"],
|
self.AddCommonStep(['./tools/continuous_build/clean_third_party_gcda.sh'],
|
||||||
warnOnFailure=True,
|
warn_on_failure=True,
|
||||||
workdir="build/trunk", descriptor=["LCOV",
|
workdir='build/trunk', descriptor=['LCOV',
|
||||||
"Delete 3rd party"])
|
'Delete 3rd party'])
|
||||||
|
|
||||||
self.AddCommonStep(["lcov", "--directory", ".", "--capture", "-b",
|
self.AddCommonStep(['lcov', '--directory', '.', '--capture', '-b',
|
||||||
".", "--output-file", "webrtc.info"],
|
'.', '--output-file', 'webrtc.info'],
|
||||||
warnOnFailure=True,
|
warn_on_failure=True,
|
||||||
workdir="build/trunk", descriptor=["LCOV", "Capture"])
|
workdir='build/trunk', descriptor=['LCOV', 'Capture'])
|
||||||
self.AddCommonStep(['lcov', '--extract', 'webrtc.info', '*/src/*',
|
self.AddCommonStep(['lcov', '--extract', 'webrtc.info', '*/src/*',
|
||||||
'--output', 'test.info'], warnOnFailure=True,
|
'--output', 'test.info'], warn_on_failure=True,
|
||||||
workdir="build/trunk", descriptor=["LCOV", "Extract"])
|
workdir='build/trunk', descriptor=['LCOV', 'Extract'])
|
||||||
self.AddCommonStep(["lcov", "--remove", "test.info", "*/usr/include/*",
|
self.AddCommonStep(['lcov', '--remove', 'test.info', '*/usr/include/*',
|
||||||
"/third*", "/testing/*", "*/test/*", "*_unittest.*",
|
'/third*', '/testing/*', '*/test/*', '*_unittest.*',
|
||||||
"*/mock/*", "--output",
|
'*/mock/*', '--output',
|
||||||
"final.info"], warnOnFailure=True,
|
'final.info'], warn_on_failure=True,
|
||||||
workdir="build/trunk", descriptor=["LCOV", "Filter"])
|
workdir='build/trunk', descriptor=['LCOV', 'Filter'])
|
||||||
self.AddCommonStep(['lcov', '-a', 'webrtc_base_filtered_final.info', '-a',
|
self.AddCommonStep(['lcov', '-a', 'webrtc_base_filtered_final.info', '-a',
|
||||||
'final.info', '-o', 'final.info'], warnOnFailure=True,
|
'final.info', '-o', 'final.info'], warn_on_failure=True,
|
||||||
workdir="build/trunk", descriptor=["LCOV", "Merge"])
|
workdir='build/trunk', descriptor=['LCOV', 'Merge'])
|
||||||
self.addStep(GenerateCodeCoverage(coverage_url=self.coverage_url,
|
self.addStep(GenerateCodeCoverage(coverage_url=self.coverage_url,
|
||||||
coverage_dir=self.coverage_dir))
|
coverage_dir=self.coverage_dir,
|
||||||
|
coverage_file='final.info'))
|
||||||
|
|
||||||
|
def EnableTests(self, tests):
|
||||||
|
if self.coverage_enabled:
|
||||||
|
self.AddStepsToEstablishCoverageBaseline()
|
||||||
|
|
||||||
|
WebRTCFactory.EnableTests(self, tests)
|
||||||
|
|
||||||
|
if self.coverage_enabled:
|
||||||
|
self.AddStepsToComputeCoverage()
|
||||||
|
|
||||||
def EnableTest(self, test):
|
def EnableTest(self, test):
|
||||||
"""Enable Test to be run.
|
"""Adds a step for running a test on Linux.
|
||||||
|
|
||||||
test: test to be run.
|
In general, this method will interpret the name as the name of a binary
|
||||||
|
in the default build output directory, except for a few special cases
|
||||||
|
which require custom command lines.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
test: the test name as a string.
|
||||||
"""
|
"""
|
||||||
if test == "audioproc_unittest":
|
if test == 'audioproc_unittest':
|
||||||
self.AddCommonTestRunStep(test)
|
self.AddCommonTestRunStep(test)
|
||||||
self.AddCommonGYPStep("webrtc.gyp", gyp_params=["-Dprefer_fixed_point=1"],
|
self.AddCommonGYPStep('webrtc.gyp', gyp_params=['-Dprefer_fixed_point=1'],
|
||||||
descriptor="fixed_point")
|
descriptor='fixed_point')
|
||||||
self.AddCommonMakeStep(test, descriptor="make_fixed_point")
|
self.AddCommonMakeStep(test, descriptor='make_fixed_point')
|
||||||
self.AddCommonTestRunStep(test, descriptor="fixed_point")
|
self.AddCommonTestRunStep(test, descriptor='fixed_point')
|
||||||
elif test == "vie_auto_test":
|
elif test == 'vie_auto_test':
|
||||||
# TODO(phoglund): Enable the full stack test once it is completed and
|
# TODO(phoglund): Enable the full stack test once it is completed and
|
||||||
# nonflaky.
|
# nonflaky.
|
||||||
binary = "out/Debug/vie_auto_test"
|
binary = "out/Debug/vie_auto_test"
|
||||||
@@ -396,151 +467,147 @@ class WebRTCLinuxFactory(WebRTCFactory):
|
|||||||
test_arguments=args)
|
test_arguments=args)
|
||||||
elif test == "video_render_module_test":
|
elif test == "video_render_module_test":
|
||||||
self.AddXvfbTestRunStep(test_name=test,
|
self.AddXvfbTestRunStep(test_name=test,
|
||||||
test_binary='out/Debug/video_render_module_test');
|
test_binary='out/Debug/video_render_module_test')
|
||||||
elif test == "voe_auto_test":
|
elif test == "voe_auto_test":
|
||||||
# TODO(phoglund): Remove this notice and take appropriate action when
|
# TODO(phoglund): Remove this notice and take appropriate action when
|
||||||
# http://code.google.com/p/webrtc/issues/detail?id=266 is concluded.
|
# http://code.google.com/p/webrtc/issues/detail?id=266 is concluded.
|
||||||
self.addStep(shell.Compile(
|
self.addStep(shell.Compile(
|
||||||
command=('out/Debug/voe_auto_test --automated '
|
command=('out/Debug/voe_auto_test --automated '
|
||||||
'--gtest_filter="-VolumeTest.*"'),
|
'--gtest_filter="-VolumeTest.*"'),
|
||||||
workdir="build/trunk", description=[test, "running..."],
|
workdir='build/trunk', description=[test, 'running...'],
|
||||||
descriptionDone=[test, "done..."], name="%s" % test))
|
descriptionDone=[test, 'done...'], name='%s' % test))
|
||||||
else:
|
else:
|
||||||
self.AddCommonTestRunStep(test)
|
self.AddCommonTestRunStep(test)
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
class WebRTCMacFactory(WebRTCFactory):
|
class WebRTCMacFactory(WebRTCFactory):
|
||||||
"""A Build Factory affected by properties."""
|
"""Sets up the Mac build, both for make and xcode."""
|
||||||
|
|
||||||
def __init__(self, build_factory_properties=None, steps=None,
|
def __init__(self):
|
||||||
enable_coverage=False, account=None):
|
WebRTCFactory.__init__(self)
|
||||||
WebRTCFactory.__init__(self, build_factory_properties, steps,
|
self.build_type = 'both'
|
||||||
enable_coverage, account)
|
self.allowed_build_types = ['both', 'xcode', 'make']
|
||||||
self.build_type = "both"
|
|
||||||
self.allowed_build_types = ["both", "xcode", "make"]
|
|
||||||
|
|
||||||
def EnableBuild(self, force_sync=True, build_type="both", release=False):
|
def EnableBuild(self, force_sync=True, build_type='both', release=False):
|
||||||
self.enable_build = True
|
self.build_enabled = True
|
||||||
self.force_sync = force_sync
|
self.force_sync = force_sync
|
||||||
self.release = release
|
self.release = release
|
||||||
"""Mac specific Build"""
|
"""Mac specific Build"""
|
||||||
if build_type not in self.allowed_build_types:
|
if build_type not in self.allowed_build_types:
|
||||||
print "*** INCORRECT BUILD TYPE (%s)!!! ***" % build_type
|
print '*** INCORRECT BUILD TYPE (%s)!!! ***' % build_type
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
self.build_type = build_type
|
self.build_type = build_type
|
||||||
self.AddCommonStep(["rm", "-rf", "trunk"], descriptor="Cleanup")
|
self.AddCommonStep(['rm', '-rf', 'trunk'], descriptor='Cleanup')
|
||||||
self.AddCommonStep(["gclient", "config", SVN_LOCATION],
|
self.AddCommonStep(['gclient', 'config', SVN_LOCATION],
|
||||||
descriptor="gclient_config")
|
descriptor='gclient_config')
|
||||||
cmd = ["gclient", "sync"]
|
cmd = ['gclient', 'sync']
|
||||||
if force_sync:
|
if force_sync:
|
||||||
cmd.append("--force")
|
cmd.append('--force')
|
||||||
self.AddCommonStep(cmd, descriptor="Sync")
|
self.AddCommonStep(cmd, descriptor='Sync')
|
||||||
if self.build_type == "make" or self.build_type == "both":
|
if self.build_type == 'make' or self.build_type == 'both':
|
||||||
self.AddCommonGYPStep("webrtc.gyp", gyp_params=["-f", "make"],
|
self.AddCommonGYPStep('webrtc.gyp', gyp_params=['-f', 'make'],
|
||||||
descriptor="EnableMake")
|
descriptor='EnableMake')
|
||||||
self.AddCommonMakeStep("all")
|
self.AddCommonMakeStep('all')
|
||||||
|
|
||||||
def AddCommonTestRunStep(self, test, descriptor="", cmd=None,
|
def AddCommonTestRunStep(self, test, descriptor='', cmd=None,
|
||||||
workdir="build/trunk"):
|
workdir='build/trunk'):
|
||||||
test_folder = "Release" if self.release else "Debug"
|
test_folder = 'Release' if self.release else 'Debug'
|
||||||
test_descriptor = [test, descriptor]
|
test_descriptor = [test, descriptor]
|
||||||
if cmd is None:
|
if cmd is None:
|
||||||
if self.build_type == "xcode" or self.build_type == "both":
|
if self.build_type == 'xcode' or self.build_type == 'both':
|
||||||
cmd = ["xcodebuild/%s/%s" % (test_folder, test)]
|
cmd = ['xcodebuild/%s/%s' % (test_folder, test)]
|
||||||
self.AddCommonStep(cmd, descriptor=test_descriptor + ["(xcode)"],
|
self.AddCommonStep(cmd, descriptor=test_descriptor + ['(xcode)'],
|
||||||
workdir="build/trunk")
|
workdir='build/trunk')
|
||||||
if self.build_type == "make" or self.build_type == "both":
|
if self.build_type == 'make' or self.build_type == 'both':
|
||||||
cmd = ["out/%s/%s" % (test_folder, test)]
|
cmd = ['out/%s/%s' % (test_folder, test)]
|
||||||
self.AddCommonStep(cmd, descriptor=test_descriptor + ["(make)"],
|
self.AddCommonStep(cmd, descriptor=test_descriptor + ['(make)'],
|
||||||
workdir="build/trunk")
|
workdir='build/trunk')
|
||||||
|
|
||||||
def AddCommonMakeStep(self, make, descriptor="", make_extra=None):
|
def AddCommonMakeStep(self, make, descriptor='', make_extra=None):
|
||||||
make_descriptor = [make, descriptor]
|
make_descriptor = [make, descriptor]
|
||||||
if self.build_type == "make" or self.build_type == "both":
|
if self.build_type == 'make' or self.build_type == 'both':
|
||||||
cmd = ["make", make, "-j100"]
|
cmd = ['make', make, '-j100']
|
||||||
if make_extra is not None:
|
if make_extra is not None:
|
||||||
cmd.append(make_extra)
|
cmd.append(make_extra)
|
||||||
if self.release:
|
if self.release:
|
||||||
cmd.append("BUILDTYPE=Release")
|
cmd.append('BUILDTYPE=Release')
|
||||||
self.AddCommonStep(cmd, descriptor=make_descriptor + ["(make)"],
|
self.AddCommonStep(cmd, descriptor=make_descriptor + ['(make)'],
|
||||||
workdir="build/trunk")
|
workdir='build/trunk')
|
||||||
if self.build_type == "xcode" or self.build_type == "both":
|
if self.build_type == 'xcode' or self.build_type == 'both':
|
||||||
configuration = "Release" if self.release else "Debug"
|
configuration = 'Release' if self.release else 'Debug'
|
||||||
cmd = ["xcodebuild", "-project", "webrtc.xcodeproj", "-configuration",
|
cmd = ['xcodebuild', '-project', 'webrtc.xcodeproj', '-configuration',
|
||||||
configuration, "-target", "All"]
|
configuration, '-target', 'All']
|
||||||
self.AddCommonStep(cmd, descriptor=make_descriptor + ["(xcode)"],
|
self.AddCommonStep(cmd, descriptor=make_descriptor + ['(xcode)'],
|
||||||
workdir="build/trunk")
|
workdir='build/trunk')
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
class WebRTCWinFactory(WebRTCFactory):
|
class WebRTCWinFactory(WebRTCFactory):
|
||||||
"""A Build Factory affected by properties."""
|
"""Sets up the Windows build."""
|
||||||
|
|
||||||
def __init__(self, build_factory_properties=None, steps=None,
|
def __init__(self):
|
||||||
enable_coverage=False, account=None):
|
WebRTCFactory.__init__(self)
|
||||||
WebRTCFactory.__init__(self, build_factory_properties, steps,
|
|
||||||
enable_coverage, account)
|
|
||||||
self.configuration = "Debug"
|
|
||||||
self.platform = "x64"
|
|
||||||
self.allowed_platforms = ["x64", "Win32"]
|
|
||||||
self.allowed_configurations = ["Debug", "Release", "both"]
|
|
||||||
|
|
||||||
def EnableBuild(self, force_sync=True, platform="Win32",
|
self.configuration = 'Debug'
|
||||||
configuration="Debug", build_only=False):
|
self.platform = 'x64'
|
||||||
self.enable_build = True
|
self.allowed_platforms = ['x64', 'Win32']
|
||||||
|
self.allowed_configurations = ['Debug', 'Release', 'both']
|
||||||
|
|
||||||
|
def EnableBuild(self, force_sync=True, platform='Win32',
|
||||||
|
configuration='Debug', build_only=False):
|
||||||
|
self.build_enabled = True
|
||||||
self.force_sync = force_sync
|
self.force_sync = force_sync
|
||||||
"""Win specific Build"""
|
"""Win specific Build"""
|
||||||
if platform not in self.allowed_platforms:
|
if platform not in self.allowed_platforms:
|
||||||
print "*** INCORRECT PLATFORM (%s)!!! ***" % platform
|
print '*** INCORRECT PLATFORM (%s)!!! ***' % platform
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
self.platform = platform
|
self.platform = platform
|
||||||
if configuration not in self.allowed_configurations:
|
if configuration not in self.allowed_configurations:
|
||||||
print "*** INCORRECT CONFIGURATION (%s)!!! ***" % configuration
|
print '*** INCORRECT CONFIGURATION (%s)!!! ***' % configuration
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
self.configuration = configuration
|
self.configuration = configuration
|
||||||
if not build_only:
|
if not build_only:
|
||||||
self.AddCommonStep(["rm", "-rf", "trunk"], descriptor="Cleanup")
|
self.AddCommonStep(['rm', '-rf', 'trunk'], descriptor='Cleanup')
|
||||||
self.AddCommonStep(["gclient", "config", SVN_LOCATION],
|
self.AddCommonStep(['gclient', 'config', SVN_LOCATION],
|
||||||
descriptor="gclient_config")
|
descriptor='gclient_config')
|
||||||
cmd = ["gclient", "sync"]
|
cmd = ['gclient', 'sync']
|
||||||
if force_sync:
|
if force_sync:
|
||||||
cmd.append("--force")
|
cmd.append('--force')
|
||||||
self.AddCommonStep(cmd, descriptor="Sync")
|
self.AddCommonStep(cmd, descriptor='Sync')
|
||||||
|
|
||||||
if self.configuration == "Debug" or self.configuration == "both":
|
if self.configuration == 'Debug' or self.configuration == 'both':
|
||||||
cmd = ["msbuild", "webrtc.sln", "/t:Clean",
|
cmd = ['msbuild', 'webrtc.sln', '/t:Clean',
|
||||||
"/p:Configuration=Debug;Platform=%s" % (self.platform)]
|
'/p:Configuration=Debug;Platform=%s' % (self.platform)]
|
||||||
self.AddCommonStep(cmd, descriptor="Build_Clean", workdir="build/trunk")
|
self.AddCommonStep(cmd, descriptor='Build_Clean', workdir='build/trunk')
|
||||||
cmd = ["msbuild", "webrtc.sln",
|
cmd = ['msbuild', 'webrtc.sln',
|
||||||
"/p:Configuration=Debug;Platform=%s" % (self.platform)]
|
'/p:Configuration=Debug;Platform=%s' % (self.platform)]
|
||||||
self.AddCommonStep(cmd, descriptor="Build_Debug", workdir="build/trunk")
|
self.AddCommonStep(cmd, descriptor='Build_Debug', workdir='build/trunk')
|
||||||
if self.configuration == "Release" or self.configuration == "both":
|
if self.configuration == 'Release' or self.configuration == 'both':
|
||||||
cmd = ["msbuild", "webrtc.sln", "/t:Clean",
|
cmd = ['msbuild', 'webrtc.sln', '/t:Clean',
|
||||||
"/p:Configuration=Release;Platform=%s" % (self.platform)]
|
'/p:Configuration=Release;Platform=%s' % (self.platform)]
|
||||||
self.AddCommonStep(cmd, descriptor="Build_Clean", workdir="build/trunk")
|
self.AddCommonStep(cmd, descriptor='Build_Clean', workdir='build/trunk')
|
||||||
cmd = ["msbuild", "webrtc.sln",
|
cmd = ['msbuild', 'webrtc.sln',
|
||||||
"/p:Configuration=Release;Platform=%s" % (self.platform)]
|
'/p:Configuration=Release;Platform=%s' % (self.platform)]
|
||||||
self.AddCommonStep(cmd, descriptor="Build_Release", workdir="build/trunk")
|
self.AddCommonStep(cmd, descriptor='Build_Release', workdir='build/trunk')
|
||||||
|
|
||||||
def AddCommonTestRunStep(self, test, descriptor="", cmd=None,
|
def AddCommonTestRunStep(self, test, descriptor='', cmd=None,
|
||||||
workdir="build/trunk"):
|
workdir='build/trunk'):
|
||||||
test_descriptor = [test, descriptor]
|
test_descriptor = [test, descriptor]
|
||||||
if cmd is None:
|
if cmd is None:
|
||||||
if self.configuration == "Debug" or self.configuration == "both":
|
if self.configuration == 'Debug' or self.configuration == 'both':
|
||||||
cmd = ["build\Debug\%s.exe" % test]
|
cmd = ['build\Debug\%s.exe' % test]
|
||||||
self.AddCommonStep(cmd, descriptor=test_descriptor + ["Debug"],
|
self.AddCommonStep(cmd, descriptor=test_descriptor + ['Debug'],
|
||||||
workdir=workdir)
|
workdir=workdir)
|
||||||
if self.configuration == "Release" or self.configuration == "both":
|
if self.configuration == 'Release' or self.configuration == 'both':
|
||||||
cmd = ["build\Release\%s.exe" % test]
|
cmd = ['build\Release\%s.exe' % test]
|
||||||
self.AddCommonStep(cmd, descriptor=test_descriptor + ["Release"],
|
self.AddCommonStep(cmd, descriptor=test_descriptor + ['Release'],
|
||||||
workdir=workdir)
|
workdir=workdir)
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Utility functions
|
# Utility functions
|
||||||
|
|
||||||
|
|
||||||
class UnsupportedPlatformError(Exception):
|
class UnsupportedPlatformError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -550,9 +617,9 @@ def GetEnabledTests(test_dict, platform):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
test_dict: Dictionary mapping test names to tuples representing if the
|
test_dict: Dictionary mapping test names to tuples representing if the
|
||||||
test shall be enabled on each platform. Each tuple contains one boolean
|
test shall be enabled on each platform. Each tuple contains one
|
||||||
for each platform. The platforms are in the order specified by
|
boolean for each platform. The platforms are in the order specified
|
||||||
SUPPORTED_PLATFORMS.
|
by SUPPORTED_PLATFORMS.
|
||||||
platform: The platform we're looking to get the tests for.
|
platform: The platform we're looking to get the tests for.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@@ -562,7 +629,7 @@ def GetEnabledTests(test_dict, platform):
|
|||||||
UnsupportedPlatformError: if the platform supplied is not supported.
|
UnsupportedPlatformError: if the platform supplied is not supported.
|
||||||
"""
|
"""
|
||||||
if platform not in SUPPORTED_PLATFORMS:
|
if platform not in SUPPORTED_PLATFORMS:
|
||||||
raise UnsupportedPlatformError("*** UNSUPPORTED PLATFORM (%s)!!! ***" %
|
raise UnsupportedPlatformError('*** UNSUPPORTED PLATFORM (%s)!!! ***' %
|
||||||
platform)
|
platform)
|
||||||
result = []
|
result = []
|
||||||
platform_index = SUPPORTED_PLATFORMS.index(platform)
|
platform_index = SUPPORTED_PLATFORMS.index(platform)
|
||||||
|
|||||||
Reference in New Issue
Block a user