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

Side by Side Diff: tools/utils.py

Issue 2983093002: Disable core dump archive check on Linux (Closed)
Patch Set: Created 3 years, 5 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 | « no previous file | 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 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 # This file contains a set of utilities functions used by other Python-based 5 # This file contains a set of utilities functions used by other Python-based
6 # scripts. 6 # scripts.
7 7
8 import commands 8 import commands
9 import contextlib 9 import contextlib
10 import datetime 10 import datetime
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 def __exit__(self, *_): 726 def __exit__(self, *_):
727 resource.setrlimit(resource.RLIMIT_CORE, self._old_limits) 727 resource.setrlimit(resource.RLIMIT_CORE, self._old_limits)
728 728
729 class LinuxCoreDumpEnabler(PosixCoreDumpEnabler): 729 class LinuxCoreDumpEnabler(PosixCoreDumpEnabler):
730 def __enter__(self): 730 def __enter__(self):
731 # Bump core limits to unlimited if core_pattern is correctly configured. 731 # Bump core limits to unlimited if core_pattern is correctly configured.
732 if CheckLinuxCoreDumpPattern(fatal=False): 732 if CheckLinuxCoreDumpPattern(fatal=False):
733 super(LinuxCoreDumpEnabler, self).__enter__() 733 super(LinuxCoreDumpEnabler, self).__enter__()
734 734
735 def __exit__(self, *args): 735 def __exit__(self, *args):
736 CheckLinuxCoreDumpPattern(fatal=True) 736 # TODO(whesse): Re-enable after issue #30205 is addressed
737 # CheckLinuxCoreDumpPattern(fatal=True)
737 super(LinuxCoreDumpEnabler, self).__exit__(*args) 738 super(LinuxCoreDumpEnabler, self).__exit__(*args)
738 739
739 class WindowsCoreDumpEnabler(object): 740 class WindowsCoreDumpEnabler(object):
740 """Configure Windows Error Reporting to store crash dumps. 741 """Configure Windows Error Reporting to store crash dumps.
741 742
742 The documentation can be found here: 743 The documentation can be found here:
743 https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181.aspx 744 https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181.aspx
744 """ 745 """
745 746
746 WINDOWS_COREDUMP_FOLDER = r'crashes' 747 WINDOWS_COREDUMP_FOLDER = r'crashes'
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 return contextlib.nested(WindowsCoreDumpEnabler(), 1038 return contextlib.nested(WindowsCoreDumpEnabler(),
1038 WindowsCoreDumpArchiver()) 1039 WindowsCoreDumpArchiver())
1039 else: 1040 else:
1040 # We don't have support for MacOS yet. 1041 # We don't have support for MacOS yet.
1041 assert osname == 'macos' 1042 assert osname == 'macos'
1042 return NooptCoreDumpArchiver() 1043 return NooptCoreDumpArchiver()
1043 1044
1044 if __name__ == "__main__": 1045 if __name__ == "__main__":
1045 import sys 1046 import sys
1046 Main() 1047 Main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698