Matan Lurey e301288885 Pub workspace-ify most of testing/ and parts of tools/ (flutter/engine#54124)
Replaces and closes https://github.com/flutter/engine/pull/53997.

This PR migrates the following packages to the pub workspace:
  - testing/benchmark
  - testing/dart
  - testing/litetest
  - testing/pkg_test_demo
  - testing/scenario_app
  - testing/skia_gold_client
  - testing/symbols
  - tools/golden_tests_harvester
  - tools/pkg/process_fakes

It also makes minor changes to the Dart build rules in order to resolve the root package_config, instead of per-package.

I am _not_ totally confident of the `_embedder.yaml` change, but I also can't explain what is needed to continue analyzing `lib/ui` without analysis failures that all of the symbols in `dart:nativewrappers` are missing.
2024-07-26 17:35:50 +00:00
..

Dart UI Tests

The tests in this directory are written in Dart and run on the Flutter engine, typically testing functionality that is not easily tested with C++ tests or is best tested at a higher level (i.e. importing dart:ui).

Running the tests

The simplest way to run these tests is using run_tests.py:

./testing/run_tests.py --type=dart

Or, to run a specific test, provide the base file name as --dart-filter:

./testing/run_tests.py --type=dart --dart-filter=image_filter_test.dart

Note that the tests are compiled as Dart kernel files, and not run from source, if any changes are made to the tests, you will need to recompile them before running the tests:

# At the time of this writing, 'et build' did not work with Dart targets.
# Instead, use the following command to build the tests.

ninja -C ../out/host_debug_unopt_arm64 compile_image_filter_test.dart

To view the outputted golden files locally, you'll need to open the generated output folder, which will vary based on both your current target architecture and the test suite you're running.

For example, for the above test on host_debug_unopt_arm64:

open ../out/host_debug_unopt_arm64/gen/skia_gold_image_filter_test.dart_iplr