diff --git a/tools/valgrind-webrtc/gtest_exclude/OWNERS b/tools/valgrind-webrtc/gtest_exclude/OWNERS new file mode 100644 index 0000000000..241e560df6 --- /dev/null +++ b/tools/valgrind-webrtc/gtest_exclude/OWNERS @@ -0,0 +1,2 @@ +* + diff --git a/tools/valgrind-webrtc/webrtc_tests.py b/tools/valgrind-webrtc/webrtc_tests.py index f4ca611283..e1d42990dd 100755 --- a/tools/valgrind-webrtc/webrtc_tests.py +++ b/tools/valgrind-webrtc/webrtc_tests.py @@ -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__':