Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 03543b2

Browse files
authored
[docs] Add missing steps to Testing Presubmit Engine PRs (#54593)
Most framework tests perform a `flutter precache` or rely on the web SDK in some form. The Web SDK is not build in presubmit by default. As such, developers will need to manually comment out the `runIf` conditional block that prevents the web SDK from being built during presubmit, then later hope they uncomment it before landing their patch. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent c94651c commit 03543b2

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

docs/Testing-presubmit-Engine-PRs-with-the-Flutter-framework.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,31 @@
22

33
This documentation describes how to run flutter/flutter presubmit checks on flutter/engine PRs before submitting them.
44

5-
# Overview
5+
## Overview
66

7-
1. Wait for all presubmit checks on your flutter/engine PR to be green.
8-
2. Determine the commit hash for your flutter/engine PR.
9-
3. Create and upload a flutter/flutter PR, (OR run tests locally).
10-
4. Wait for flutter/flutter presubmits/tests to run ☕.
7+
1. Enable the web SDK presubmits.
8+
2. Wait for all presubmit checks on your flutter/engine PR to be green.
9+
3. Determine the commit hash for your flutter/engine PR.
10+
4. Create and upload a flutter/flutter PR, (OR run tests locally).
11+
5. Wait for flutter/flutter presubmits/tests to run ☕.
12+
6. Edit `.ci.yaml` to uncomment the `runIf` block you commented out above.
1113

12-
Step (1) is the usual flutter/engine workflow.
14+
## 1. Edit .ci.yaml
1315

14-
# 2. The commit hash
16+
Edit [`.ci.yaml`](https://github.com/flutter/engine/blob/main/.ci.yaml) to comment out the `runIf:` block in `linux_web_engine`. This will ensure Flutter Web artifacts build, otherwise most framework tests will fail during precache.
17+
18+
## 2. Wait
19+
20+
Contemplate the nature of the universe or why it is that this workflow was necessary for your situation. Could tests have been added to the engine? If not, get youself some coffee and a cookie. You'll need them.
21+
22+
## 3. The commit hash
1523

1624
1. Go to the "Commits" tab in the GitHub UI for you Engine PR.
1725
1. Click the button to copy the most recent commit hash to your clipboard.
1826

1927
<img width="1128" alt="Screenshot 2023-08-04 at 12 54 55 PM" src="https://github.com/flutter/flutter/assets/6343103/491be0dd-e29b-4057-a077-3a28d3beec9e">
2028

21-
# 3. Create and upload a flutter/flutter PR.
29+
## 4. Create and upload a flutter/flutter PR.
2230

2331
Edit your flutter/flutter checkout as follows:
2432

@@ -29,15 +37,15 @@ To run flutter/flutter presubmits on CI, you can accomplish these two edits dire
2937

3038
You can also build apps, and run tests locally at this point.
3139

32-
# 4. Wait for flutter/flutter presubmits to run ☕.
40+
## 5. Wait for flutter/flutter presubmits to run ☕.
3341

3442
The flutter/flutter presubmit checks will run. There will be at least two failures:
3543
1. A Flutter CLI test will ensure that a PR with a non-empty `engine.realm` file will fail a presubmit check.
3644
1. The `fuchsia_precache` test will fail because Fuchsia artifacts are not uploaded from Engine presubmit runs.
3745

3846
Any other failures are possibly due to the changes to flutter/engine, so deflake and examine them carefully.
3947

40-
# 5. Devicelab tests
48+
## 6. Devicelab tests
4149

4250
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](https://github.com/flutter/flutter/blob/main/.ci.yaml) file that are prefixed with `Linux_android`, `Mac_android`, and `Mac_ios`.
4351

0 commit comments

Comments
 (0)