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

Side by Side Diff: tools/valgrind/chrome_tests.py

Issue 27079: Support for running unit-tests under valgrind on Mac (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « tools/purify/common.py ('k') | tools/valgrind/valgrind_test.py » ('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/python 1 #!/usr/bin/python
2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # chrome_tests.py 6 # chrome_tests.py
7 7
8 ''' Runs various chrome tests through valgrind_test.py. 8 ''' Runs various chrome tests through valgrind_test.py.
9 9
10 This file is a copy of ../purify/chrome_tests.py. Eventually, it would be nice 10 This file is a copy of ../purify/chrome_tests.py. Eventually, it would be nice
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 script_dir = google.path_utils.ScriptDir() 68 script_dir = google.path_utils.ScriptDir()
69 utility = layout_package.platform_utils.PlatformUtility(script_dir) 69 utility = layout_package.platform_utils.PlatformUtility(script_dir)
70 # Compute the top of the tree (the "source dir") from the script dir (where 70 # Compute the top of the tree (the "source dir") from the script dir (where
71 # this script lives). We assume that the script dir is in tools/valgrind/ 71 # this script lives). We assume that the script dir is in tools/valgrind/
72 # relative to the top of the tree. 72 # relative to the top of the tree.
73 self._source_dir = os.path.dirname(os.path.dirname(script_dir)) 73 self._source_dir = os.path.dirname(os.path.dirname(script_dir))
74 # since this path is used for string matching, make sure it's always 74 # since this path is used for string matching, make sure it's always
75 # an absolute Windows-style path 75 # an absolute Windows-style path
76 self._source_dir = utility.GetAbsolutePath(self._source_dir) 76 self._source_dir = utility.GetAbsolutePath(self._source_dir)
77 valgrind_test = os.path.join(script_dir, "valgrind_test.py") 77 valgrind_test = os.path.join(script_dir, "valgrind_test.py")
78 self._command_preamble = ["python", valgrind_test, "--echo_to_stdout", 78 self._command_preamble = ["python", valgrind_test,
79 "--source_dir=%s" % (self._source_dir)] 79 "--source_dir=%s" % (self._source_dir)]
80 80
81 def _DefaultCommand(self, module, exe=None): 81 def _DefaultCommand(self, module, exe=None):
82 '''Generates the default command array that most tests will use.''' 82 '''Generates the default command array that most tests will use.'''
83 module_dir = os.path.join(self._source_dir, module) 83 module_dir = os.path.join(self._source_dir, module)
84 84
85 # We need multiple data dirs, the current script directory and a module 85 # We need multiple data dirs, the current script directory and a module
86 # specific one. The global suppression file lives in our directory, and the 86 # specific one. The global suppression file lives in our directory, and the
87 # module specific suppression file lives with the module. 87 # module specific suppression file lives with the module.
88 self._data_dirs = [google.path_utils.ScriptDir()] 88 self._data_dirs = [google.path_utils.ScriptDir()]
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 for t in options.test: 347 for t in options.test:
348 tests = ChromeTests(options, args, t) 348 tests = ChromeTests(options, args, t)
349 ret = tests.Run() 349 ret = tests.Run()
350 if ret: return ret 350 if ret: return ret
351 return 0 351 return 0
352 352
353 353
354 if __name__ == "__main__": 354 if __name__ == "__main__":
355 ret = _main(sys.argv) 355 ret = _main(sys.argv)
356 sys.exit(ret) 356 sys.exit(ret)
357
OLDNEW
« no previous file with comments | « tools/purify/common.py ('k') | tools/valgrind/valgrind_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698