mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-05 05:04:44 +02:00
scripts/patchtest: split out result messages
Add a minor refactor for the result output. (From OE-Core rev: 5553edc0f8d58dc6e3a4f703af9bdb04fda1e12f) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
4c378fc895
commit
1d813b0d53
|
@ -165,16 +165,23 @@ 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')
|
print_result_message(premerge_result, postmerge_result)
|
||||||
if premerge_result == 2 and postmerge_result == 2:
|
|
||||||
logger.error('patchtest: No test cases found - did you specify the correct suite directory?')
|
|
||||||
if premerge_result == 1 or postmerge_result == 1:
|
|
||||||
logger.error('WARNING: patchtest: At least one patchtest caused a failure or an error - please check https://wiki.yoctoproject.org/wiki/Patchtest for further guidance')
|
|
||||||
else:
|
|
||||||
logger.info('OK: patchtest: All patchtests passed')
|
|
||||||
print('----------------------------------------------------------------------\n')
|
|
||||||
return premerge_result or postmerge_result
|
return premerge_result or postmerge_result
|
||||||
|
|
||||||
|
def print_result_message(preresult, postresult):
|
||||||
|
print("----------------------------------------------------------------------\n")
|
||||||
|
if preresult == 2 and postresult == 2:
|
||||||
|
logger.error(
|
||||||
|
"patchtest: No test cases found - did you specify the correct suite directory?"
|
||||||
|
)
|
||||||
|
if preresult == 1 or postresult == 1:
|
||||||
|
logger.error(
|
||||||
|
"WARNING: patchtest: At least one patchtest caused a failure or an error - please check https://wiki.yoctoproject.org/wiki/Patchtest for further guidance"
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
logger.info("OK: patchtest: All patchtests passed")
|
||||||
|
print("----------------------------------------------------------------------\n")
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
tmp_patch = False
|
tmp_patch = False
|
||||||
patch_path = PatchtestParser.patch_path
|
patch_path = PatchtestParser.patch_path
|
||||||
|
|
Loading…
Reference in New Issue
Block a user