Making valgrind wrapper script work with test arguments
This is needed to be able to run memcheck/tsan/asan with command line arguments in the way the bots are executing the script (using --build_dir and --test arguments).
BUG=none
TEST=local execution
Review URL: https://webrtc-codereview.appspot.com/938015
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3106 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/tools/valgrind-webrtc/webrtc_tests.py b/tools/valgrind-webrtc/webrtc_tests.py
index 3ad73cb..028759f 100755
--- a/tools/valgrind-webrtc/webrtc_tests.py
+++ b/tools/valgrind-webrtc/webrtc_tests.py
@@ -123,7 +123,7 @@
# If --build_dir is provided, prepend that path to the test name to make it a
# valid path when running on the build slaves using Chromium's runtest.py
- if options.build_dir and 'cmdline' in options.test and len(args) == 1:
+ if options.build_dir and 'cmdline' in options.test:
args[0] = os.path.join(options.build_dir, args[0])
# Performs the deferred-argument black magic described in the usage.