mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Work towards https://github.com/flutter/flutter/issues/133569. This PR is a proof of concept that shows we're able to use `package:test` in `flutter/engine` instead of `package:litetest`. I think it also shows that, if we're going to continue to vend dependencies this way, we might want to re-think our strategy in terms of using `pub` as a management tool - it's quite unwieldy already. For example, here is every `pubspec.yaml` file in the repo: ```sh $ find . -name 'pubspec.yaml' -exec sh -c 'echo "$0 $(wc -l < "$0")"' {} \; # Some files omitted in third_party or similar. ./impeller/tessellator/dart/pubspec.yaml 11 ./tools/const_finder/pubspec.yaml 35 ./tools/api_check/pubspec.yaml 90 ./tools/build_bucket_golden_scraper/pubspec.yaml 47 ./tools/licenses/pubspec.yaml 53 ./tools/path_ops/dart/pubspec.yaml 26 ./tools/engine_tool/pubspec.yaml 76 ./tools/dir_contents_diff/pubspec.yaml 19 ./tools/compare_goldens/pubspec.yaml 3 ./tools/golden_tests_harvester/pubspec.yaml 55 ./tools/gen_web_locale_keymap/pubspec.yaml 37 ./tools/githooks/pubspec.yaml 63 ./tools/android_lint/pubspec.yaml 35 ./tools/clang_tidy/pubspec.yaml 76 ./tools/pkg/engine_repo_tools/pubspec.yaml 41 ./tools/pkg/process_fakes/pubspec.yaml 36 ./tools/pkg/engine_build_configs/pubspec.yaml 73 ./tools/pkg/git_repo_tools/pubspec.yaml 60 ./tools/header_guard_check/pubspec.yaml 70 ./sky/packages/sky_engine/pubspec.yaml 8 ./shell/vmservice/pubspec.yaml 8 ./ci/pubspec.yaml 57 ./testing/benchmark/pubspec.yaml 77 ./testing/skia_gold_client/pubspec.yaml 66 ./testing/pkg_test_demo/pubspec.yaml 116 ./testing/smoke_test_failure/pubspec.yaml 31 ./testing/dart/pubspec.yaml 71 ./testing/android_background_image/pubspec.yaml 22 ./testing/litetest/pubspec.yaml 33 ./testing/symbols/pubspec.yaml 24 ./testing/scenario_app/pubspec.yaml 67 ./web_sdk/web_engine_tester/pubspec.yaml 14 ./web_sdk/web_test_utils/pubspec.yaml 22 ./web_sdk/pubspec.yaml 60 ./lib/snapshot/pubspec.yaml 8 ./lib/gpu/pubspec.yaml 14 ./lib/web_ui/pubspec.yaml 60 ./flutter_frontend_server/pubspec.yaml 39 ``` I'll file a follow-up issue to discuss pub-package management in the engine.
Engine Testing
This directory contains the infrastructure for running tests on the engine, which are most often run by Flutter's continuous integration (CI) systems.
The tests themselves are located in other directories, closer to the source for
each platform, language, and variant. For instance, macOS engine unit tests
written in objective C are located in the same directory as the source files,
but with a Test suffix added (e.g. "FlutterEngineTest.mm" holds the tests for
"FlutterEngine.mm", and they are located in the same directory).
Testing the Engine locally
If you are working on the engine, you will want to be able to run tests locally.
In order to learn the details of how do that, please consult the Flutter Wiki page on the subject.