| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 return self.SimpleTest("mojo_service_manager", | 411 return self.SimpleTest("mojo_service_manager", |
| 412 "mojo_service_manager_unittests") | 412 "mojo_service_manager_unittests") |
| 413 | 413 |
| 414 def TestMojoViewManager(self): | 414 def TestMojoViewManager(self): |
| 415 return self.SimpleTest("mojo_view_manager", "mojo_view_manager_unittests") | 415 return self.SimpleTest("mojo_view_manager", "mojo_view_manager_unittests") |
| 416 | 416 |
| 417 def TestMojoViewManagerLib(self): | 417 def TestMojoViewManagerLib(self): |
| 418 return self.SimpleTest("mojo_view_manager_lib", | 418 return self.SimpleTest("mojo_view_manager_lib", |
| 419 "mojo_view_manager_lib_unittests") | 419 "mojo_view_manager_lib_unittests") |
| 420 | 420 |
| 421 def TestDisplay(self): |
| 422 return self.SimpleTest("display", "display_unittests") |
| 423 |
| 421 # Valgrind timeouts are in seconds. | 424 # Valgrind timeouts are in seconds. |
| 422 UI_VALGRIND_ARGS = ["--timeout=14400", "--trace_children", "--indirect"] | 425 UI_VALGRIND_ARGS = ["--timeout=14400", "--trace_children", "--indirect"] |
| 423 # UI test timeouts are in milliseconds. | 426 # UI test timeouts are in milliseconds. |
| 424 UI_TEST_ARGS = ["--ui-test-action-timeout=60000", | 427 UI_TEST_ARGS = ["--ui-test-action-timeout=60000", |
| 425 "--ui-test-action-max-timeout=150000", | 428 "--ui-test-action-max-timeout=150000", |
| 426 "--no-sandbox"] | 429 "--no-sandbox"] |
| 427 | 430 |
| 428 # TODO(thestig) fine-tune these values. | 431 # TODO(thestig) fine-tune these values. |
| 429 # Valgrind timeouts are in seconds. | 432 # Valgrind timeouts are in seconds. |
| 430 BROWSER_VALGRIND_ARGS = ["--timeout=50000", "--trace_children", "--indirect"] | 433 BROWSER_VALGRIND_ARGS = ["--timeout=50000", "--trace_children", "--indirect"] |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 "mojo_public_utility": TestMojoPublicUtility, | 657 "mojo_public_utility": TestMojoPublicUtility, |
| 655 "mojo_public_bindings": TestMojoPublicBindings, | 658 "mojo_public_bindings": TestMojoPublicBindings, |
| 656 "mojo_public_env": TestMojoPublicEnv, | 659 "mojo_public_env": TestMojoPublicEnv, |
| 657 "mojo_public_sysperf": TestMojoPublicSysPerf, | 660 "mojo_public_sysperf": TestMojoPublicSysPerf, |
| 658 "mojo_common": TestMojoCommon, | 661 "mojo_common": TestMojoCommon, |
| 659 "mojo_apps_js": TestMojoAppsJS, | 662 "mojo_apps_js": TestMojoAppsJS, |
| 660 "mojo_js": TestMojoJS, | 663 "mojo_js": TestMojoJS, |
| 661 "mojo_service_manager": TestMojoServiceManager, | 664 "mojo_service_manager": TestMojoServiceManager, |
| 662 "mojo_view_manager": TestMojoViewManager, | 665 "mojo_view_manager": TestMojoViewManager, |
| 663 "mojo_view_manager_lib": TestMojoViewManagerLib, | 666 "mojo_view_manager_lib": TestMojoViewManagerLib, |
| 667 "display": TestDisplay, |
| 664 } | 668 } |
| 665 | 669 |
| 666 | 670 |
| 667 def _main(): | 671 def _main(): |
| 668 parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " | 672 parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " |
| 669 "[-t <test> ...]") | 673 "[-t <test> ...]") |
| 670 | 674 |
| 671 parser.add_option("--help-tests", dest="help_tests", action="store_true", | 675 parser.add_option("--help-tests", dest="help_tests", action="store_true", |
| 672 default=False, help="List all available tests") | 676 default=False, help="List all available tests") |
| 673 parser.add_option("-b", "--build-dir", | 677 parser.add_option("-b", "--build-dir", |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 | 735 |
| 732 for t in options.test: | 736 for t in options.test: |
| 733 tests = ChromeTests(options, args, t) | 737 tests = ChromeTests(options, args, t) |
| 734 ret = tests.Run() | 738 ret = tests.Run() |
| 735 if ret: return ret | 739 if ret: return ret |
| 736 return 0 | 740 return 0 |
| 737 | 741 |
| 738 | 742 |
| 739 if __name__ == "__main__": | 743 if __name__ == "__main__": |
| 740 sys.exit(_main()) | 744 sys.exit(_main()) |
| OLD | NEW |