@@ -205,7 +205,9 @@ def print_log(log_results):
205205def print_github_log (log_results ):
206206 """Print a text log, but replace newlines with %0A and add
207207 the GitHub ::error text."""
208- output_lines = [LOG_HEADER , "" ] + print_log (log_results )
208+ output_lines = [LOG_HEADER ,
209+ "" .ljust (len (LOG_HEADER ), "—" ),
210+ "" ] + print_log (log_results )
209211 # "%0A" produces a newline in GitHub workflow logs.
210212 return ["::error ::%s" % "%0A" .join (output_lines )]
211213
@@ -292,8 +294,11 @@ def main(argv):
292294
293295 # Extract test failures, which follow "TESTAPPS EXPERIENCED ERRORS:"
294296 m = re .search (r'^TEST SUMMARY(.*)TESTAPPS (EXPERIENCED ERRORS|FAILED):\n(([^\n]*\n)+)' , log_text , re .MULTILINE | re .DOTALL )
295- if m and ((SIMULATOR in platform and not "(ON SIMULATOR)" in m .group (1 )) or
296- (HARDWARE in platform and not "(ON HARDWARE)" in m .group (1 ))):
297+ # If the log reports "(ON SIMULATOR)" or "(ON HARDWARE)", make sure it matches the platform.
298+ if m and "(ON " in m .group (1 ) and (
299+ (SIMULATOR in platform and not "(ON SIMULATOR)" in m .group (1 )) or
300+ (HARDWARE in platform and not "(ON HARDWARE)" in m .group (1 ))
301+ ):
297302 m = None # don't process this if it's for the wrong hardware target
298303 if m :
299304 for test_failure_line in m .group (3 ).strip ("\n " ).split ("\n " ):
0 commit comments