Allow forcing the use of the default polling strategy [instead of all strategies]

pull/6917/head
Craig Tiller 9 years ago
parent 2c57371b93
commit 123f137728
  1. 18
      tools/run_tests/run_tests.py

@ -62,6 +62,11 @@ os.chdir(_ROOT)
_FORCE_ENVIRON_FOR_WRAPPERS = {} _FORCE_ENVIRON_FOR_WRAPPERS = {}
_POLLING_STRATEGIES = {
'linux': ['poll', 'legacy']
}
def platform_string(): def platform_string():
return jobset.platform_string() return jobset.platform_string()
@ -153,14 +158,8 @@ class CLanguage(object):
def test_specs(self): def test_specs(self):
out = [] out = []
binaries = get_c_tests(self.args.travis, self.test_lang) binaries = get_c_tests(self.args.travis, self.test_lang)
POLLING_STRATEGIES = {
'windows': ['all'],
'mac': ['all'],
'posix': ['all'],
'linux': ['poll', 'legacy']
}
for target in binaries: for target in binaries:
polling_strategies = (POLLING_STRATEGIES[self.platform] polling_strategies = (_POLLING_STRATEGIES.get(self.platform, ['all'])
if target.get('uses_polling', True) if target.get('uses_polling', True)
else ['all']) else ['all'])
for polling_strategy in polling_strategies: for polling_strategy in polling_strategies:
@ -836,8 +835,13 @@ argp.add_argument('--update_submodules', default=[], nargs='*',
argp.add_argument('-a', '--antagonists', default=0, type=int) argp.add_argument('-a', '--antagonists', default=0, type=int)
argp.add_argument('-x', '--xml_report', default=None, type=str, argp.add_argument('-x', '--xml_report', default=None, type=str,
help='Generates a JUnit-compatible XML report') help='Generates a JUnit-compatible XML report')
argp.add_argument('--force_default_poller', default=False, action='store_const', const=True,
help='Dont try to iterate over many polling strategies when they exist')
args = argp.parse_args() args = argp.parse_args()
if args.force_default_poller:
_POLLING_STRATEGIES = {}
jobset.measure_cpu_costs = args.measure_cpu_costs jobset.measure_cpu_costs = args.measure_cpu_costs
# update submodules if necessary # update submodules if necessary

Loading…
Cancel
Save