| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 valgrind_test.py.''' | 8 ''' Runs various chrome tests through valgrind_test.py.''' |
| 9 | 9 |
| 10 import glob | 10 import glob |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 257 |
| 258 def TestTestShell(self): | 258 def TestTestShell(self): |
| 259 return self.SimpleTest("webkit", "test_shell_tests") | 259 return self.SimpleTest("webkit", "test_shell_tests") |
| 260 | 260 |
| 261 def TestUnit(self): | 261 def TestUnit(self): |
| 262 return self.SimpleTest("chrome", "unit_tests") | 262 return self.SimpleTest("chrome", "unit_tests") |
| 263 | 263 |
| 264 def TestApp(self): | 264 def TestApp(self): |
| 265 return self.SimpleTest("chrome", "app_unittests") | 265 return self.SimpleTest("chrome", "app_unittests") |
| 266 | 266 |
| 267 def TestUIBase(self): | 267 def TestUIUnit(self): |
| 268 return self.SimpleTest("chrome", "ui_base_unittests") | 268 return self.SimpleTest("chrome", "ui_unittests") |
| 269 | 269 |
| 270 def TestGfx(self): | 270 def TestGfx(self): |
| 271 return self.SimpleTest("chrome", "gfx_unittests") | 271 return self.SimpleTest("chrome", "gfx_unittests") |
| 272 | 272 |
| 273 # Valgrind timeouts are in seconds. | 273 # Valgrind timeouts are in seconds. |
| 274 UI_VALGRIND_ARGS = ["--timeout=7200", "--trace_children", "--indirect"] | 274 UI_VALGRIND_ARGS = ["--timeout=7200", "--trace_children", "--indirect"] |
| 275 # UI test timeouts are in milliseconds. | 275 # UI test timeouts are in milliseconds. |
| 276 UI_TEST_ARGS = ["--ui-test-timeout=240000", | 276 UI_TEST_ARGS = ["--ui-test-timeout=240000", |
| 277 "--ui-test-action-timeout=120000", | 277 "--ui-test-action-timeout=120000", |
| 278 "--ui-test-action-max-timeout=280000", | 278 "--ui-test-action-max-timeout=280000", |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 "remoting": TestRemoting, "remoting_unittests": TestRemoting, | 435 "remoting": TestRemoting, "remoting_unittests": TestRemoting, |
| 436 "safe_browsing": TestSafeBrowsing, "safe_browsing_tests": TestSafeBrowsing, | 436 "safe_browsing": TestSafeBrowsing, "safe_browsing_tests": TestSafeBrowsing, |
| 437 "startup": TestStartup, "startup_tests": TestStartup, | 437 "startup": TestStartup, "startup_tests": TestStartup, |
| 438 "sync": TestSync, "sync_unit_tests": TestSync, | 438 "sync": TestSync, "sync_unit_tests": TestSync, |
| 439 "sync_integration_tests": TestSyncIntegration, | 439 "sync_integration_tests": TestSyncIntegration, |
| 440 "sync_integration": TestSyncIntegration, | 440 "sync_integration": TestSyncIntegration, |
| 441 "test_shell": TestTestShell, "test_shell_tests": TestTestShell, | 441 "test_shell": TestTestShell, "test_shell_tests": TestTestShell, |
| 442 "ui": TestUI, "ui_tests": TestUI, | 442 "ui": TestUI, "ui_tests": TestUI, |
| 443 "unit": TestUnit, "unit_tests": TestUnit, | 443 "unit": TestUnit, "unit_tests": TestUnit, |
| 444 "app": TestApp, "app_unittests": TestApp, | 444 "app": TestApp, "app_unittests": TestApp, |
| 445 "ui_base": TestUIBase, "ui_base_unittests": TestUIBase, | 445 "ui_unit": TestUIUnit, "ui_unittests": TestUIUnit, |
| 446 "gfx": TestGfx, "gfx_unittests": TestGfx, | 446 "gfx": TestGfx, "gfx_unittests": TestGfx, |
| 447 } | 447 } |
| 448 | 448 |
| 449 def _main(_): | 449 def _main(_): |
| 450 parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " | 450 parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " |
| 451 "[-t <test> ...]") | 451 "[-t <test> ...]") |
| 452 parser.disable_interspersed_args() | 452 parser.disable_interspersed_args() |
| 453 parser.add_option("-b", "--build_dir", | 453 parser.add_option("-b", "--build_dir", |
| 454 help="the location of the compiler output") | 454 help="the location of the compiler output") |
| 455 parser.add_option("-t", "--test", action="append", default=[], | 455 parser.add_option("-t", "--test", action="append", default=[], |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 for t in options.test: | 490 for t in options.test: |
| 491 tests = ChromeTests(options, args, t) | 491 tests = ChromeTests(options, args, t) |
| 492 ret = tests.Run() | 492 ret = tests.Run() |
| 493 if ret: return ret | 493 if ret: return ret |
| 494 return 0 | 494 return 0 |
| 495 | 495 |
| 496 | 496 |
| 497 if __name__ == "__main__": | 497 if __name__ == "__main__": |
| 498 ret = _main(sys.argv) | 498 ret = _main(sys.argv) |
| 499 sys.exit(ret) | 499 sys.exit(ret) |
| OLD | NEW |