Bug 1215834: Pass an internal timeout option to jit_tests.py; r=jlund

MozReview-Commit-ID: I9jdkLcMuE8

--HG--
extra : rebase_source : 8c135ab72d17b4e448a21649248cd689be04b0b2
extra : histedit_source : 1e78108c350e0f775c8e181c90fe008d3999a24f
This commit is contained in:
Benjamin Bouvier 2016-05-30 14:53:58 +02:00
Родитель fcf999ef7d
Коммит b5ba183003
4 изменённых файлов: 18 добавлений и 7 удалений

Просмотреть файл

@ -90,10 +90,12 @@ config = {
"--no-slow",
"--no-progress",
"--format=automation",
"--jitflags=all"
"--jitflags=all",
"--timeout=970" # Keep in sync with run_timeout below.
],
"run_filename": "jit_test.py",
"testsdir": "jit-test/jit-test"
"testsdir": "jit-test/jit-test",
"run_timeout": 1000 # Keep in sync with --timeout above.
},
"luciddream-emulator": {
"options": [

Просмотреть файл

@ -67,10 +67,12 @@ config = {
"--no-slow",
"--no-progress",
"--format=automation",
"--jitflags=all"
"--jitflags=all",
"--timeout=970" # Keep in sync with run_timeout below.
],
"run_filename": "jit_test.py",
"testsdir": "jit-test/jit-test"
"testsdir": "jit-test/jit-test",
"run_timeout": 1000 # Keep in sync with --timeout above.
},
"mochitest": {
"options": [

Просмотреть файл

@ -78,10 +78,12 @@ config = {
"--no-slow",
"--no-progress",
"--format=automation",
"--jitflags=all"
"--jitflags=all",
"--timeout=970" # Keep in sync with run_timeout below.
],
"run_filename": "jit_test.py",
"testsdir": "jit-test/jit-test"
"testsdir": "jit-test/jit-test",
"run_timeout": 1000 # Keep in sync with --timeout above.
},
"mochitest": {
"options": [

Просмотреть файл

@ -550,6 +550,11 @@ class DesktopUnittest(TestingMixin, MercurialScript, BlobUploadMixin, MozbaseMix
'resources',
module))
def get_timeout_for_category(self, suite_category):
if suite_category == 'cppunittest':
return 2500
return self.config["suite_definitions"][suite_category].get('run_timeout', 1000)
def _run_category_suites(self, suite_category, preflight_run_method=None):
"""run suite(s) to a specific category"""
dirs = self.query_abs_dirs()
@ -609,7 +614,7 @@ class DesktopUnittest(TestingMixin, MercurialScript, BlobUploadMixin, MozbaseMix
if not os.path.isdir(env['MOZ_UPLOAD_DIR']):
self.mkdir_p(env['MOZ_UPLOAD_DIR'])
env = self.query_env(partial_env=env, log_level=INFO)
cmd_timeout = 2500 if suite_category == 'cppunittest' else 1000
cmd_timeout = self.get_timeout_for_category(suite_category)
return_code = self.run_command(cmd, cwd=dirs['abs_work_dir'],
output_timeout=cmd_timeout,
output_parser=parser,