diff options
-rwxr-xr-x | scripts/patchtest | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/scripts/patchtest b/scripts/patchtest index 278fc4e6e0..9218db232a 100755 --- a/scripts/patchtest +++ b/scripts/patchtest | |||
@@ -165,16 +165,23 @@ def run(patch, logfile=None): | |||
165 | postmerge_resultklass = getResult(patch, True, logfile) | 165 | postmerge_resultklass = getResult(patch, True, logfile) |
166 | postmerge_result = _runner(postmerge_resultklass, 'test') | 166 | postmerge_result = _runner(postmerge_resultklass, 'test') |
167 | 167 | ||
168 | print('----------------------------------------------------------------------\n') | 168 | print_result_message(premerge_result, postmerge_result) |
169 | if premerge_result == 2 and postmerge_result == 2: | ||
170 | logger.error('patchtest: No test cases found - did you specify the correct suite directory?') | ||
171 | if premerge_result == 1 or postmerge_result == 1: | ||
172 | 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') | ||
173 | else: | ||
174 | logger.info('OK: patchtest: All patchtests passed') | ||
175 | print('----------------------------------------------------------------------\n') | ||
176 | return premerge_result or postmerge_result | 169 | return premerge_result or postmerge_result |
177 | 170 | ||
171 | def print_result_message(preresult, postresult): | ||
172 | print("----------------------------------------------------------------------\n") | ||
173 | if preresult == 2 and postresult == 2: | ||
174 | logger.error( | ||
175 | "patchtest: No test cases found - did you specify the correct suite directory?" | ||
176 | ) | ||
177 | if preresult == 1 or postresult == 1: | ||
178 | logger.error( | ||
179 | "WARNING: patchtest: At least one patchtest caused a failure or an error - please check https://wiki.yoctoproject.org/wiki/Patchtest for further guidance" | ||
180 | ) | ||
181 | else: | ||
182 | logger.info("OK: patchtest: All patchtests passed") | ||
183 | print("----------------------------------------------------------------------\n") | ||
184 | |||
178 | def main(): | 185 | def main(): |
179 | tmp_patch = False | 186 | tmp_patch = False |
180 | patch_path = PatchtestParser.patch_path | 187 | patch_path = PatchtestParser.patch_path |