In https://codereview.chromium.org/26190002 Chromium
started a cleanup of their wrapper script, by adding
the --target flag and start passing build dir similar
to how the bots are setting it (i.e. pass out and not
out/Release).
This CL adds --target support for our wrapper script,
without changing the existing behavior (I'll do a
larger update at a later stage).
BUG=none
TEST=Ran the following successfully:
tools/valgrind-webrtc/webrtc_tests.sh --build_dir out/Release --target Release --test test_support_unittests
tools/valgrind-webrtc/webrtc_tests.sh --build_dir out --target Release --test test_support_unittests
tools/valgrind-webrtc/webrtc_tests.sh --target Release --test out/Release/test_support_unittests
TBR=phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2396004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4957 4adac7df-926f-26a2-2b94-8c16560cd09d
The change in r3354 caused the --tool argument to not be parsed if it's passed after the test executable. Then it's considered an argument to the test rather than a script flag.
This CL cleans the code a bit and makes it possible to pass all the supported argument in the different ways possible.
NOTICE: To pass arguments to the test executable, you must use the -- argument must be specified before the test arguments start, to signal that everything that comes after it are positional arguments only (which are passed on to the test during execution).
BUG=none
TEST=The following combinations have been tested:
tools/valgrind-webrtc/webrtc_tests.sh -b out/Debug -t test_support_unittests --tool asan
tools/valgrind-webrtc/webrtc_tests.sh -b out/Debug -t test_support_unittests --tool asan -- --foo --bar
tools/valgrind-webrtc/webrtc_tests.sh --tool asan -b out/Debug -t test_support_unittests
tools/valgrind-webrtc/webrtc_tests.sh --tool asan -b out/Debug -t test_support_unittests -- --foo --bar
Review URL: https://webrtc-codereview.appspot.com/1026005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3355 4adac7df-926f-26a2-2b94-8c16560cd09d
* Clarified that the test only supports specifying a single test (multiple didn't work before, so better not claim to support it).
* No longer needs test executable arguments to use ++ instead of --
* Only appends the build_dir path to the test executable if not already
present.
* Simplified suppression path handling.
* Fixed crash when -v was used (import logging was missing)
* Style fixes.
* Thorougly tested with all the supported flags.
I noted that the --gtest_filter flag does not work as expected (it's
only for 'additional gtest_filter arguments', which seems to mean
additional arguments to the gtest filter text files that are used by
Chrome. I left it in here anyway. If --gtest_filter is given after the
test executable it will work, since those arguments are added straight
to the test executable
the test
BUG=none
TEST=I ran the following commands and verified that the suppressions and flags were handled correct:
tools/valgrind-webrtc/webrtc_tests.sh -v --gtest_repeat=2 --keep_logs --tool_flags=--trace-children=yes -t out/Debug/test_support_unittests --foo --bar
tools/valgrind-webrtc/webrtc_tests.sh -v --gtest_repeat=2 --keep_logs --tool_flags=--trace-children=yes -b out/Debug -t test_support_unittests --foo --bar
tools/valgrind-webrtc/webrtc_tests.sh -v --gtest_repeat=2 --keep_logs --tool_flags=--trace-children=yes -b out/Debug -t out/Debug/test_support_unittests --foo --bar
tools/valgrind-webrtc/webrtc_tests.sh -v --tool=tsan --gtest_repeat=2 --keep_logs --tool_flags=--trace-children=yes -t out/Debug/test_support_unittests --foo --bar
tools/valgrind-webrtc/webrtc_tests.sh -v --tool=tsan --gtest_repeat=2 --keep_logs --tool_flags=--trace-children=yes -b out/Debug -t test_support_unittests --foo --bar
tools/valgrind-webrtc/webrtc_tests.sh -v --tool=tsan --gtest_repeat=2 --keep_logs --tool_flags=--trace-children=yes -b out/Debug -t out/Debug/test_support_unittests --foo --bar
Review URL: https://webrtc-codereview.appspot.com/1029005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3354 4adac7df-926f-26a2-2b94-8c16560cd09d
This is also needed to make it possible to run unit tests easily using Chromium's buildbot source code.
BUG=None
TEST=tools/valgrind-webrtc/webrtc_tests.sh --test test_support_unittests --build_dir=out/Debug
Review URL: https://webrtc-codereview.appspot.com/784007
git-svn-id: http://webrtc.googlecode.com/svn/trunk@2738 4adac7df-926f-26a2-2b94-8c16560cd09d
Skeleton suppression files for future WebRTC suppressions are added and are included in addition to the ones Chrome are using and maintaining when our wrapper script executes.
Also added tweaked PRESUBMIT checks based on the Chrome code, that verifies
that suppressions are added correctly. I tested that they work by adding an invalid
suppression.
BUG=544
TEST=Tested running tools/valgrind-webrtc/webrtc_tests.sh --tool=tsan -t out/Debug/system_wrappers_unittests and it reports far less errors. Tested adding bad suppression and it was caught by the PRESUBMIT check.
Review URL: https://webrtc-codereview.appspot.com/601004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@2304 4adac7df-926f-26a2-2b94-8c16560cd09d
To be able to re-use as much as possible from Chromium's scripts, I've created two customized scripts for running tests:
- webrtc_tests.py: a customized version of chrome_tests.py with WebRTC tests instead.
- webrtc_tests.sh: a customized version of the chrome_tests.sh wrapper script, to launch the above script.
The webrtc_tests.sh script is setting up PYTHONPATH so that tools/valgrind is available for the webrtc_tests.py script.
The webrtc_tests.py script inherits the chrome_tests.py script as much as possible, to minimize maintenance and maximize readability.
Having this mirrored setup of directories, allows us to use the same directory hierarchy for suppression files too. This CL only adds suppression files for memcheck, but we can add files for tsan later easily.
The suppression file is currently empty for Linux. For Mac I copied all the Chromium third-party suppressions. We will need a lot more added for Mac before Valgrind runs becomes usable for that platform.
The platform specific naming of the suppression files are handled automatically when webrtc_tests.sh is used to launch the tests.
Example:
Plain memcheck (default tool): tools/valgrind-webrtc/webrtc_tests.sh -t system_wrappers
Run ThreadSanitizer: tools/valgrind-webrtc/webrtc_tests.sh --tool=tsan -t system_wrappers
Previously mentioned AddressSanitizer requires additional scripts to be added and it not covered in this CL.
BUG=
TEST=
Review URL: http://webrtc-codereview.appspot.com/322010
git-svn-id: http://webrtc.googlecode.com/svn/trunk@1240 4adac7df-926f-26a2-2b94-8c16560cd09d