Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: tools-webrtc/valgrind/webrtc_tests.py

Issue 2578093002: Move tools/valgrind-webrtc -> tools-webrtc/valgrind (Closed)
Patch Set: Sorted presubmit pylint exclusion Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools-webrtc/valgrind/valgrind-webrtc.gni ('k') | tools-webrtc/valgrind/webrtc_tests.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 """Runs various WebRTC tests through valgrind_test.py. 10 """Runs various WebRTC tests through valgrind_test.py.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 # Add gtest filters, if found. 60 # Add gtest filters, if found.
61 chrome_tests.ChromeTests._AppendGtestFilter(self, tool, self._test_name, 61 chrome_tests.ChromeTests._AppendGtestFilter(self, tool, self._test_name,
62 cmd) 62 cmd)
63 63
64 # When ChromeTests._DefaultCommand has executed, it has setup suppression 64 # When ChromeTests._DefaultCommand has executed, it has setup suppression
65 # files based on what's found in the memcheck/ subdirectory of 65 # files based on what's found in the memcheck/ subdirectory of
66 # this script's location. If Mac or Windows is executing, additional 66 # this script's location. If Mac or Windows is executing, additional
67 # platform specific files have also been added. 67 # platform specific files have also been added.
68 # Since only the ones located below this directory are added, we must also 68 # Since only the ones located below this directory are added, we must also
69 # add the ones maintained by Chrome, located in ../valgrind. 69 # add the ones maintained by Chrome, located in ../../tools/valgrind.
70 70
71 # The idea is to look for --suppression arguments in the cmd list and add a 71 # The idea is to look for --suppression arguments in the cmd list and add a
72 # modified copy of each suppression file, for the corresponding file in 72 # modified copy of each suppression file, for the corresponding file in
73 # ../valgrind. If we would simply replace 'valgrind-webrtc' with 'valgrind' 73 # ../../tools/valgrind.
74 # we may produce invalid paths if other parts of the path contain that
75 # string. That's why the code below only replaces the end of the path.
76 script_dir = path_utils.ScriptDir() 74 script_dir = path_utils.ScriptDir()
77 old_base, _ = os.path.split(script_dir) 75 checkout_src = os.path.abspath(os.path.join(script_dir, os.pardir,
78 new_dir = os.path.join(old_base, 'valgrind') 76 os.pardir))
77 new_dir = os.path.join(checkout_src, 'tools', 'valgrind')
79 add_suppressions = [] 78 add_suppressions = []
80 for token in cmd: 79 for token in cmd:
81 if '--suppressions' in token: 80 if '--suppressions' in token:
82 add_suppressions.append(token.replace(script_dir, new_dir)) 81 add_suppressions.append(token.replace(script_dir, new_dir))
83 return add_suppressions + cmd 82 return add_suppressions + cmd
84 83
85 84
86 def main(_): 85 def main(_):
87 parser = optparse.OptionParser( 86 parser = optparse.OptionParser(
88 'usage: %prog -b <dir> -t <test> -- <test args>') 87 'usage: %prog -b <dir> -t <test> -- <test args>')
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 if options.build_dir and not test_executable.startswith(options.build_dir): 142 if options.build_dir and not test_executable.startswith(options.build_dir):
144 test_executable = os.path.join(options.build_dir, test_executable) 143 test_executable = os.path.join(options.build_dir, test_executable)
145 args = [test_executable] + args 144 args = [test_executable] + args
146 145
147 test = WebRTCTest(options.test, options, args, 'cmdline') 146 test = WebRTCTest(options.test, options, args, 'cmdline')
148 return test.Run() 147 return test.Run()
149 148
150 if __name__ == '__main__': 149 if __name__ == '__main__':
151 return_code = main(sys.argv) 150 return_code = main(sys.argv)
152 sys.exit(return_code) 151 sys.exit(return_code)
OLDNEW
« no previous file with comments | « tools-webrtc/valgrind/valgrind-webrtc.gni ('k') | tools-webrtc/valgrind/webrtc_tests.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698