mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
patchtest: log errors and failures at end
At the moment, running patchtest locally will only print failures and errors to the log when the not passing test case is executed. This might lead to people overlooking issues with their patches, so print a log line at the end if testcases showed issues. This should make it more easy to spot then before. Fixes [YOCTO #15389] (From OE-Core rev: 84ca5a5f5a44de6ed4551ab08e58087aaa7e1369) Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
0d12162071
commit
b83bd953da
|
@ -142,6 +142,8 @@ def _runner(resultklass, prefix=None):
|
||||||
logger.error(traceback.print_exc())
|
logger.error(traceback.print_exc())
|
||||||
logger.error('patchtest: something went wrong')
|
logger.error('patchtest: something went wrong')
|
||||||
return 1
|
return 1
|
||||||
|
if result.test_failure or result.test_error:
|
||||||
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
@ -158,9 +160,14 @@ def run(patch, logfile=None):
|
||||||
postmerge_resultklass = getResult(patch, True, logfile)
|
postmerge_resultklass = getResult(patch, True, logfile)
|
||||||
postmerge_result = _runner(postmerge_resultklass, 'test')
|
postmerge_result = _runner(postmerge_resultklass, 'test')
|
||||||
|
|
||||||
|
print('----------------------------------------------------------------------\n')
|
||||||
if premerge_result == 2 and postmerge_result == 2:
|
if premerge_result == 2 and postmerge_result == 2:
|
||||||
logger.error('patchtest: any test cases found - did you specify the correct suite directory?')
|
logger.error('patchtest: Not any test cases found - did you specify the correct suite directory?')
|
||||||
|
if premerge_result == 1 or postmerge_result == 1:
|
||||||
|
logger.error('patchtest: At least one patchtest caused a failure or an error - please check')
|
||||||
|
else:
|
||||||
|
logger.error('patchtest: All patchtests passed')
|
||||||
|
print('----------------------------------------------------------------------\n')
|
||||||
return premerge_result or postmerge_result
|
return premerge_result or postmerge_result
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user