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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 def wdiff_available(self): | 251 def wdiff_available(self): |
252 if self._wdiff_available is None: | 252 if self._wdiff_available is None: |
253 self._wdiff_available = self.check_wdiff(logging=False) | 253 self._wdiff_available = self.check_wdiff(logging=False) |
254 return self._wdiff_available | 254 return self._wdiff_available |
255 | 255 |
256 def pretty_patch_available(self): | 256 def pretty_patch_available(self): |
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): |
| 262 """Return the default batch size to use for this port.""" |
| 263 if self.get_option('enable_sanitizer'): |
| 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. |
| 266 # Relaunching the driver periodically helps keep it under control. |
| 267 return 50 |
| 268 # The default is infinte batch size. |
| 269 return None |
| 270 |
261 def default_child_processes(self): | 271 def default_child_processes(self): |
262 """Return the number of drivers to use for this port.""" | 272 """Return the number of drivers to use for this port.""" |
263 if self.get_option('enable_sanitizer'): | 273 if self.get_option('enable_sanitizer'): |
264 # ASAN/MSAN/TSAN are more cpu- and memory- intensive than regular | 274 # ASAN/MSAN/TSAN are more cpu- and memory- intensive than regular |
265 # 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. |
266 return max(int(self._executive.cpu_count() * 0.75), 1) | 276 return max(int(self._executive.cpu_count() * 0.75), 1) |
267 return self._executive.cpu_count() | 277 return self._executive.cpu_count() |
268 | 278 |
269 def default_max_locked_shards(self): | 279 def default_max_locked_shards(self): |
270 """Return the number of "locked" shards to run in parallel (like the htt
p tests).""" | 280 """Return the number of "locked" shards to run in parallel (like the htt
p tests).""" |
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1728 | 1738 |
1729 class PhysicalTestSuite(object): | 1739 class PhysicalTestSuite(object): |
1730 def __init__(self, base, args): | 1740 def __init__(self, base, args): |
1731 self.name = base | 1741 self.name = base |
1732 self.base = base | 1742 self.base = base |
1733 self.args = args | 1743 self.args = args |
1734 self.tests = set() | 1744 self.tests = set() |
1735 | 1745 |
1736 def __repr__(self): | 1746 def __repr__(self): |
1737 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 |