From e0e4f5ccc2849209327829bfe6f4e1bdea137532 Mon Sep 17 00:00:00 2001 From: Yuqian Li Date: Wed, 9 Oct 2019 13:17:27 -0700 Subject: [PATCH 1/3] Analyze framework Dart code in presubmit tests This fixes https://github.com/flutter/flutter/issues/38848 --- .cirrus.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 72750d2a70291..78c8d55d07f51 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -57,6 +57,11 @@ task: test_framework_script: | cd $FRAMEWORK_PATH/flutter/packages/flutter ../../bin/flutter test --local-engine=host_debug_unopt + analyze_framework_script: | + cd $FRAMEWORK_PATH/flutter + rm -rf bin/cache/pkg/sky_engine + cp -r $ENGINE_PATH/src/out/host_debug_unopt/gen/dart-pkg/sky_engine bin/cache/pkg/ + bin/flutter analyze --dartdocs --flutter-repo - name: build_and_test_android_unopt_debug env: USE_ANDROID: "True" From 471bc648b0275281a6c644a0af61c7841540cfb2 Mon Sep 17 00:00:00 2001 From: Yuqian Li Date: Wed, 9 Oct 2019 13:23:03 -0700 Subject: [PATCH 2/3] Analyze before test --- .cirrus.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 78c8d55d07f51..9ebe6b16f9b46 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -54,14 +54,14 @@ task: cd $FRAMEWORK_PATH/flutter/dev/integration_tests/web ../../../bin/flutter config --local-engine=host_debug_unopt --no-analytics --enable-web ../../../bin/flutter --local-engine=host_debug_unopt build web -v - test_framework_script: | - cd $FRAMEWORK_PATH/flutter/packages/flutter - ../../bin/flutter test --local-engine=host_debug_unopt analyze_framework_script: | cd $FRAMEWORK_PATH/flutter rm -rf bin/cache/pkg/sky_engine cp -r $ENGINE_PATH/src/out/host_debug_unopt/gen/dart-pkg/sky_engine bin/cache/pkg/ - bin/flutter analyze --dartdocs --flutter-repo + bin/flutter analyze --dartdocs --flutter-repo --local-engine=host_debug_unopt + test_framework_script: | + cd $FRAMEWORK_PATH/flutter/packages/flutter + ../../bin/flutter test --local-engine=host_debug_unopt - name: build_and_test_android_unopt_debug env: USE_ANDROID: "True" From 55606f52c59833ef94c71af1b4f70a6699eab6b9 Mon Sep 17 00:00:00 2001 From: Yuqian Li Date: Fri, 11 Oct 2019 11:58:43 -0700 Subject: [PATCH 3/3] Add `flutter update-packages` Otherwise, the analyze would fail. --- .cirrus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cirrus.yml b/.cirrus.yml index 9ebe6b16f9b46..26b5294eddd80 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -58,6 +58,7 @@ task: cd $FRAMEWORK_PATH/flutter rm -rf bin/cache/pkg/sky_engine cp -r $ENGINE_PATH/src/out/host_debug_unopt/gen/dart-pkg/sky_engine bin/cache/pkg/ + bin/flutter update-packages --local-engine=host_debug_unopt bin/flutter analyze --dartdocs --flutter-repo --local-engine=host_debug_unopt test_framework_script: | cd $FRAMEWORK_PATH/flutter/packages/flutter