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