| 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 # Disabling all unit tests | 463 # Disabling all unit tests |
| 464 # Problems reappeared after r119922 | 464 # Problems reappeared after r119922 |
| 465 if common.IsMac() and (self._options.valgrind_tool == "memcheck"): | 465 if common.IsMac() and (self._options.valgrind_tool == "memcheck"): |
| 466 logging.warning("unit_tests are disabled for memcheck on MacOS.") | 466 logging.warning("unit_tests are disabled for memcheck on MacOS.") |
| 467 return 0; | 467 return 0; |
| 468 return self.SimpleTest("chrome", "unit_tests") | 468 return self.SimpleTest("chrome", "unit_tests") |
| 469 | 469 |
| 470 def TestUIBaseUnit(self): | 470 def TestUIBaseUnit(self): |
| 471 return self.SimpleTest("chrome", "ui_base_unittests") | 471 return self.SimpleTest("chrome", "ui_base_unittests") |
| 472 | 472 |
| 473 def TestUIUnit(self): | |
| 474 return self.SimpleTest("chrome", "ui_unittests") | |
| 475 | |
| 476 def TestURL(self): | 473 def TestURL(self): |
| 477 return self.SimpleTest("chrome", "url_unittests") | 474 return self.SimpleTest("chrome", "url_unittests") |
| 478 | 475 |
| 479 def TestViews(self): | 476 def TestViews(self): |
| 480 return self.SimpleTest("views", "views_unittests") | 477 return self.SimpleTest("views", "views_unittests") |
| 481 | 478 |
| 482 | 479 |
| 483 # Valgrind timeouts are in seconds. | 480 # Valgrind timeouts are in seconds. |
| 484 UI_VALGRIND_ARGS = ["--timeout=14400", "--trace_children", "--indirect"] | 481 UI_VALGRIND_ARGS = ["--timeout=14400", "--trace_children", "--indirect"] |
| 485 # UI test timeouts are in milliseconds. | 482 # UI test timeouts are in milliseconds. |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 "ppapi": TestPPAPI, "ppapi_unittests": TestPPAPI, | 705 "ppapi": TestPPAPI, "ppapi_unittests": TestPPAPI, |
| 709 "printing": TestPrinting, "printing_unittests": TestPrinting, | 706 "printing": TestPrinting, "printing_unittests": TestPrinting, |
| 710 "remoting": TestRemoting, "remoting_unittests": TestRemoting, | 707 "remoting": TestRemoting, "remoting_unittests": TestRemoting, |
| 711 "safe_browsing": TestSafeBrowsing, "safe_browsing_tests": TestSafeBrowsing, | 708 "safe_browsing": TestSafeBrowsing, "safe_browsing_tests": TestSafeBrowsing, |
| 712 "sandbox": TestLinuxSandbox, "sandbox_linux_unittests": TestLinuxSandbox, | 709 "sandbox": TestLinuxSandbox, "sandbox_linux_unittests": TestLinuxSandbox, |
| 713 "sql": TestSql, "sql_unittests": TestSql, | 710 "sql": TestSql, "sql_unittests": TestSql, |
| 714 "sync": TestSync, "sync_unit_tests": TestSync, | 711 "sync": TestSync, "sync_unit_tests": TestSync, |
| 715 "sync_integration_tests": TestSyncIntegration, | 712 "sync_integration_tests": TestSyncIntegration, |
| 716 "sync_integration": TestSyncIntegration, | 713 "sync_integration": TestSyncIntegration, |
| 717 "ui_base_unit": TestUIBaseUnit, "ui_base_unittests": TestUIBaseUnit, | 714 "ui_base_unit": TestUIBaseUnit, "ui_base_unittests": TestUIBaseUnit, |
| 718 "ui_unit": TestUIUnit, "ui_unittests": TestUIUnit, | |
| 719 "unit": TestUnit, "unit_tests": TestUnit, | 715 "unit": TestUnit, "unit_tests": TestUnit, |
| 720 "url": TestURL, "url_unittests": TestURL, | 716 "url": TestURL, "url_unittests": TestURL, |
| 721 "views": TestViews, "views_unittests": TestViews, | 717 "views": TestViews, "views_unittests": TestViews, |
| 722 "webkit": TestLayout, | 718 "webkit": TestLayout, |
| 723 } | 719 } |
| 724 | 720 |
| 725 | 721 |
| 726 def _main(): | 722 def _main(): |
| 727 parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " | 723 parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " |
| 728 "[-t <test> ...]") | 724 "[-t <test> ...]") |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 | 792 |
| 797 for t in options.test: | 793 for t in options.test: |
| 798 tests = ChromeTests(options, args, t) | 794 tests = ChromeTests(options, args, t) |
| 799 ret = tests.Run() | 795 ret = tests.Run() |
| 800 if ret: return ret | 796 if ret: return ret |
| 801 return 0 | 797 return 0 |
| 802 | 798 |
| 803 | 799 |
| 804 if __name__ == "__main__": | 800 if __name__ == "__main__": |
| 805 sys.exit(_main()) | 801 sys.exit(_main()) |
| OLD | NEW |