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 heapcheck_test.py. | 6 ''' Runs various chrome tests through heapcheck_test.py. |
7 | 7 |
8 Most of this code is copied from ../valgrind/chrome_tests.py. | 8 Most of this code is copied from ../valgrind/chrome_tests.py. |
9 TODO(glider): put common functions to a standalone module. | 9 TODO(glider): put common functions to a standalone module. |
10 ''' | 10 ''' |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 "courgette_unittests": self.TestCourgette, | 89 "courgette_unittests": self.TestCourgette, |
90 "ipc": self.TestIpc, "ipc_tests": self.TestIpc, | 90 "ipc": self.TestIpc, "ipc_tests": self.TestIpc, |
91 "layout": self.TestLayout, "layout_tests": self.TestLayout, | 91 "layout": self.TestLayout, "layout_tests": self.TestLayout, |
92 "media": self.TestMedia, "media_unittests": self.TestMedia, | 92 "media": self.TestMedia, "media_unittests": self.TestMedia, |
93 "net": self.TestNet, "net_unittests": self.TestNet, | 93 "net": self.TestNet, "net_unittests": self.TestNet, |
94 "printing": self.TestPrinting, "printing_unittests": self.TestPrinting, | 94 "printing": self.TestPrinting, "printing_unittests": self.TestPrinting, |
95 "remoting": self.TestRemoting, "remoting_unittests": self.TestRemoting, | 95 "remoting": self.TestRemoting, "remoting_unittests": self.TestRemoting, |
96 "startup": self.TestStartup, "startup_tests": self.TestStartup, | 96 "startup": self.TestStartup, "startup_tests": self.TestStartup, |
97 "sync": self.TestSync, "sync_unit_tests": self.TestSync, | 97 "sync": self.TestSync, "sync_unit_tests": self.TestSync, |
98 "test_shell": self.TestTestShell, "test_shell_tests": self.TestTestShell, | 98 "test_shell": self.TestTestShell, "test_shell_tests": self.TestTestShell, |
99 "ui": self.TestUI, "ui_tests": self.TestUI, | |
100 "unit": self.TestUnit, "unit_tests": self.TestUnit, | 99 "unit": self.TestUnit, "unit_tests": self.TestUnit, |
101 "views": self.TestViews, "views_unittests": self.TestViews, | 100 "views": self.TestViews, "views_unittests": self.TestViews, |
102 "sql": self.TestSql, "sql_unittests": self.TestSql, | 101 "sql": self.TestSql, "sql_unittests": self.TestSql, |
103 "ui_unit": self.TestUIUnit, "ui_unittests": self.TestUIUnit, | 102 "ui_unit": self.TestUIUnit, "ui_unittests": self.TestUIUnit, |
104 "gfx": self.TestGfx, "gfx_unittests": self.TestGfx, | 103 "gfx": self.TestGfx, "gfx_unittests": self.TestGfx, |
105 } | 104 } |
106 | 105 |
107 if test not in self._test_list: | 106 if test not in self._test_list: |
108 raise TestNotFound("Unknown test: %s" % test) | 107 raise TestNotFound("Unknown test: %s" % test) |
109 | 108 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 303 |
305 def TestSql(self): | 304 def TestSql(self): |
306 return self.SimpleTest("chrome", "sql_unittests") | 305 return self.SimpleTest("chrome", "sql_unittests") |
307 | 306 |
308 def TestUIUnit(self): | 307 def TestUIUnit(self): |
309 return self.SimpleTest("chrome", "ui_unittests") | 308 return self.SimpleTest("chrome", "ui_unittests") |
310 | 309 |
311 def TestGfx(self): | 310 def TestGfx(self): |
312 return self.SimpleTest("chrome", "gfx_unittests") | 311 return self.SimpleTest("chrome", "gfx_unittests") |
313 | 312 |
314 def TestUI(self): | |
315 return self.SimpleTest("chrome", "ui_tests", | |
316 cmd_args=[ | |
317 "--ui-test-action-timeout=80000", | |
318 "--ui-test-action-max-timeout=180000"]) | |
319 | |
320 def TestLayoutChunk(self, chunk_num, chunk_size): | 313 def TestLayoutChunk(self, chunk_num, chunk_size): |
321 '''Runs tests [chunk_num*chunk_size .. (chunk_num+1)*chunk_size). | 314 '''Runs tests [chunk_num*chunk_size .. (chunk_num+1)*chunk_size). |
322 | 315 |
323 Wrap around to beginning of list at end. If chunk_size is zero, run all | 316 Wrap around to beginning of list at end. If chunk_size is zero, run all |
324 tests in the list once. If a text file is given as argument, it is used as | 317 tests in the list once. If a text file is given as argument, it is used as |
325 the list of tests. | 318 the list of tests. |
326 ''' | 319 ''' |
327 # Build the ginormous commandline in 'cmd'. | 320 # Build the ginormous commandline in 'cmd'. |
328 # It's going to be roughly | 321 # It's going to be roughly |
329 # python heapcheck_test.py ... python run_webkit_tests.py ... | 322 # python heapcheck_test.py ... python run_webkit_tests.py ... |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 for t in options.test: | 455 for t in options.test: |
463 tests = ChromeTests(options, args, t) | 456 tests = ChromeTests(options, args, t) |
464 ret = tests.Run() | 457 ret = tests.Run() |
465 if ret: | 458 if ret: |
466 return ret | 459 return ret |
467 return 0 | 460 return 0 |
468 | 461 |
469 | 462 |
470 if __name__ == "__main__": | 463 if __name__ == "__main__": |
471 sys.exit(main()) | 464 sys.exit(main()) |
OLD | NEW |