Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: scripts/slave/runtest.py

Issue 357673002: Do not pass additional TSan options when building and running TSan tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « scripts/slave/compile.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 """A tool used to run a Chrome test executable and process the output. 6 """A tool used to run a Chrome test executable and process the output.
7 7
8 This script is used by the buildbot slaves. It must be run from the outer 8 This script is used by the buildbot slaves. It must be run from the outer
9 build directory, e.g. chrome-release/build/. 9 build directory, e.g. chrome-release/build/.
10 10
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 help='Suppression file for LeakSanitizer. ' 1627 help='Suppression file for LeakSanitizer. '
1628 'Default: %default.') 1628 'Default: %default.')
1629 option_parser.add_option('--enable-msan', action='store_true', default=False, 1629 option_parser.add_option('--enable-msan', action='store_true', default=False,
1630 help='Enable uninitialized memory reads detection ' 1630 help='Enable uninitialized memory reads detection '
1631 '(MemorySanitizer). Can also enabled with the ' 1631 '(MemorySanitizer). Can also enabled with the '
1632 'factory property "msan" (deprecated).') 1632 'factory property "msan" (deprecated).')
1633 option_parser.add_option('--enable-tsan', action='store_true', default=False, 1633 option_parser.add_option('--enable-tsan', action='store_true', default=False,
1634 help='Enable data race detection ' 1634 help='Enable data race detection '
1635 '(ThreadSanitizer). Can also enabled with the ' 1635 '(ThreadSanitizer). Can also enabled with the '
1636 'factory property "tsan" (deprecated).') 1636 'factory property "tsan" (deprecated).')
1637 option_parser.add_option('--tsan-suppressions-file',
1638 default=('src/tools/valgrind/tsan_v2/'
1639 'suppressions.txt'),
1640 help='Suppression file for ThreadSanitizer. '
1641 'Default: %default. Can also be specified '
1642 'using the factory property '
1643 '"tsan_suppressions_file" (deprecated).')
1644 option_parser.add_option('--strip-path-prefix', 1637 option_parser.add_option('--strip-path-prefix',
1645 default='build/src/out/Release/../../', 1638 default='build/src/out/Release/../../',
1646 help='Source paths in stack traces will be stripped ' 1639 help='Source paths in stack traces will be stripped '
1647 'of prefixes ending with this substring. This ' 1640 'of prefixes ending with this substring. This '
1648 'option is used by sanitizer tools.') 1641 'option is used by sanitizer tools.')
1649 option_parser.add_option('--extra-sharding-args', default='', 1642 option_parser.add_option('--extra-sharding-args', default='',
1650 help='Extra options for run_test_cases.py.') 1643 help='Extra options for run_test_cases.py.')
1651 option_parser.add_option('--no-spawn-dbus', action='store_true', 1644 option_parser.add_option('--no-spawn-dbus', action='store_true',
1652 default=False, 1645 default=False,
1653 help='Disable GLib DBus bug workaround: ' 1646 help='Disable GLib DBus bug workaround: '
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 args.extend(['--target', options.target]) 1679 args.extend(['--target', options.target])
1687 if options.pass_build_dir: 1680 if options.pass_build_dir:
1688 args.extend(['--build-dir', options.build_dir]) 1681 args.extend(['--build-dir', options.build_dir])
1689 1682
1690 options.enable_asan = (options.enable_asan or 1683 options.enable_asan = (options.enable_asan or
1691 options.factory_properties.get('asan', False)) 1684 options.factory_properties.get('asan', False))
1692 options.enable_msan = (options.enable_msan or 1685 options.enable_msan = (options.enable_msan or
1693 options.factory_properties.get('msan', False)) 1686 options.factory_properties.get('msan', False))
1694 options.enable_tsan = (options.enable_tsan or 1687 options.enable_tsan = (options.enable_tsan or
1695 options.factory_properties.get('tsan', False)) 1688 options.factory_properties.get('tsan', False))
1696 options.tsan_suppressions_file = (options.tsan_suppressions_file or
1697 options.factory_properties.get('tsan_suppressions_file'))
1698 options.enable_lsan = (options.enable_lsan or 1689 options.enable_lsan = (options.enable_lsan or
1699 options.factory_properties.get('lsan', False)) 1690 options.factory_properties.get('lsan', False))
1700 1691
1701 extra_sharding_args_list = options.extra_sharding_args.split() 1692 extra_sharding_args_list = options.extra_sharding_args.split()
1702 1693
1703 # run_test_cases.py and the brave new test launcher need different flags to 1694 # run_test_cases.py and the brave new test launcher need different flags to
1704 # enable verbose output. We support both. 1695 # enable verbose output. We support both.
1705 always_print_test_output = ['--verbose', 1696 always_print_test_output = ['--verbose',
1706 '--test-launcher-print-test-stdio=always'] 1697 '--test-launcher-print-test-stdio=always']
1707 if options.enable_asan: 1698 if options.enable_asan:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1745 else: 1736 else:
1746 # ASan and MSan use a script for offline symbolization. 1737 # ASan and MSan use a script for offline symbolization.
1747 # Important note: when running ASan or MSan with leak detection enabled, 1738 # Important note: when running ASan or MSan with leak detection enabled,
1748 # we must use the LSan symbolization options above. 1739 # we must use the LSan symbolization options above.
1749 symbolization_options = ['symbolize=0'] 1740 symbolization_options = ['symbolize=0']
1750 # Set the path to llvm-symbolizer to be used by asan_symbolize.py 1741 # Set the path to llvm-symbolizer to be used by asan_symbolize.py
1751 extra_env['LLVM_SYMBOLIZER_PATH'] = symbolizer_path 1742 extra_env['LLVM_SYMBOLIZER_PATH'] = symbolizer_path
1752 1743
1753 # ThreadSanitizer 1744 # ThreadSanitizer
1754 if options.enable_tsan: 1745 if options.enable_tsan:
1755 # TODO(glider): enable die_after_fork back once http://crbug.com/356758 1746 tsan_options = symbolization_options
1756 # is fixed.
1757 tsan_options = symbolization_options + \
1758 ['suppressions=%s' % options.tsan_suppressions_file,
1759 'print_suppressions=1',
1760 'report_signal_unsafe=0',
1761 'report_thread_leaks=0',
1762 'history_size=7',
1763 'die_after_fork=0']
1764 extra_env['TSAN_OPTIONS'] = ' '.join(tsan_options) 1747 extra_env['TSAN_OPTIONS'] = ' '.join(tsan_options)
1765 # Disable sandboxing under TSan for now. http://crbug.com/223602. 1748 # Disable sandboxing under TSan for now. http://crbug.com/223602.
1766 args.append('--no-sandbox') 1749 args.append('--no-sandbox')
1767 1750
1768 # LeakSanitizer 1751 # LeakSanitizer
1769 if options.enable_lsan: 1752 if options.enable_lsan:
1770 # Symbolization options set here take effect only for standalone LSan. 1753 # Symbolization options set here take effect only for standalone LSan.
1771 lsan_options = symbolization_options + \ 1754 lsan_options = symbolization_options + \
1772 ['suppressions=%s' % options.lsan_suppressions_file, 1755 ['suppressions=%s' % options.lsan_suppressions_file,
1773 'print_suppressions=1'] 1756 'print_suppressions=1']
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 finally: 1852 finally:
1870 if did_launch_dbus: 1853 if did_launch_dbus:
1871 # It looks like the command line argument --exit-with-session 1854 # It looks like the command line argument --exit-with-session
1872 # isn't working to clean up the spawned dbus-daemon. Kill it 1855 # isn't working to clean up the spawned dbus-daemon. Kill it
1873 # manually. 1856 # manually.
1874 _ShutdownDBus() 1857 _ShutdownDBus()
1875 1858
1876 1859
1877 if '__main__' == __name__: 1860 if '__main__' == __name__:
1878 sys.exit(main()) 1861 sys.exit(main())
OLDNEW
« no previous file with comments | « scripts/slave/compile.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698