| 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 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1365 if config_file_from_env: | 1365 if config_file_from_env: |
| 1366 if not self._filesystem.exists(config_file_from_env): | 1366 if not self._filesystem.exists(config_file_from_env): |
| 1367 raise IOError('%s was not found on the system' % config_file_fro
m_env) | 1367 raise IOError('%s was not found on the system' % config_file_fro
m_env) |
| 1368 return config_file_from_env | 1368 return config_file_from_env |
| 1369 | 1369 |
| 1370 config_file_name = self._apache_config_file_name_for_platform() | 1370 config_file_name = self._apache_config_file_name_for_platform() |
| 1371 return self._filesystem.join(self.apache_config_directory(), config_file
_name) | 1371 return self._filesystem.join(self.apache_config_directory(), config_file
_name) |
| 1372 | 1372 |
| 1373 def _apache_version(self): | 1373 def _apache_version(self): |
| 1374 config = self._executive.run_command([self.path_to_apache(), '-v']) | 1374 config = self._executive.run_command([self.path_to_apache(), '-v']) |
| 1375 return re.sub(r'(?:.|\n)*Server version: Apache/(\d+\.\d+)(?:.|\n)*', r'
\1', config) | 1375 # Log version including patch level. |
| 1376 _log.debug('Found apache version %s', re.sub( |
| 1377 r'(?:.|\n)*Server version: Apache/(\d+\.\d+(?:\.\d+)?)(?:.|\n)*', |
| 1378 r'\1', config)) |
| 1379 return re.sub( |
| 1380 r'(?:.|\n)*Server version: Apache/(\d+\.\d+)(?:.|\n)*', |
| 1381 r'\1', config) |
| 1376 | 1382 |
| 1377 def _apache_config_file_name_for_platform(self): | 1383 def _apache_config_file_name_for_platform(self): |
| 1378 if self.host.platform.is_linux(): | 1384 if self.host.platform.is_linux(): |
| 1379 distribution = self.host.platform.linux_distribution() | 1385 distribution = self.host.platform.linux_distribution() |
| 1380 | 1386 |
| 1381 custom_configuration_distributions = ['arch', 'debian', 'redhat'] | 1387 custom_configuration_distributions = ['arch', 'debian', 'redhat'] |
| 1382 if distribution in custom_configuration_distributions: | 1388 if distribution in custom_configuration_distributions: |
| 1383 return '%s-httpd-%s.conf' % (distribution, self._apache_version(
)) | 1389 return '%s-httpd-%s.conf' % (distribution, self._apache_version(
)) |
| 1384 | 1390 |
| 1385 return 'apache2-httpd-' + self._apache_version() + '.conf' | 1391 return 'apache2-httpd-' + self._apache_version() + '.conf' |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1627 | 1633 |
| 1628 def __init__(self, base, args, reference_args=None): | 1634 def __init__(self, base, args, reference_args=None): |
| 1629 self.name = base | 1635 self.name = base |
| 1630 self.base = base | 1636 self.base = base |
| 1631 self.args = args | 1637 self.args = args |
| 1632 self.reference_args = args if reference_args is None else reference_args | 1638 self.reference_args = args if reference_args is None else reference_args |
| 1633 self.tests = set() | 1639 self.tests = set() |
| 1634 | 1640 |
| 1635 def __repr__(self): | 1641 def __repr__(self): |
| 1636 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1642 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
| OLD | NEW |