diff options
| -rwxr-xr-x | scripts/patchtest-send-results | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results index 024be003ce..075b60d8f7 100755 --- a/scripts/patchtest-send-results +++ b/scripts/patchtest-send-results | |||
| @@ -33,6 +33,9 @@ under 'Yocto Project Subprojects'). For more information on specific | |||
| 33 | failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank | 33 | failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank |
| 34 | you!""" | 34 | you!""" |
| 35 | 35 | ||
| 36 | def has_a_failed_test(raw_results): | ||
| 37 | return any(raw_result.split(':')[0] == "FAIL" for raw_result in raw_results.splitlines()) | ||
| 38 | |||
| 36 | parser = argparse.ArgumentParser(description="Send patchtest results to a submitter for a given patch") | 39 | parser = argparse.ArgumentParser(description="Send patchtest results to a submitter for a given patch") |
| 37 | parser.add_argument("-p", "--patch", dest="patch", required=True, help="The patch file to summarize") | 40 | parser.add_argument("-p", "--patch", dest="patch", required=True, help="The patch file to summarize") |
| 38 | args = parser.parse_args() | 41 | args = parser.parse_args() |
| @@ -69,7 +72,7 @@ from_address = "patchtest@automation.yoctoproject.org" | |||
| 69 | # mailing list to CC | 72 | # mailing list to CC |
| 70 | cc_address = "openembedded-core@lists.openembedded.org" | 73 | cc_address = "openembedded-core@lists.openembedded.org" |
| 71 | 74 | ||
| 72 | if "FAIL" in testresult: | 75 | if has_a_failed_test(testresult): |
| 73 | reply_contents = None | 76 | reply_contents = None |
| 74 | if len(max(open(result_file, 'r'), key=len)) > 220: | 77 | if len(max(open(result_file, 'r'), key=len)) > 220: |
| 75 | warning = "Tests failed for the patch, but the results log could not be processed due to excessive result line length." | 78 | warning = "Tests failed for the patch, but the results log could not be processed due to excessive result line length." |
