| 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 parser.add_option("--help-tests", dest="help_tests", action="store_true", | 728 parser.add_option("--help-tests", dest="help_tests", action="store_true", |
| 729 default=False, help="List all available tests") | 729 default=False, help="List all available tests") |
| 730 parser.add_option("-b", "--build-dir", | 730 parser.add_option("-b", "--build-dir", |
| 731 help="the location of the compiler output") | 731 help="the location of the compiler output") |
| 732 parser.add_option("--target", help="Debug or Release") | 732 parser.add_option("--target", help="Debug or Release") |
| 733 parser.add_option("-t", "--test", action="append", default=[], | 733 parser.add_option("-t", "--test", action="append", default=[], |
| 734 help="which test to run, supports test:gtest_filter format " | 734 help="which test to run, supports test:gtest_filter format " |
| 735 "as well.") | 735 "as well.") |
| 736 parser.add_option("--baseline", action="store_true", default=False, | 736 parser.add_option("--baseline", action="store_true", default=False, |
| 737 help="generate baseline data instead of validating") | 737 help="generate baseline data instead of validating") |
| 738 parser.add_option("-f", "--force", action="store_true", default=False, |
| 739 help="run a broken test anyway") |
| 738 parser.add_option("--gtest_filter", | 740 parser.add_option("--gtest_filter", |
| 739 help="additional arguments to --gtest_filter") | 741 help="additional arguments to --gtest_filter") |
| 740 parser.add_option("--gtest_repeat", help="argument for --gtest_repeat") | 742 parser.add_option("--gtest_repeat", help="argument for --gtest_repeat") |
| 741 parser.add_option("--gtest_shuffle", action="store_true", default=False, | 743 parser.add_option("--gtest_shuffle", action="store_true", default=False, |
| 742 help="Randomize tests' orders on every iteration.") | 744 help="Randomize tests' orders on every iteration.") |
| 743 parser.add_option("--gtest_break_on_failure", action="store_true", | 745 parser.add_option("--gtest_break_on_failure", action="store_true", |
| 744 default=False, | 746 default=False, |
| 745 help="Drop in to debugger on assertion failure. Also " | 747 help="Drop in to debugger on assertion failure. Also " |
| 746 "useful for forcing tests to exit with a stack dump " | 748 "useful for forcing tests to exit with a stack dump " |
| 747 "on the first assertion failure when running with " | 749 "on the first assertion failure when running with " |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 if options.help_tests: | 788 if options.help_tests: |
| 787 ChromeTests.ShowTests() | 789 ChromeTests.ShowTests() |
| 788 return 0 | 790 return 0 |
| 789 | 791 |
| 790 if not options.test: | 792 if not options.test: |
| 791 parser.error("--test not specified") | 793 parser.error("--test not specified") |
| 792 | 794 |
| 793 if len(options.test) != 1 and options.gtest_filter: | 795 if len(options.test) != 1 and options.gtest_filter: |
| 794 parser.error("--gtest_filter and multiple tests don't make sense together") | 796 parser.error("--gtest_filter and multiple tests don't make sense together") |
| 795 | 797 |
| 798 BROKEN_TESTS = { |
| 799 'drmemory_light': [ |
| 800 'addressinput', |
| 801 'aura', |
| 802 'base_unittests', |
| 803 'cc', |
| 804 'components', # x64 only? |
| 805 'content', |
| 806 'gfx', |
| 807 'mojo_public_bindings', |
| 808 ], |
| 809 'drmemory_full': [ |
| 810 'addressinput', |
| 811 'aura', |
| 812 'base_unittests', |
| 813 'blink_heap', |
| 814 'blink_platform', |
| 815 'browser_tests', |
| 816 'cast', |
| 817 'cc', |
| 818 'chromedriver', |
| 819 'compositor', |
| 820 'content', |
| 821 'content_browsertests', |
| 822 'device', |
| 823 'events', |
| 824 'extensions', |
| 825 'gfx', |
| 826 'google_apis', |
| 827 'gpu', |
| 828 'ipc_tests', |
| 829 'jingle', |
| 830 'keyboard', |
| 831 'media', |
| 832 'midi', |
| 833 'mojo_common', |
| 834 'mojo_public_bindings', |
| 835 'mojo_public_sysperf', |
| 836 'mojo_public_system', |
| 837 'mojo_system', |
| 838 'net', |
| 839 'remoting', |
| 840 'unit', |
| 841 'url', |
| 842 ], |
| 843 } |
| 844 |
| 796 for t in options.test: | 845 for t in options.test: |
| 846 if t in BROKEN_TESTS[options.valgrind_tool] and not options.force: |
| 847 logging.info("Skipping broken %s test %s -- see crbug.com/633693" % |
| 848 (options.valgrind_tool, t)) |
| 849 return 0 |
| 850 |
| 797 tests = ChromeTests(options, args, t) | 851 tests = ChromeTests(options, args, t) |
| 798 ret = tests.Run() | 852 ret = tests.Run() |
| 799 if ret: return ret | 853 if ret: return ret |
| 800 return 0 | 854 return 0 |
| 801 | 855 |
| 802 | 856 |
| 803 if __name__ == "__main__": | 857 if __name__ == "__main__": |
| 804 sys.exit(_main()) | 858 sys.exit(_main()) |
| OLD | NEW |