| 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 self._wdiff_available = self.check_wdiff(logging=False) | 263 self._wdiff_available = self.check_wdiff(logging=False) |
| 264 return self._wdiff_available | 264 return self._wdiff_available |
| 265 | 265 |
| 266 def pretty_patch_available(self): | 266 def pretty_patch_available(self): |
| 267 if self._pretty_patch_available is None: | 267 if self._pretty_patch_available is None: |
| 268 self._pretty_patch_available = self.check_pretty_patch(logging=False
) | 268 self._pretty_patch_available = self.check_pretty_patch(logging=False
) |
| 269 return self._pretty_patch_available | 269 return self._pretty_patch_available |
| 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 # FIXME: See if we can reduce the denominator here without causing timeo
uts. | 273 return self._executive.cpu_count() |
| 274 # Maybe we need to run one sky_shell process and multiple sky_viewers | |
| 275 # instead of multiple sky_shells | |
| 276 return int(math.ceil(float(self._executive.cpu_count()) / 4)) | |
| 277 | 274 |
| 278 def default_max_locked_shards(self): | 275 def default_max_locked_shards(self): |
| 279 """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).""" |
| 280 return self.default_child_processes() | 277 return self.default_child_processes() |
| 281 | 278 |
| 282 def baseline_path(self): | 279 def baseline_path(self): |
| 283 """Return the absolute path to the directory to store new baselines in f
or this port.""" | 280 """Return the absolute path to the directory to store new baselines in f
or this port.""" |
| 284 # FIXME: remove once all callers are calling either baseline_version_dir
() or baseline_platform_dir() | 281 # FIXME: remove once all callers are calling either baseline_version_dir
() or baseline_platform_dir() |
| 285 return self.baseline_version_dir() | 282 return self.baseline_version_dir() |
| 286 | 283 |
| (...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1775 | 1772 |
| 1776 class PhysicalTestSuite(object): | 1773 class PhysicalTestSuite(object): |
| 1777 def __init__(self, base, args): | 1774 def __init__(self, base, args): |
| 1778 self.name = base | 1775 self.name = base |
| 1779 self.base = base | 1776 self.base = base |
| 1780 self.args = args | 1777 self.args = args |
| 1781 self.tests = set() | 1778 self.tests = set() |
| 1782 | 1779 |
| 1783 def __repr__(self): | 1780 def __repr__(self): |
| 1784 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) | 1781 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) |
| OLD | NEW |