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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 | 356 |
357 def TestUIUnit(self): | 357 def TestUIUnit(self): |
358 return self.SimpleTest("chrome", "ui_unittests") | 358 return self.SimpleTest("chrome", "ui_unittests") |
359 | 359 |
360 def TestURL(self): | 360 def TestURL(self): |
361 return self.SimpleTest("chrome", "url_unittests") | 361 return self.SimpleTest("chrome", "url_unittests") |
362 | 362 |
363 def TestViews(self): | 363 def TestViews(self): |
364 return self.SimpleTest("views", "views_unittests") | 364 return self.SimpleTest("views", "views_unittests") |
365 | 365 |
| 366 def TestCloudPrint(self): |
| 367 return self.SimpleTest("cloud_print", "cloud_print_unittests") |
| 368 |
| 369 def TestCacheInvalidation(self): |
| 370 return self.SimpleTest("cacheinvalidation", "cacheinvalidation_unittests") |
| 371 |
| 372 def TestAddressInput(self): |
| 373 return self.SimpleTest("addressinput", "libaddressinput_unittests") |
| 374 |
| 375 def TestPhoneNumber(self): |
| 376 return self.SimpleTest("phonenumber", "libphonenumber_unittests") |
| 377 |
366 # Valgrind timeouts are in seconds. | 378 # Valgrind timeouts are in seconds. |
367 UI_VALGRIND_ARGS = ["--timeout=14400", "--trace_children", "--indirect"] | 379 UI_VALGRIND_ARGS = ["--timeout=14400", "--trace_children", "--indirect"] |
368 # UI test timeouts are in milliseconds. | 380 # UI test timeouts are in milliseconds. |
369 UI_TEST_ARGS = ["--ui-test-action-timeout=60000", | 381 UI_TEST_ARGS = ["--ui-test-action-timeout=60000", |
370 "--ui-test-action-max-timeout=150000", | 382 "--ui-test-action-max-timeout=150000", |
371 "--no-sandbox"] | 383 "--no-sandbox"] |
372 | 384 |
373 # TODO(thestig) fine-tune these values. | 385 # TODO(thestig) fine-tune these values. |
374 # Valgrind timeouts are in seconds. | 386 # Valgrind timeouts are in seconds. |
375 BROWSER_VALGRIND_ARGS = ["--timeout=50000", "--trace_children", "--indirect"] | 387 BROWSER_VALGRIND_ARGS = ["--timeout=50000", "--trace_children", "--indirect"] |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 "safe_browsing": TestSafeBrowsing, "safe_browsing_tests": TestSafeBrowsing, | 590 "safe_browsing": TestSafeBrowsing, "safe_browsing_tests": TestSafeBrowsing, |
579 "sandbox": TestLinuxSandbox, "sandbox_linux_unittests": TestLinuxSandbox, | 591 "sandbox": TestLinuxSandbox, "sandbox_linux_unittests": TestLinuxSandbox, |
580 "sql": TestSql, "sql_unittests": TestSql, | 592 "sql": TestSql, "sql_unittests": TestSql, |
581 "sync": TestSync, "sync_unit_tests": TestSync, | 593 "sync": TestSync, "sync_unit_tests": TestSync, |
582 "sync_integration_tests": TestSyncIntegration, | 594 "sync_integration_tests": TestSyncIntegration, |
583 "sync_integration": TestSyncIntegration, | 595 "sync_integration": TestSyncIntegration, |
584 "ui_unit": TestUIUnit, "ui_unittests": TestUIUnit, | 596 "ui_unit": TestUIUnit, "ui_unittests": TestUIUnit, |
585 "unit": TestUnit, "unit_tests": TestUnit, | 597 "unit": TestUnit, "unit_tests": TestUnit, |
586 "url": TestURL, "url_unittests": TestURL, | 598 "url": TestURL, "url_unittests": TestURL, |
587 "views": TestViews, "views_unittests": TestViews, | 599 "views": TestViews, "views_unittests": TestViews, |
| 600 "cloud_print": TestCloudPrint, |
| 601 "cloud_print_unittests": TestCloudPrint, |
| 602 "cacheinvalidation": TestCacheInvalidation, |
| 603 "cacheinvalidation_unittests": TestCacheInvalidation, |
| 604 "addressinput": TestAddressInput, |
| 605 "libaddressinput_unittests": TestAddressInput, |
| 606 "phonenumber": TestPhoneNumber, |
| 607 "libphonenumber_unittests": TestPhoneNumber, |
588 } | 608 } |
589 | 609 |
590 | 610 |
591 def _main(): | 611 def _main(): |
592 parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " | 612 parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " |
593 "[-t <test> ...]") | 613 "[-t <test> ...]") |
594 | 614 |
595 parser.add_option("--help-tests", dest="help_tests", action="store_true", | 615 parser.add_option("--help-tests", dest="help_tests", action="store_true", |
596 default=False, help="List all available tests") | 616 default=False, help="List all available tests") |
597 parser.add_option("-b", "--build-dir", | 617 parser.add_option("-b", "--build-dir", |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 | 675 |
656 for t in options.test: | 676 for t in options.test: |
657 tests = ChromeTests(options, args, t) | 677 tests = ChromeTests(options, args, t) |
658 ret = tests.Run() | 678 ret = tests.Run() |
659 if ret: return ret | 679 if ret: return ret |
660 return 0 | 680 return 0 |
661 | 681 |
662 | 682 |
663 if __name__ == "__main__": | 683 if __name__ == "__main__": |
664 sys.exit(_main()) | 684 sys.exit(_main()) |
OLD | NEW |