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

Unified Diff: tools/heapcheck/chrome_tests.py

Issue 7659011: Slightly tweak the tools/heapcheck/chrome_tests.py script to read less gtest filter files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/heapcheck/chrome_tests.py
===================================================================
--- tools/heapcheck/chrome_tests.py (revision 92995)
+++ tools/heapcheck/chrome_tests.py (working copy)
@@ -134,20 +134,6 @@
Returns:
A string with the command to run the test.
'''
- module_dir = os.path.join(self._source_dir, module)
-
- # We need multiple data dirs, the current script directory and a module
- # specific one. The global suppression file lives in our directory, and the
- # module specific suppression file lives with the module.
- self._data_dirs = [path_utils.ScriptDir()]
-
- if module == "chrome":
- # Unfortunately, not all modules have the same directory structure.
- self._data_dirs.append(os.path.join(module_dir, "test", "data",
- "heapcheck"))
- else:
- self._data_dirs.append(os.path.join(module_dir, "data", "heapcheck"))
-
if not self._options.build_dir:
dirs = [
os.path.join(self._source_dir, "xcodebuild", "Debug"),
@@ -175,13 +161,13 @@
def Suppressions(self):
'''Builds the list of available suppressions files.'''
ret = []
- for directory in self._data_dirs:
- suppression_file = os.path.join(directory, "suppressions.txt")
- if os.path.exists(suppression_file):
- ret.append(suppression_file)
- suppression_file = os.path.join(directory, "suppressions_linux.txt")
- if os.path.exists(suppression_file):
- ret.append(suppression_file)
+ directory = path_utils.ScriptDir()
+ suppression_file = os.path.join(directory, "suppressions.txt")
+ if os.path.exists(suppression_file):
+ ret.append(suppression_file)
+ suppression_file = os.path.join(directory, "suppressions_linux.txt")
+ if os.path.exists(suppression_file):
+ ret.append(suppression_file)
return ret
def Run(self):
@@ -198,20 +184,26 @@
cmd: the test running command line to be modified.
'''
filters = []
- for directory in self._data_dirs:
- gtest_filter_files = [
- os.path.join(directory, name + ".gtest.txt"),
Timur Iskhodzhanov 2011/08/16 09:46:05 we don't use this
- os.path.join(directory, name + ".gtest-heapcheck.txt"),
- os.path.join(directory, name + ".gtest_linux.txt")]
Timur Iskhodzhanov 2011/08/16 09:46:05 we don't use this yet
- for filename in gtest_filter_files:
- if os.path.exists(filename):
- logging.info("reading gtest filters from %s" % filename)
- f = open(filename, 'r')
- for line in f.readlines():
- if line.startswith("#") or line.startswith("//") or line.isspace():
- continue
- line = line.rstrip()
- filters.append(line)
+ directory = path_utils.ScriptDir()
+ gtest_filter_files = [
+ os.path.join(directory, name + ".gtest-heapcheck.txt"),
+ # TODO(glider): Linux vs. CrOS?
+ ]
+ logging.info("Reading gtest exclude filter files:")
+ for filename in gtest_filter_files:
+ # strip the leading absolute path (may be very long on the bot)
+ # and the following / or \.
+ readable_filename = filename.replace(self._source_dir, "")[1:]
+ if not os.path.exists(filename):
+ logging.info(" \"%s\" - not found" % readable_filename)
+ continue
+ logging.info(" \"%s\" - OK" % readable_filename)
+ f = open(filename, 'r')
+ for line in f.readlines():
+ if line.startswith("#") or line.startswith("//") or line.isspace():
+ continue
+ line = line.rstrip()
+ filters.append(line)
gtest_filter = self._options.gtest_filter
if len(filters):
if gtest_filter:
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698