Testing presubmit Engine PRs with the Flutter framework
This documentation describes how to run flutter/flutter presubmit checks on flutter/engine PRs before submitting them.
- Wait for all presubmit checks on your flutter/engine PR to be green.
- Determine the commit hash for your flutter/engine PR.
- Create and upload a flutter/flutter PR, (OR run tests locally).
- Wait for flutter/flutter presubmits/tests to run ☕.
Step (1) is the usual flutter/engine workflow.
- Go to the "Commits" tab in the GitHub UI for you Engine PR.
- Click the button to copy the most recent commit hash to your clipboard.
Edit your flutter/flutter checkout as follows:
-
bin/internal/engine.version
should be edited to contain the commit hash from (2). -
bin/internal/engine.realm
should be edited to contain the stringflutter_archives_v2
.
To run flutter/flutter presubmits on CI, you can accomplish these two edits directly in the GitHub editor UI, if desired. Otherwise, upload a flutter/flutter PR with these changes.
You can also build apps, and run tests locally at this point.
The flutter/flutter presubmit checks will run. There will be at least two failures:
- A Flutter CLI test will ensure that a PR with a non-empty
engine.realm
file will fail a presubmit check. - The
fuchsia_precache
test will fail because Fuchsia artifacts are not uploaded from Engine presubmit runs.
Any other failures are possibly due to the changes to flutter/engine, so deflake and examine them carefully.
A subset of devicelab tests are available for optionally running in presubmit on flutter/flutter PRs. They are the tests listed in the flutter/flutter .ci.yaml file that are prefixed with Linux_android
, Mac_android
, and Mac_ios
.
To run one of these tests, remove the line presubmit: false
from the .ci.yaml
file under the test you'd like to run. For an example, see the PR here.
This will trigger the devicelab test to run. The test will show up in the list of presubmit checks, and you can click through to the LUCI page to see the results.
- Home of the Wiki
- Roadmap
- API Reference (stable)
- API Reference (main)
- Glossary
- Contributor Guide
- Chat on Discord
- Design documents
- Code of Conduct
- Issue triage reports (latest)
- Our Values
- Tree hygiene
- Issue hygiene and Triage
- Style guide for Flutter repo
- Project teams
- Contributor access
- What should I work on?
- Popular issues
- Running and writing tests
- Release process
- Flutter Framework Gardener Rotation
- Rolling Dart
- Manual Engine Roll with Breaking Commits
- Updating Material Design Fonts & Icons
- Postmortems and Retrospectives
- Hotfix Documentation Best Practices
- In case of emergency
- Landing Changes With Autosubmit
- Setting up the Framework development environment
- The Framework architecture
- API Docs code block generation
- Running examples
- Using the Dart analyzer
- The flutter run variants
- Test coverage for package:flutter
- Writing a golden-file test for package:flutter
- Managing template image assets
- Setting up the Engine development environment
- Compiling the engine
- Debugging the engine
- Using Sanitizers with the Flutter Engine
- Testing the engine
- The Engine architecture
- Flutter's modes
- Crashes
- more...
- Setting up the Packages development environment
- Plugins and Packages repository structure
- Contributing to Plugins and Packages
- Understanding Packages tests
- Plugin Tests
- Releasing a Plugin or Package
- more...