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/webrtc@3422 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/test/buildbot_tests.py b/test/buildbot_tests.py
index 0ddb948..a8d8e71 100755
--- a/test/buildbot_tests.py
+++ b/test/buildbot_tests.py
@@ -49,7 +49,7 @@
'--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 @@
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]