Chromium Code Reviews| 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 471 # Disabling all unit tests | 471 # Disabling all unit tests |
| 472 # Problems reappeared after r119922 | 472 # Problems reappeared after r119922 |
| 473 if common.IsMac() and (self._options.valgrind_tool == "memcheck"): | 473 if common.IsMac() and (self._options.valgrind_tool == "memcheck"): |
| 474 logging.warning("unit_tests are disabled for memcheck on MacOS.") | 474 logging.warning("unit_tests are disabled for memcheck on MacOS.") |
| 475 return 0; | 475 return 0; |
| 476 return self.SimpleTest("chrome", "unit_tests") | 476 return self.SimpleTest("chrome", "unit_tests") |
| 477 | 477 |
| 478 def TestUIUnit(self): | 478 def TestUIUnit(self): |
| 479 return self.SimpleTest("chrome", "ui_unittests") | 479 return self.SimpleTest("chrome", "ui_unittests") |
| 480 | 480 |
| 481 def TestUIBaseUnit(self): | |
|
Lei Zhang
2014/10/21 10:43:57
Ideally in alphabetical order above ui_unittests.
| |
| 482 return self.SimpleTest("chrome", "ui_base_unittests") | |
| 483 | |
| 481 def TestURL(self): | 484 def TestURL(self): |
| 482 return self.SimpleTest("chrome", "url_unittests") | 485 return self.SimpleTest("chrome", "url_unittests") |
| 483 | 486 |
| 484 def TestViews(self): | 487 def TestViews(self): |
| 485 return self.SimpleTest("views", "views_unittests") | 488 return self.SimpleTest("views", "views_unittests") |
| 486 | 489 |
| 487 | 490 |
| 488 # Valgrind timeouts are in seconds. | 491 # Valgrind timeouts are in seconds. |
| 489 UI_VALGRIND_ARGS = ["--timeout=14400", "--trace_children", "--indirect"] | 492 UI_VALGRIND_ARGS = ["--timeout=14400", "--trace_children", "--indirect"] |
| 490 # UI test timeouts are in milliseconds. | 493 # UI test timeouts are in milliseconds. |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 717 "ppapi": TestPPAPI, "ppapi_unittests": TestPPAPI, | 720 "ppapi": TestPPAPI, "ppapi_unittests": TestPPAPI, |
| 718 "printing": TestPrinting, "printing_unittests": TestPrinting, | 721 "printing": TestPrinting, "printing_unittests": TestPrinting, |
| 719 "remoting": TestRemoting, "remoting_unittests": TestRemoting, | 722 "remoting": TestRemoting, "remoting_unittests": TestRemoting, |
| 720 "safe_browsing": TestSafeBrowsing, "safe_browsing_tests": TestSafeBrowsing, | 723 "safe_browsing": TestSafeBrowsing, "safe_browsing_tests": TestSafeBrowsing, |
| 721 "sandbox": TestLinuxSandbox, "sandbox_linux_unittests": TestLinuxSandbox, | 724 "sandbox": TestLinuxSandbox, "sandbox_linux_unittests": TestLinuxSandbox, |
| 722 "sql": TestSql, "sql_unittests": TestSql, | 725 "sql": TestSql, "sql_unittests": TestSql, |
| 723 "sync": TestSync, "sync_unit_tests": TestSync, | 726 "sync": TestSync, "sync_unit_tests": TestSync, |
| 724 "sync_integration_tests": TestSyncIntegration, | 727 "sync_integration_tests": TestSyncIntegration, |
| 725 "sync_integration": TestSyncIntegration, | 728 "sync_integration": TestSyncIntegration, |
| 726 "ui_unit": TestUIUnit, "ui_unittests": TestUIUnit, | 729 "ui_unit": TestUIUnit, "ui_unittests": TestUIUnit, |
| 730 "ui_base_unit": TestUIBaseUnit, "ui_base_unittests": TestUIBaseUnit, | |
| 727 "unit": TestUnit, "unit_tests": TestUnit, | 731 "unit": TestUnit, "unit_tests": TestUnit, |
| 728 "url": TestURL, "url_unittests": TestURL, | 732 "url": TestURL, "url_unittests": TestURL, |
| 729 "views": TestViews, "views_unittests": TestViews, | 733 "views": TestViews, "views_unittests": TestViews, |
| 730 "webkit": TestLayout, | 734 "webkit": TestLayout, |
| 731 } | 735 } |
| 732 | 736 |
| 733 | 737 |
| 734 def _main(): | 738 def _main(): |
| 735 parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " | 739 parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " |
| 736 "[-t <test> ...]") | 740 "[-t <test> ...]") |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 798 | 802 |
| 799 for t in options.test: | 803 for t in options.test: |
| 800 tests = ChromeTests(options, args, t) | 804 tests = ChromeTests(options, args, t) |
| 801 ret = tests.Run() | 805 ret = tests.Run() |
| 802 if ret: return ret | 806 if ret: return ret |
| 803 return 0 | 807 return 0 |
| 804 | 808 |
| 805 | 809 |
| 806 if __name__ == "__main__": | 810 if __name__ == "__main__": |
| 807 sys.exit(_main()) | 811 sys.exit(_main()) |
| OLD | NEW |