зеркало из https://github.com/mozilla/pjs.git
Bug 642298: Add jitflags to tinderbox output. (r=dmandelin)
This commit is contained in:
Родитель
006d60c13b
Коммит
e613a018d5
|
@ -215,6 +215,13 @@ def check_output(out, err, rc, allow_oom, expectedError):
|
|||
|
||||
return True
|
||||
|
||||
def print_tinderbox(label, test, message=None):
|
||||
jitflags = " ".join(test.jitflags)
|
||||
result = "%s | jit_test.py %-15s| %s" % (label, jitflags, test.path)
|
||||
if message:
|
||||
result += ": " + message
|
||||
print result
|
||||
|
||||
def run_tests(tests, test_dir, lib_dir):
|
||||
pb = None
|
||||
if not OPTIONS.hide_progress and not OPTIONS.show_cmd:
|
||||
|
@ -238,7 +245,7 @@ def run_tests(tests, test_dir, lib_dir):
|
|||
|
||||
if OPTIONS.tinderbox:
|
||||
if ok:
|
||||
print('TEST-PASS | jit_test.py | %s'%test.path)
|
||||
print_tinderbox("TEST-PASS", test);
|
||||
else:
|
||||
lines = [ _ for _ in out.split('\n') + err.split('\n')
|
||||
if _ != '' ]
|
||||
|
@ -246,8 +253,7 @@ def run_tests(tests, test_dir, lib_dir):
|
|||
msg = lines[-1]
|
||||
else:
|
||||
msg = ''
|
||||
print('TEST-UNEXPECTED-FAIL | jit_test.py | %s: %s'%
|
||||
(test.path, msg))
|
||||
print_tinderbox("TEST-UNEXPECTED-FAIL", test, msg);
|
||||
|
||||
n = i + 1
|
||||
if pb:
|
||||
|
@ -255,7 +261,7 @@ def run_tests(tests, test_dir, lib_dir):
|
|||
pb.update(n)
|
||||
complete = True
|
||||
except KeyboardInterrupt:
|
||||
print('TEST-UNEXPECTED_FAIL | jit_test.py | %s'%test.path)
|
||||
print_tinderbox("TEST-UNEXPECTED-FAIL", test);
|
||||
|
||||
if pb:
|
||||
pb.finish()
|
||||
|
|
|
@ -43,6 +43,16 @@ def check_manifest(test_list):
|
|||
else:
|
||||
print 'All test files are listed in manifests'
|
||||
|
||||
def print_tinderbox_result(label, path, message=None, skip=False):
|
||||
result = label
|
||||
result += " | " + path
|
||||
result += " |" + OPTIONS.shell_args
|
||||
if message:
|
||||
result += " | " + message
|
||||
if skip:
|
||||
result += ' | (SKIP)'
|
||||
print result
|
||||
|
||||
class TestTask:
|
||||
js_cmd_prefix = None
|
||||
|
||||
|
@ -82,7 +92,7 @@ class ResultsSink:
|
|||
def push(self, output):
|
||||
if isinstance(output, NullTestOutput):
|
||||
if OPTIONS.tinderbox:
|
||||
print '%s | %s (SKIP)' % ('TEST-KNOWN-FAIL', output.test.path)
|
||||
print_tinderbox_result('TEST-KNOWN-FAIL', output.test.path, skip=True)
|
||||
self.counts[2] += 1
|
||||
self.n += 1
|
||||
else:
|
||||
|
@ -114,10 +124,10 @@ class ResultsSink:
|
|||
label = self.LABELS[(sub_ok, result.test.expect, result.test.random)][0]
|
||||
if label == 'TEST-UNEXPECTED-PASS':
|
||||
label = 'TEST-PASS (EXPECTED RANDOM)'
|
||||
print '%s | %s | %s' % (label, result.test.path, msg)
|
||||
print '%s | %s' % (self.LABELS[(result.result,
|
||||
result.test.expect, result.test.random)][0],
|
||||
result.test.path)
|
||||
print_tinderbox_result(label, result.test.path, message=msg)
|
||||
print_tinderbox_result(self.LABELS[
|
||||
(result.result, result.test.expect, result.test.random)][0],
|
||||
result.test.path)
|
||||
|
||||
if self.pb:
|
||||
self.pb.label = '[%4d|%4d|%4d]'%tuple(self.counts)
|
||||
|
|
Загрузка…
Ссылка в новой задаче