OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 ''' Runs various chrome tests through heapcheck_test.py. | 7 ''' Runs various chrome tests through heapcheck_test.py. |
8 | 8 |
9 Most of this code is copied from ../valgrind/chrome_tests.py. | 9 Most of this code is copied from ../valgrind/chrome_tests.py. |
10 TODO(glider): put common functions to a standalone module. | 10 TODO(glider): put common functions to a standalone module. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 "googleurl": self.TestGURL, "googleurl_unittests": self.TestGURL, | 84 "googleurl": self.TestGURL, "googleurl_unittests": self.TestGURL, |
85 "courgette": self.TestCourgette, | 85 "courgette": self.TestCourgette, |
86 "courgette_unittests": self.TestCourgette, | 86 "courgette_unittests": self.TestCourgette, |
87 "ipc": self.TestIpc, "ipc_tests": self.TestIpc, | 87 "ipc": self.TestIpc, "ipc_tests": self.TestIpc, |
88 "layout": self.TestLayout, "layout_tests": self.TestLayout, | 88 "layout": self.TestLayout, "layout_tests": self.TestLayout, |
89 "media": self.TestMedia, "media_unittests": self.TestMedia, | 89 "media": self.TestMedia, "media_unittests": self.TestMedia, |
90 "net": self.TestNet, "net_unittests": self.TestNet, | 90 "net": self.TestNet, "net_unittests": self.TestNet, |
91 "printing": self.TestPrinting, "printing_unittests": self.TestPrinting, | 91 "printing": self.TestPrinting, "printing_unittests": self.TestPrinting, |
92 "remoting": self.TestRemoting, "remoting_unittests": self.TestRemoting, | 92 "remoting": self.TestRemoting, "remoting_unittests": self.TestRemoting, |
93 "startup": self.TestStartup, "startup_tests": self.TestStartup, | 93 "startup": self.TestStartup, "startup_tests": self.TestStartup, |
| 94 "sync": self.TestSync, "sync_unit_tests": self.TestSync, |
94 "test_shell": self.TestTestShell, "test_shell_tests": self.TestTestShell, | 95 "test_shell": self.TestTestShell, "test_shell_tests": self.TestTestShell, |
95 "ui": self.TestUI, "ui_tests": self.TestUI, | 96 "ui": self.TestUI, "ui_tests": self.TestUI, |
96 "unit": self.TestUnit, "unit_tests": self.TestUnit, | 97 "unit": self.TestUnit, "unit_tests": self.TestUnit, |
97 "app": self.TestApp, "app_unittests": self.TestApp, | 98 "app": self.TestApp, "app_unittests": self.TestApp, |
98 } | 99 } |
99 | 100 |
100 if test not in self._test_list: | 101 if test not in self._test_list: |
101 raise TestNotFound("Unknown test: %s" % test) | 102 raise TestNotFound("Unknown test: %s" % test) |
102 | 103 |
103 self._options = options | 104 self._options = options |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 261 |
261 def TestMedia(self): | 262 def TestMedia(self): |
262 return self.SimpleTest("chrome", "media_unittests") | 263 return self.SimpleTest("chrome", "media_unittests") |
263 | 264 |
264 def TestPrinting(self): | 265 def TestPrinting(self): |
265 return self.SimpleTest("chrome", "printing_unittests") | 266 return self.SimpleTest("chrome", "printing_unittests") |
266 | 267 |
267 def TestRemoting(self): | 268 def TestRemoting(self): |
268 return self.SimpleTest("chrome", "remoting_unittests") | 269 return self.SimpleTest("chrome", "remoting_unittests") |
269 | 270 |
| 271 def TestSync(self): |
| 272 return self.SimpleTest("chrome", "sync_unit_tests") |
| 273 |
270 def TestIpc(self): | 274 def TestIpc(self): |
271 return self.SimpleTest("ipc", "ipc_tests") | 275 return self.SimpleTest("ipc", "ipc_tests") |
272 | 276 |
273 def TestNet(self): | 277 def TestNet(self): |
274 return self.SimpleTest("net", "net_unittests") | 278 return self.SimpleTest("net", "net_unittests") |
275 | 279 |
276 def TestStartup(self): | 280 def TestStartup(self): |
277 # We don't need the performance results, we're just looking for pointer | 281 # We don't need the performance results, we're just looking for pointer |
278 # errors, so set number of iterations down to the minimum. | 282 # errors, so set number of iterations down to the minimum. |
279 os.putenv("STARTUP_TESTS_NUMCYCLES", "1") | 283 os.putenv("STARTUP_TESTS_NUMCYCLES", "1") |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 return 0 | 447 return 0 |
444 | 448 |
445 | 449 |
446 if __name__ == "__main__": | 450 if __name__ == "__main__": |
447 if sys.platform == 'linux2': | 451 if sys.platform == 'linux2': |
448 ret = _main(sys.argv) | 452 ret = _main(sys.argv) |
449 else: | 453 else: |
450 logging.error("Heap checking works only on Linux at the moment.") | 454 logging.error("Heap checking works only on Linux at the moment.") |
451 ret = 1 | 455 ret = 1 |
452 sys.exit(ret) | 456 sys.exit(ret) |
OLD | NEW |