OLD | NEW |
1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 if self._pretty_patch_available is None: | 257 if self._pretty_patch_available is None: |
258 self._pretty_patch_available = self.check_pretty_patch(logging=False
) | 258 self._pretty_patch_available = self.check_pretty_patch(logging=False
) |
259 return self._pretty_patch_available | 259 return self._pretty_patch_available |
260 | 260 |
261 def default_batch_size(self): | 261 def default_batch_size(self): |
262 """Return the default batch size to use for this port.""" | 262 """Return the default batch size to use for this port.""" |
263 if self.get_option('enable_sanitizer'): | 263 if self.get_option('enable_sanitizer'): |
264 # ASAN/MSAN/TSAN use more memory than regular content_shell. Their | 264 # ASAN/MSAN/TSAN use more memory than regular content_shell. Their |
265 # memory usage may also grow over time, up to a certain point. | 265 # memory usage may also grow over time, up to a certain point. |
266 # Relaunching the driver periodically helps keep it under control. | 266 # Relaunching the driver periodically helps keep it under control. |
267 return 50 | 267 return 40 |
268 # The default is infinte batch size. | 268 # The default is infinte batch size. |
269 return None | 269 return None |
270 | 270 |
271 def default_child_processes(self): | 271 def default_child_processes(self): |
272 """Return the number of drivers to use for this port.""" | 272 """Return the number of drivers to use for this port.""" |
273 if self.get_option('enable_sanitizer'): | 273 if self.get_option('enable_sanitizer'): |
274 # ASAN/MSAN/TSAN are more cpu- and memory- intensive than regular | 274 # ASAN/MSAN/TSAN are more cpu- and memory- intensive than regular |
275 # content_shell, and so we need to run fewer of them in parallel. | 275 # content_shell, and so we need to run fewer of them in parallel. |
276 return max(int(self._executive.cpu_count() * 0.75), 1) | 276 return max(int(self._executive.cpu_count() * 0.75), 1) |
277 return self._executive.cpu_count() | 277 return self._executive.cpu_count() |
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1738 | 1738 |
1739 class PhysicalTestSuite(object): | 1739 class PhysicalTestSuite(object): |
1740 def __init__(self, base, args): | 1740 def __init__(self, base, args): |
1741 self.name = base | 1741 self.name = base |
1742 self.base = base | 1742 self.base = base |
1743 self.args = args | 1743 self.args = args |
1744 self.tests = set() | 1744 self.tests = set() |
1745 | 1745 |
1746 def __repr__(self): | 1746 def __repr__(self): |
1747 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) | 1747 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) |
OLD | NEW |