From 07dd07002407d0519188619837cb95bda6e788ff Mon Sep 17 00:00:00 2001 From: Dan Field Date: Fri, 16 Jul 2021 09:55:26 -0700 Subject: [PATCH] Fix logcat checking (flutter/engine#27482) --- engine/src/flutter/ci/firebase_testlab.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) mode change 100644 => 100755 engine/src/flutter/ci/firebase_testlab.py diff --git a/engine/src/flutter/ci/firebase_testlab.py b/engine/src/flutter/ci/firebase_testlab.py old mode 100644 new mode 100755 index c66f58ed40..2b5f440a43 --- a/engine/src/flutter/ci/firebase_testlab.py +++ b/engine/src/flutter/ci/firebase_testlab.py @@ -15,7 +15,7 @@ script_dir = os.path.dirname(os.path.realpath(__file__)) buildroot_dir = os.path.abspath(os.path.join(script_dir, '..', '..')) out_dir = os.path.join(buildroot_dir, 'out') bucket = 'gs://flutter_firebase_testlab' -error_re = re.compile('[EF]/flutter') +error_re = re.compile(r'[EF]/flutter.+') def RunFirebaseTest(apk, results_dir): @@ -47,11 +47,13 @@ def CheckLogcat(results_dir): logcat = subprocess.check_output([ 'gsutil', 'cat', '%s/%s/*/logcat' % (bucket, results_dir) ]) + if not logcat: + sys.exit(1) - logcat_match = error_re.match(logcat) - if logcat_match: + logcat_matches = error_re.findall(logcat) + if logcat_matches: print('Errors in logcat:') - print(logcat_match) + print(logcat_matches) sys.exit(1)