From 0594916a216bd78eba17d958a87458941a98de56 Mon Sep 17 00:00:00 2001 From: "andrew@webrtc.org" Date: Tue, 12 Jun 2012 03:32:18 +0000 Subject: [PATCH] Add audio_e2e_test to LinuxLargeTests. Ensure pulseaudio is running on the bot. BUG=none TEST=audio_e2e_test Review URL: https://webrtc-codereview.appspot.com/646004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2392 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../masters/master.webrtc/master.cfg | 1 + .../scripts/webrtc_buildbot/utils.py | 28 ++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/tools/continuous_build/build_internal/masters/master.webrtc/master.cfg b/tools/continuous_build/build_internal/masters/master.webrtc/master.cfg index ea5ddca1b..0dafae148 100755 --- a/tools/continuous_build/build_internal/masters/master.webrtc/master.cfg +++ b/tools/continuous_build/build_internal/masters/master.webrtc/master.cfg @@ -125,6 +125,7 @@ NORMAL_TESTS = { # Physical machine tests run on hardware with audio device and webcam present. PHYSICAL_MACHINE_TESTS = { # Test name Linux Mac Windows + 'audio_e2e_test': (True, False, False), 'audio_device_test_api': (False, False, False), # Issue 257+339 'video_render_module_test': (True, True, True), 'vie_auto_test': (True, True, True), diff --git a/tools/continuous_build/build_internal/scripts/webrtc_buildbot/utils.py b/tools/continuous_build/build_internal/scripts/webrtc_buildbot/utils.py index f39c014cc..1d59423ae 100755 --- a/tools/continuous_build/build_internal/scripts/webrtc_buildbot/utils.py +++ b/tools/continuous_build/build_internal/scripts/webrtc_buildbot/utils.py @@ -594,6 +594,7 @@ class WebRTCLinuxFactory(WebRTCFactory): self.compile_for_memory_tooling = compile_for_memory_tooling self.release = release + self._AddStartPulseAudioStep() self.AddSmartCleanStep() self.AddGclientSyncStep() @@ -760,10 +761,6 @@ class WebRTCLinuxFactory(WebRTCFactory): cmd = MakeCommandToRunTestInXvfb(['out/Debug/video_render_module_test']) self.AddCommonTestRunStep(test=test, cmd=cmd) elif test == 'voe_auto_test': - # Restart pulseaudio first to reduce risk of pulseaudio flakiness. - self.AddCommonStep(['/etc/init.d/pulseaudio', 'restart'], - 'restart pulseaudio') - # Set up the regular test run. binary = 'out/Debug/voe_auto_test' cmd = [binary, '--automated', '--gtest_filter=-RtpFuzzTest.*'] @@ -774,9 +771,32 @@ class WebRTCLinuxFactory(WebRTCFactory): cmd = MEMCHECK_CMD + [binary, ' ++automated', '++gtest_filter=RtpFuzzTest*'] self.AddCommonFyiStep(cmd=cmd, descriptor='voe_auto_test (fuzz tests)') + elif test == 'audio_e2e_test': + output_file = '/tmp/e2e_audio_out.pcm' + cmd = ('python tools/e2e_quality/audio/run_audio_test.py ' + '--input=/home/webrtc-cb/data/e2e_audio_in.pcm ' + '--output=%s --codec=L16 ' + '--compare="/home/webrtc-cb/bin/compare-audio +16000 +wb" ' + '--regexp="(\d\.\d{3})"' % output_file) + self.AddCommonStep(cmd, descriptor=test) + # Ensure anyone can read the output file, in case of problems. + cmd = 'chmod 644 %s' % output_file + self.AddCommonStep(cmd, descriptor='Make output file readable') + # TODO(andrew): how do we get the metric output to the dashboard? else: self.AddCommonTestRunStep(test) + def _AddStartPulseAudioStep(self): + # Ensure a PulseAudio daemon is running. The options here are taken from + # /etc/init.d/pulseaudio, with three exceptions: + # 1. --system has been removed; this requires root privileges. + # 2. --log-target=syslog has been removed in order to get logs on stdout + # for diagnosing problems. + # 3. -vvvv has been added for fully verbose logs. + cmd = ('/usr/bin/pulseaudio --start --daemonize --high-priority ' + '--disallow-module-loading=1 -vvvv') + self.AddCommonStep(cmd=cmd, descriptor='Start PulseAudio') + class WebRTCMacFactory(WebRTCFactory): """Sets up the Mac build, both for make and xcode."""