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

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

Issue 42082: Add hanging test to Purify gtest filter file. Report location of filter file... (Closed) Base URL: svn://chrome-svn/chrome/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 | « chrome/test/data/purify/ui_tests.gtest.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/env python 1 #!/bin/env 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 purify_test.py 8 ''' Runs various chrome tests through purify_test.py
9 ''' 9 '''
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 logging.info("running test %s" % (self._test)) 132 logging.info("running test %s" % (self._test))
133 return self._test_list[self._test]() 133 return self._test_list[self._test]()
134 134
135 def _ReadGtestFilterFile(self, name, cmd): 135 def _ReadGtestFilterFile(self, name, cmd):
136 '''Read a file which is a list of tests to filter out with --gtest_filter 136 '''Read a file which is a list of tests to filter out with --gtest_filter
137 and append the command-line option to cmd. 137 and append the command-line option to cmd.
138 ''' 138 '''
139 filters = [] 139 filters = []
140 filename = os.path.join(self._data_dir, name + ".gtest.txt") 140 filename = os.path.join(self._data_dir, name + ".gtest.txt")
141 if os.path.exists(filename): 141 if os.path.exists(filename):
142 logging.info("using gtest filter from %s" % filename)
142 f = open(filename, 'r') 143 f = open(filename, 'r')
143 for line in f.readlines(): 144 for line in f.readlines():
144 if line.startswith("#") or line.startswith("//") or line.isspace(): 145 if line.startswith("#") or line.startswith("//") or line.isspace():
145 continue 146 continue
146 line = line.rstrip() 147 line = line.rstrip()
147 filters.append(line) 148 filters.append(line)
148 gtest_filter = self._options.gtest_filter 149 gtest_filter = self._options.gtest_filter
149 if len(filters): 150 if len(filters):
150 if gtest_filter: 151 if gtest_filter:
151 gtest_filter += ":" 152 gtest_filter += ":"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 tests = ChromeTests(options, args, t) 372 tests = ChromeTests(options, args, t)
372 ret = tests.Run() 373 ret = tests.Run()
373 if ret: return ret 374 if ret: return ret
374 return 0 375 return 0
375 376
376 377
377 if __name__ == "__main__": 378 if __name__ == "__main__":
378 ret = _main(sys.argv) 379 ret = _main(sys.argv)
379 sys.exit(ret) 380 sys.exit(ret)
380 381
OLDNEW
« no previous file with comments | « chrome/test/data/purify/ui_tests.gtest.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698