| 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 50 |
| 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'): | |
| 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. | |
| 276 return max(int(self._executive.cpu_count() * 0.75), 1) | |
| 277 return self._executive.cpu_count() | 273 return self._executive.cpu_count() |
| 278 | 274 |
| 279 def default_max_locked_shards(self): | 275 def default_max_locked_shards(self): |
| 280 """Return the number of "locked" shards to run in parallel (like the htt
p tests).""" | 276 """Return the number of "locked" shards to run in parallel (like the htt
p tests).""" |
| 281 max_locked_shards = int(self.default_child_processes()) / 4 | 277 max_locked_shards = int(self.default_child_processes()) / 4 |
| 282 if not max_locked_shards: | 278 if not max_locked_shards: |
| 283 return 1 | 279 return 1 |
| 284 return max_locked_shards | 280 return max_locked_shards |
| 285 | 281 |
| 286 def baseline_path(self): | 282 def baseline_path(self): |
| (...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1738 | 1734 |
| 1739 class PhysicalTestSuite(object): | 1735 class PhysicalTestSuite(object): |
| 1740 def __init__(self, base, args): | 1736 def __init__(self, base, args): |
| 1741 self.name = base | 1737 self.name = base |
| 1742 self.base = base | 1738 self.base = base |
| 1743 self.args = args | 1739 self.args = args |
| 1744 self.tests = set() | 1740 self.tests = set() |
| 1745 | 1741 |
| 1746 def __repr__(self): | 1742 def __repr__(self): |
| 1747 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) | 1743 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) |
| OLD | NEW |