-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Deferred components integration test app #88030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deferred components integration test app #88030
Conversation
Gold has detected about 6 new digest(s) on patchset 2. |
Gold has detected about 2 new digest(s) on patchset 3. |
5eebf16
to
577396a
Compare
Gold has detected about 6 new digest(s) on patchset 4. |
0076a49
to
81fb4df
Compare
ee2a40b
to
153cd6b
Compare
it would need to remove the binary files |
5f17537
to
84006b1
Compare
subprojects { | ||
project.buildDir = "${rootProject.buildDir}/${project.name}" | ||
} | ||
subprojects { | ||
project.evaluationDependsOn(':app') | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subprojects { | |
project.buildDir = "${rootProject.buildDir}/${project.name}" | |
} | |
subprojects { | |
project.evaluationDependsOn(':app') | |
} | |
subprojects { | |
project.buildDir = "${rootProject.buildDir}/${project.name}" | |
project.evaluationDependsOn(':app') | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably fix this in the template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I think this is just some bad file merging on my end. Templates seem fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I think this is just some bad file merging on my end. Templates seem fine.
@@ -0,0 +1,26 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any thoughts about using Dart for this, similar to some of the other integration tests? For example:
https://github.com/flutter/flutter/blob/master/dev/devicelab/lib/tasks/dart_plugin_registry_tests.dart#L156
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one of the commands is a flutter build command, everything else is a mix of adb, bundletool, etc. I think a shell script may be clearer and more concise for now at least.
@@ -0,0 +1,35 @@ | |||
// Copyright 2014 The Flutter Authors. All rights reserved. | |||
// Use of this source code is governed by a BSD-style license that can be | |||
// found in the LICENSE file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could it use dev/tools/bin/generate_gradle_lockfiles.dar to generate this file as well as the .lockfile?
here's how to use it: https://github.com/flutter/flutter/blob/master/dev/tools/bin/generate_gradle_lockfiles.dart#L16-L19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like that script actually creates both the settings.gradle and build.gradle. Though some of it may be useful, it does generate files that do not implement some of the config needed for deferred components.
Actually, I think I need to go in and add a skip to make sure it doesn't produce incompatible configs for deferred components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script could skip overriding settings.gradle
.
I'm mostly concerned about the lockfiles since those help to keep transient dependencies consistent between builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I changed to skip settings.gradle. build.gradle is generated now and lockfiles are in.
color: Colors.blue, | ||
); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: eof
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: a new line at the end of file
|
||
@override | ||
Widget build(BuildContext context) { | ||
print('Running deferred code'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: could this be a named constant? something like testSentinel='Running deferred code'
👏 awesome! just some minor comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Could we use the Android emulators you added on LUCI to test apps like this?
sleep 12 | ||
exit | ||
" | ||
adb logcat -d -s "flutter" > build/app/outputs/bundle/release/run_logcat.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works if we are using android emulators with -wipe-data
or if there's nothing cached between CI runs. Do you know if this would be the case?
e.g. consider the case where job 1 runs, then job 2 runs and sees the same log line from job 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll go find out :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added filters/timestamping to ensure only the latest run's logs are tracked.
Yes, that is the primary reason why I am writing this test app. |
Awesome! 🎉 |
5d8c423
to
1a601b1
Compare
This adds a deferred components integration test app that uses
flutter drive
to test framework side deferred components loading and a bash script to build and install a split app.Files of interest for reviewers:
test_driver/main_test.dart
,run_release_test.sh
,lib/main.dart
Replaces the flaky test mentioned in #72312