mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1042963 - Only execute the first_error handler on test_status messages. r=Vaibhav
This commit is contained in:
parent
d35ca502b4
commit
f9a5d00145
@ -1916,7 +1916,7 @@ class Mochitest(MochitestUtilsMixin):
|
||||
if message['action'] == 'test_start': #by default make the result key equal to pass.
|
||||
key = message['test'].split('/')[-1].strip()
|
||||
self.harness.result[key] = "PASS"
|
||||
elif message['action'] in ['test_end', 'test_status']:
|
||||
elif message['action'] == 'test_status':
|
||||
if 'expected' in message:
|
||||
key = message['test'].split('/')[-1].strip()
|
||||
self.harness.result[key] = "FAIL"
|
||||
@ -1926,10 +1926,10 @@ class Mochitest(MochitestUtilsMixin):
|
||||
return message
|
||||
|
||||
def first_error(self, message):
|
||||
if 'expected' in message and message['status'] == 'FAIL':
|
||||
if message['action'] == 'test_status' and 'expected' in message and message['status'] == 'FAIL':
|
||||
key = message['test'].split('/')[-1].strip()
|
||||
if key not in self.harness.expectedError:
|
||||
self.harness.expectedError[key] = message['message'].strip()
|
||||
self.harness.expectedError[key] = message.get('message', message['subtest']).strip()
|
||||
return message
|
||||
|
||||
def countline(self, message):
|
||||
|
Loading…
Reference in New Issue
Block a user