Add support for test disable files in webrtc_tests.py
Adding support for text files in tools/valgrind-webrtc/gtest_exclude that are used by the wrapper script for memory tool execution (webrtc_tests.py). This allows fine-grained disabling of tests using checked in text files instead of maintaining such in the buildbot config. For more details on naming of these text files and what to put in them, see: http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium/memory-sheriff#TOC-Excluding-tests TEST=local execution of tsan and memcheck on Linux, using an exclude file (done during development of http://review.webrtc.org/1647005) BUG=none R=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1648004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4212 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
1374965680
commit
6d6d95e2b8
2
tools/valgrind-webrtc/gtest_exclude/OWNERS
Normal file
2
tools/valgrind-webrtc/gtest_exclude/OWNERS
Normal file
@ -0,0 +1,2 @@
|
||||
*
|
||||
|
@ -44,15 +44,31 @@ class WebRTCTest(chrome_tests.ChromeTests):
|
||||
Everything else is inherited from chrome_tests.ChromeTests.
|
||||
"""
|
||||
|
||||
def __init__(self, test_name, options, args, test_in_chrome_tests):
|
||||
"""Create a WebRTC test.
|
||||
Args:
|
||||
test_name: Short name for the test executable (no path).
|
||||
options: options to pass to ChromeTests.
|
||||
args: args to pass to ChromeTests.
|
||||
test_in_chrome_tests: The name of the test configuration in ChromeTests.
|
||||
"""
|
||||
self._test_name = test_name
|
||||
chrome_tests.ChromeTests.__init__(self, options, args, test_in_chrome_tests)
|
||||
|
||||
def _DefaultCommand(self, tool, exe=None, valgrind_test_args=None):
|
||||
"""Override command-building method so we can add more suppressions."""
|
||||
cmd = chrome_tests.ChromeTests._DefaultCommand(self, tool, exe,
|
||||
valgrind_test_args)
|
||||
|
||||
# Add gtest filters, if found.
|
||||
chrome_tests.ChromeTests._AppendGtestFilter(self, tool, self._test_name,
|
||||
cmd)
|
||||
|
||||
# When ChromeTests._DefaultCommand has executed, it has setup suppression
|
||||
# files based on what's found in the memcheck/ or tsan/ subdirectories of
|
||||
# this script's location. If Mac or Windows is executing, additional
|
||||
# platform specific files have also been added.
|
||||
# Since only the ones located below this directory is added, we must also
|
||||
# Since only the ones located below this directory are added, we must also
|
||||
# add the ones maintained by Chrome, located in ../valgrind.
|
||||
|
||||
# The idea is to look for --suppression arguments in the cmd list and add a
|
||||
@ -110,7 +126,7 @@ def main(_):
|
||||
test_executable = os.path.join(options.build_dir, test_executable)
|
||||
args = [test_executable] + args
|
||||
|
||||
test = WebRTCTest(options, args, 'cmdline')
|
||||
test = WebRTCTest(options.test, options, args, 'cmdline')
|
||||
return test.Run()
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user