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 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', | |
|
Lei Zhang
2016/08/04 19:37:16
dup?
Dirk Pranke
2016/08/04 19:38:22
Yup, thx.
| |
| 804 'cc', # x64 only? | |
| 805 'components', # x64 only? | |
| 806 'content', | |
| 807 'gfx', | |
| 808 'mojo_public_bindings', | |
| 809 ], | |
| 810 'drmemory_full': [ | |
| 811 'addressinput', | |
| 812 'aura', | |
| 813 'base_unittests', | |
| 814 'blink_heap', | |
| 815 'blink_platform', | |
| 816 'browser_tests', | |
| 817 'cast', | |
| 818 'cc', | |
| 819 'chromedriver', | |
| 820 'compositor', | |
| 821 'content', | |
| 822 'content_browsertests', | |
| 823 'device', | |
| 824 'events', | |
| 825 'extensions', | |
| 826 'gfx', | |
| 827 'google_apis', | |
| 828 'gpu', | |
| 829 'ipc_tests', | |
| 830 'jingle', | |
| 831 'keyboard', | |
| 832 'media', | |
| 833 'midi', | |
| 834 'mojo_common', | |
| 835 'mojo_public_bindings', | |
| 836 'mojo_public_sysperf', | |
| 837 'mojo_public_system', | |
| 838 'mojo_system', | |
| 839 'net', | |
| 840 'remoting', | |
| 841 'unit', | |
| 842 'url', | |
| 843 ], | |
| 844 } | |
| 845 | |
| 796 for t in options.test: | 846 for t in options.test: |
| 847 if t in BROKEN_TESTS[options.valgrind_tool] and not options.force: | |
| 848 logging.info("Skipping broken %s test %s -- see crbug.com/633693" % | |
| 849 (options.valgrind_tool, t)) | |
| 850 return 0 | |
| 851 | |
| 797 tests = ChromeTests(options, args, t) | 852 tests = ChromeTests(options, args, t) |
| 798 ret = tests.Run() | 853 ret = tests.Run() |
| 799 if ret: return ret | 854 if ret: return ret |
| 800 return 0 | 855 return 0 |
| 801 | 856 |
| 802 | 857 |
| 803 if __name__ == "__main__": | 858 if __name__ == "__main__": |
| 804 sys.exit(_main()) | 859 sys.exit(_main()) |
| OLD | NEW |