From 9ae4c669ecf59677dbccf1515bc2ed1a35de2842 Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Mon, 28 Jan 2013 21:19:56 +0000 Subject: [PATCH] Set working dir for test run script + update resources By changing the working directory for the executing script to the same directory as the script is located in, it is possible to run the script standing in a higher-level directory (otherwise the input file relative paths become invalid). This CL also changes the input file path for the audio_e2e_test test to assume the file is located resources. BUG=none TEST=locally executed the tests standing in trunk/ Review URL: https://webrtc-codereview.appspot.com/1061009 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3422 4adac7df-926f-26a2-2b94-8c16560cd09d --- DEPS | 2 +- webrtc/test/buildbot_tests.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 3189012b98..c49e85ee67 100644 --- a/DEPS +++ b/DEPS @@ -14,7 +14,7 @@ vars = { # External resources like video and audio files used for testing purposes. # Downloaded on demand when needed. - "webrtc_resources_revision": "13", + "webrtc_resources_revision": "14", } # NOTE: Prefer revision numbers to tags for svn deps. Use http rather than diff --git a/webrtc/test/buildbot_tests.py b/webrtc/test/buildbot_tests.py index 0ddb948db4..a8d8e71cf4 100755 --- a/webrtc/test/buildbot_tests.py +++ b/webrtc/test/buildbot_tests.py @@ -49,7 +49,7 @@ _LINUX_TESTS = { '--gtest_filter=-RtpFuzzTest.*'], 'audio_e2e_test': ['python', 'run_audio_test.py', - '--input=e2e_audio_in.pcm', + '--input=../../resources/e2e_audio_in.pcm', '--output=/tmp/e2e_audio_out.pcm', '--codec=L16', '--compare="~/bin/compare-audio +16000 +wb"', @@ -97,6 +97,11 @@ def main(): parser.error('Test "%s" is not supported (use --list to view supported ' 'tests).') + # Change current working directory to the script's dir to make the relative + # paths always work. + os.chdir(_CURRENT_DIR) + print 'Changed working directory to: %s' % _CURRENT_DIR + print 'Running WebRTC Buildbot tests: %s' % options.test for test in options.test: cmd_line = test_dict[test]