OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 ''' Runs various chrome tests through valgrind_test.py.''' | 6 ''' Runs various chrome tests through valgrind_test.py.''' |
7 | 7 |
8 import glob | 8 import glob |
9 import logging | 9 import logging |
10 import multiprocessing | 10 import multiprocessing |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 return cmd | 167 return cmd |
168 | 168 |
169 def Run(self): | 169 def Run(self): |
170 ''' Runs the test specified by command-line argument --test ''' | 170 ''' Runs the test specified by command-line argument --test ''' |
171 logging.info("running test %s" % (self._test)) | 171 logging.info("running test %s" % (self._test)) |
172 return self._test_list[self._test](self) | 172 return self._test_list[self._test](self) |
173 | 173 |
174 def _AppendGtestFilter(self, tool, name, cmd): | 174 def _AppendGtestFilter(self, tool, name, cmd): |
175 '''Append an appropriate --gtest_filter flag to the googletest binary | 175 '''Append an appropriate --gtest_filter flag to the googletest binary |
176 invocation. | 176 invocation. |
177 If the user passed his own filter mentioning only one test, just use it. | 177 If the user passed their own filter mentioning only one test, just use |
178 Othewise, filter out tests listed in the appropriate gtest_exclude files. | 178 it. Otherwise, filter out tests listed in the appropriate gtest_exclude |
| 179 files. |
179 ''' | 180 ''' |
180 if (self._gtest_filter and | 181 if (self._gtest_filter and |
181 ":" not in self._gtest_filter and | 182 ":" not in self._gtest_filter and |
182 "?" not in self._gtest_filter and | 183 "?" not in self._gtest_filter and |
183 "*" not in self._gtest_filter): | 184 "*" not in self._gtest_filter): |
184 cmd.append("--gtest_filter=%s" % self._gtest_filter) | 185 cmd.append("--gtest_filter=%s" % self._gtest_filter) |
185 return | 186 return |
186 | 187 |
187 filters = [] | 188 filters = [] |
188 gtest_files_dir = os.path.join(path_utils.ScriptDir(), "gtest_exclude") | 189 gtest_files_dir = os.path.join(path_utils.ScriptDir(), "gtest_exclude") |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 return 0 | 850 return 0 |
850 | 851 |
851 tests = ChromeTests(options, args, t) | 852 tests = ChromeTests(options, args, t) |
852 ret = tests.Run() | 853 ret = tests.Run() |
853 if ret: return ret | 854 if ret: return ret |
854 return 0 | 855 return 0 |
855 | 856 |
856 | 857 |
857 if __name__ == "__main__": | 858 if __name__ == "__main__": |
858 sys.exit(_main()) | 859 sys.exit(_main()) |
OLD | NEW |