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
This commit is contained in:
kjellander@webrtc.org 2013-01-28 21:19:56 +00:00
parent e1888af9df
commit 9ae4c669ec
2 changed files with 7 additions and 2 deletions

2
DEPS
View File

@ -14,7 +14,7 @@ vars = {
# External resources like video and audio files used for testing purposes. # External resources like video and audio files used for testing purposes.
# Downloaded on demand when needed. # 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 # NOTE: Prefer revision numbers to tags for svn deps. Use http rather than

View File

@ -49,7 +49,7 @@ _LINUX_TESTS = {
'--gtest_filter=-RtpFuzzTest.*'], '--gtest_filter=-RtpFuzzTest.*'],
'audio_e2e_test': ['python', 'audio_e2e_test': ['python',
'run_audio_test.py', 'run_audio_test.py',
'--input=e2e_audio_in.pcm', '--input=../../resources/e2e_audio_in.pcm',
'--output=/tmp/e2e_audio_out.pcm', '--output=/tmp/e2e_audio_out.pcm',
'--codec=L16', '--codec=L16',
'--compare="~/bin/compare-audio +16000 +wb"', '--compare="~/bin/compare-audio +16000 +wb"',
@ -97,6 +97,11 @@ def main():
parser.error('Test "%s" is not supported (use --list to view supported ' parser.error('Test "%s" is not supported (use --list to view supported '
'tests).') '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 print 'Running WebRTC Buildbot tests: %s' % options.test
for test in options.test: for test in options.test:
cmd_line = test_dict[test] cmd_line = test_dict[test]