Skip to content

Commit fe6c05b

Browse files
authored
Update links to the flutter/engine repository for the monorepo. (#164328)
Just general cleanup while working on other things.
1 parent c9c3e74 commit fe6c05b

File tree

2 files changed

+39
-56
lines changed

2 files changed

+39
-56
lines changed

engine/src/flutter/README.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# Flutter Engine
22

3-
[![Flutter CI Status](https://flutter-dashboard.appspot.com/api/public/build-status-badge?repo=engine)](https://flutter-dashboard.appspot.com/#/build?repo=engine)
4-
5-
Flutter is Google's SDK for crafting beautiful, fast user experiences for
6-
mobile, web, and desktop from a single codebase. Flutter works with existing
7-
code, is used by developers and organizations around the world, and is free
8-
and open source.
9-
103
The Flutter Engine is a portable runtime for hosting
114
[Flutter](https://flutter.dev) applications. It implements Flutter's core
125
libraries, including animation and graphics, file and network I/O,
@@ -15,16 +8,11 @@ toolchain. Most developers will interact with Flutter via the [Flutter
158
Framework](https://github.com/flutter/flutter), which provides a modern,
169
reactive framework, and a rich set of platform, layout and foundation widgets.
1710

18-
If you want to run/contribute to Flutter Web engine, more tooling can be
19-
found at [felt](lib/web_ui/README.md#using-felt).
20-
This is a tool written to make web engine development experience easy.
11+
More tooling is available to make development experiences easier:
2112

22-
If you are new to Flutter, then you will find more general information
23-
on the Flutter project, including tutorials and samples, on our Web
24-
site at [Flutter.dev](https://flutter.dev). For specific information
25-
about Flutter's APIs, consider our API reference which can be found at
26-
the [docs.flutter.dev](https://docs.flutter.dev/).
13+
| Target | Tool |
14+
| ----------------- | ----------------------------------------------- |
15+
| Web | [`felt`](lib/web_ui/README.md#using-felt) |
16+
| Mobile or Desktop | [`et`](tools/engine_tool/README.md#engine-tool) |
2717

28-
Flutter is a fully open source project, and we welcome contributions.
29-
Information on how to get started can be found at our
30-
[contributor guide](CONTRIBUTING.md).
18+
To learn about running tests, see [testing the engine](docs/testing/Testing-the-engine.md).

engine/src/flutter/docs/testing/Testing-the-engine.md

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
## Testing the engine
2-
3-
Pull requests submitted to the [engine repository](https://github.com/flutter/engine)
4-
should be tested to prevent functional regressions.
1+
# Testing the engine
52

63
This guide describes how to write and run various types of tests in the engine.
74

85
## C++ - core engine
96

10-
If you edit `.cc` files in https://github.com/flutter/engine/tree/main,
7+
If you edit `.cc` files in [`engine`](../../),
118
you're working on the core, portable Flutter engine.
129

13-
### Unit tests
10+
### Unit tests (C++)
1411

1512
C++ unit tests are co-located with their header and source files. For instance,
1613
`fml/file.h` and `fml/file.cc` have a `fml/file_unittest.cc` in the same
@@ -25,15 +22,15 @@ folder.
2522

2623
You can run the C++ unit tests with:
2724

28-
```
25+
```sh
2926
testing/run_tests.py --type=engine
3027
```
3128

3229
from the `flutter` directory, after building the engine variant to test
3330
(by default `host_debug_unopt`). To use a different variant (e.g. if you use
3431
an Apple Silicon Mac), run:
3532

36-
```
33+
```sh
3734
testing/run_tests.py --type=engine --variant=host_debug_unopt_arm64
3835
```
3936

@@ -57,25 +54,25 @@ mocks for all other dependencies.
5754

5855
## Java - Android embedding
5956

60-
If you edit `.java` files in the https://github.com/flutter/engine/tree/main/shell/platform/android
57+
If you edit `.java` files in the [`shell/platform/android`](../../shell/platform/android/)
6158
directory, you're working on the Android embedding which connects the core C++
6259
engine to the Android SDK APIs and runtime.
6360

6461
### Robolectric JUnit tests
6562

6663
For testing logic within a class at a unit level, create or add to a JUnit test.
6764

68-
Existing Java unit tests are located at https://github.com/flutter/engine/tree/main/shell/platform/android/test
69-
and follow the Java package directory structure. Files in the `shell/platform/android/io/flutter/`
70-
package tree can have a parallel file in the `shell/platform/android/test/io/flutter/`
65+
Existing Java unit tests are located at [`shell/platform/android/test`](../../shell/platform/android/test)
66+
and follow the Java package directory structure. Files in the [`shell/platform/android/io/flutter/`](../../shell/platform/android/io/flutter/)
67+
package tree can have a parallel file in the [`shell/platform/android/test/io/flutter/`](../../shell/platform/android/test/io/flutter/)
7168
package tree. Files in matching directories are considered [package visible](https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html)
7269
as is the case in standard Java.
7370

7471
When editing production files in `shell/platform/android/io/flutter/`,
7572
the easiest step to add tests is to look for a matching `...Test.java` file in
7673
`shell/platform/android/test/io/flutter/`.
7774

78-
See the [Java unit test README](https://github.com/flutter/engine/blob/main/shell/platform/android/test/README.md)
75+
See the [Java unit test README](../../shell/platform/android/test/README.md)
7976
for details.
8077

8178
The engine repo has a unified build system to build C, C++, Objective-C,
@@ -87,7 +84,7 @@ standard Android project.
8784

8885
Instead, the engine provides the script:
8986

90-
```
87+
```sh
9188
testing/run_tests.py --type=java
9289
```
9390

@@ -159,7 +156,7 @@ in the root of the monorepo. See
159156

160157
## Objective-C - iOS embedding
161158

162-
If you edit `.h` or `.mm` files in the https://github.com/flutter/engine/tree/main/shell/platform/darwin/ios
159+
If you edit `.h` or `.mm` files in the [`shell/platform/darwin/ios`](../../shell/platform/darwin/ios)
163160
directory, you're working on the iOS embedding which connects the core C++
164161
engine to the iOS SDK APIs and runtime.
165162

@@ -168,23 +165,22 @@ engine to the iOS SDK APIs and runtime.
168165
For testing logic within a class in isolation, create or add to a XCTestCase.
169166

170167
The iOS unit testing infrastructure is split in 2 different locations. The
171-
`...Test.mm` files in https://github.com/flutter/engine/tree/main/shell/platform/darwin/ios
172-
contain the unit tests themselves. The
173-
https://github.com/flutter/engine/tree/main/testing/ios/IosUnitTests directory
174-
contains an Xcode container project to execute the test.
168+
`...Test.mm` files in [`shell/platform/darwin/ios`](../../shell/platform/darwin/ios)
169+
contain the unit tests themselves. The [`testing/ios/IosUnitTests`](../../testing/ios/IosUnitTests/)
170+
directory contains an Xcode container project to execute the test.
175171

176-
See the [iOS unit test README](https://github.com/flutter/engine/blob/main/testing/ios/IosUnitTests/README.md)
172+
See [`testing/ios/IosUnitTests/README.md`](../../testing/ios/IosUnitTests/README.md)
177173
for details on adding new test files.
178174

179175
The engine repo has a unified build system to build C, C++, Objective-C,
180176
Objective-C++, and Java files using [GN](https://gn.googlesource.com/gn/) and
181177
[Ninja](https://ninja-build.org/). Since GN and Ninja has to build the C++
182178
dependencies that the Objective-C classes reference, the tests aren't built by
183-
the Xcode project in https://github.com/flutter/engine/tree/main/testing/ios/IosUnitTests.
179+
the Xcode project in [`testing/ios/IosUnitTests`](../../testing/ios/IosUnitTests/).
184180

185181
Instead, the engine provides the script:
186182

187-
```
183+
```sh
188184
testing/run_tests.py --type=objc
189185
```
190186

@@ -231,22 +227,21 @@ mock all other dependencies with OCMock.
231227
The OCMock library is available as a test dependency when writing XCTests for
232228
the engine.
233229

234-
### End-to-end tests
230+
### End-to-end tests (iOS Embedder)
235231

236232
End-to-end tests exercise the entire iOS embedding with the C++ engine on
237233
a headless iOS simulator. It's an integration test ensuring that
238234
the engine as a whole on iOS is functioning correctly.
239235

240-
The project containing the iOS end-to-end engine test is at
241-
https://github.com/flutter/engine/tree/main/testing/ios_scenario_app/ios.
236+
The project containing the iOS end-to-end engine test is at [`testing/ios_scenario_app/ios`](../../testing/ios_scenario_app/ios/).
242237

243238
This test project is build similarly to a normal debug Flutter app. The Dart
244239
code is bundled in JIT mode and is brought into Xcode with a `.framework`
245240
dependency on the prebuilt local engine. It's then installed and executed on a
246241
simulator via Xcode.
247242

248243
Unlike a normal Flutter app, the Flutter framework on the Dart side is a
249-
lightweight fake at https://github.com/flutter/engine/tree/main/testing/ios_scenario_app/lib
244+
lightweight fake at [`testing/ios_scenario_app/lib`](../../testing/ios_scenario_app/lib/).
250245
that implements some of the basic functionalities of `dart:ui` Window rather
251246
than using the real Flutter framework at `flutter/flutter`.
252247

@@ -256,35 +251,35 @@ The end-to-end test can be executed by running:
256251
testing/ios_scenario_app/run_ios_tests.sh
257252
```
258253

259-
Additional end-to-end instrumented tests can be added to https://github.com/flutter/engine/tree/main/testing/ios_scenario_app/ios/Scenarios/ScenariosTests.
254+
Additional end-to-end instrumented tests can be added to [`testing/ios_scenario_app/ios/Scenarios/ScenariosTests`](../../testing/ios_scenario_app/ios/Scenarios/ScenariosTests/).
260255

261256
If supporting logic is needed for the test case, it can be added to the
262-
Android app under-test in https://github.com/flutter/engine/tree/main/testing/ios_scenario_app/ios/Scenarios/Scenarios
263-
or to the fake Flutter framework under-test in https://github.com/flutter/engine/tree/main/testing/ios_scenario_app/lib.
257+
Android app under-test in [`testing/ios_scenario_app/ios/Scenarios/Scenarios`](../../testing/ios_scenario_app/ios/Scenarios/Scenarios/).
258+
or to the fake Flutter framework under-test in [`testing/ios_scenario_app/lib`](../../testing/ios_scenario_app/lib/).
264259

265260
As best practice, favor adding unit tests if possible since end-to-end tests
266261
are, by nature, non-hermetic, slow and flaky.
267262

268263
End-to-end tests on iOS are executed during pre-submit on our CI system when
269-
submitting PRs to the `flutter/engine` repository.
264+
submitting PRs.
270265

271266
## Dart - dart:ui
272267

273-
If you edit `.dart` files in https://github.com/flutter/engine/tree/main/lib/ui,
274-
you're working on the 'dart:ui' package which is the interface between
275-
the C++ engine and the Dart Flutter framework.
268+
If you edit `.dart` files in [`lib/ui`](../../lib/ui/) you're working on the
269+
`dart:ui` package which is the interface between the C++ engine and the Dart
270+
Flutter framework.
276271

277-
### Unit tests
272+
### Unit tests (Dart)
278273

279-
Dart classes in https://github.com/flutter/engine/tree/main/lib/ui have matching
280-
unit tests at https://github.com/flutter/engine/tree/main/testing/dart.
274+
Dart classes in [`lib/ui`](../../lib/ui/) have matching unit tests at
275+
[`testing/dart`](../../testing/dart/).
281276

282277
When editing production files in the 'dart:ui' package, add to or create a
283278
test file in `testing/dart`.
284279

285280
To run the Dart unit tests, use the script:
286281

287-
```
282+
```sh
288283
testing/run_tests.py --type=dart
289284
```
290285

@@ -317,4 +312,4 @@ Assuming your `flutter` and `engine` working directories are siblings, you can r
317312

318313
## Web engine
319314

320-
Web tests are run via the `felt` command. More details can be found in [lib/web_ui/README.md](https://github.com/flutter/engine/blob/main/lib/web_ui/README.md#hacking-on-the-web-engine).
315+
Web tests are run via the `felt` command. More details can be found in [lib/web_ui/README.md](../../lib/web_ui/README.md).

0 commit comments

Comments
 (0)