flutter/packages/flutter_tools/test/integration.shard
Victoria Ashworth 46b03c3529
Symlink SwiftPM plugins in the same directory (#168932)
This PR symlinks SwiftPM plugins in the same directory so that they're
relative to each other and the `FlutterGeneratedPluginSwiftPackage`.

This allows plugins to depend on each other via relative paths.

For example,

> Flutter/ephemeral/Packages/.packages/plugin_a --> symlink -->
/local/path/to/plugin_a
> Flutter/ephemeral/Packages/.packages/plugin_b --> symlink -->
/path/to/.pub-cache/plugin_b

Then in plugin_b's Package.swift, you can do the following to add a
dependency on plugin_a:
```swift
dependencies: [
  .package(name: "plugin_a", path: "../plugin_a"),
],
```

Addresses https://github.com/flutter/flutter/issues/166528 and
incremental change toward
https://github.com/flutter/flutter/issues/166489.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-06-02 16:11:06 +00:00
..
debug_adapter Roll package:dds to 5.0.2 (#169471) 2025-05-26 18:43:10 +00:00
isolated [native assets] Graduate to preview (#169194) 2025-05-21 16:54:42 +00:00
test_data Fix DDC library bundle format test files to correctly pass flags (#169095) 2025-05-19 22:05:15 +00:00
analyze_all_templates_test.dart Remove --template=skeleton and add a placeholder error message instead. (#160695) 2024-12-24 00:02:29 +00:00
analyze_once_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
analyze_size_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
analyze_suggestions_integration_test.dart Add kotlin compatability to build file validation (#167143) 2025-04-18 16:32:08 +00:00
android_e2e_api_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_gradle_daemon_cache_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_gradle_flutter_source_path_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_gradle_java_version_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_gradle_legacy_flutter_plugins_strings_in_comments_test.dart Update Java Versions to 21 on CI (#165210) 2025-03-24 22:43:22 +00:00
android_gradle_outputs_app_link_settings_test.dart Convert AppLinkSettings to kotlin (#164391) 2025-03-11 17:00:17 +00:00
android_gradle_print_build_variants_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_plugin_compilesdkversion_mismatch_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_plugin_example_app_build_test.dart Update gradle memory properties in example and test projects (#163798) 2025-02-21 21:08:20 +00:00
android_plugin_ndkversion_mismatch_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_plugin_new_output_dir_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_run_flutter_gradle_plugin_tests_test.dart Change FGP unit test expect to match on process result instead of exit code (#168278) 2025-05-05 17:08:14 +00:00
asset_transformation_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
background_isolate_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
bash_entrypoint_test.dart Re-enable bash_entrypoint_test.dart (#165809) 2025-03-24 18:47:17 +00:00
batch_entrypoint_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
break_on_framework_exceptions_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
build_ios_config_only_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
build_macos_config_only_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
cache_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
command_output_test.dart Let tests mock the list of feature flags (#169140) 2025-05-29 20:40:34 +00:00
coverage_collection_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
daemon_mode_test.dart apply dart_style 3.0.1 (#160875) 2024-12-27 00:06:41 +00:00
debugger_stepping_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
default_flavor_test.dart Roll forward: "Initialize default-app-flavor" (#169298) (#169602) 2025-05-28 20:15:01 +00:00
deferred_components_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
devtools_uri_test.dart Define and use flutterBin consistently across integration.shard. (#159007) 2024-11-18 19:00:04 +00:00
downgrade_upgrade_integration_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
driver_environment_test.dart Propagate environment variables when flutter drive is invoked. (#161452) 2025-01-13 18:48:58 +00:00
exit_code_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
expression_evaluation_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_attach_test.dart Start removing Observatory support and references (#169216) 2025-05-24 00:00:30 +00:00
flutter_build_android_app_project_builddir_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_build_apk_verbose_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_build_config_only_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_build_wasm_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_build_windows_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_build_with_compilation_error_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_plugins_dependencies_test.dart [iOS/macOS] Add Xcode error if dev dependencies are incorrect (#165916) 2025-04-11 19:34:38 +00:00
flutter_run_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_run_with_error_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
forbidden_imports_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
gen_l10n_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
gradle_non_android_plugin_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
hot_reload_errors_test.dart Use recompile-restart instruction when hot restarting on the web (#162616) 2025-02-04 21:24:44 +00:00
hot_reload_test.dart Implement hot reload using the DDC library bundle format (#162498) 2025-02-03 06:10:24 +00:00
hot_reload_with_asset_test.dart Implement hot reload using the DDC library bundle format (#162498) 2025-02-03 06:10:24 +00:00
hot_restart_with_unhandled_exception_test.dart [ Hot Restart ] Fix possible hang due to unhandled exception in UI isolates on hot restart (#165693) 2025-03-26 16:50:07 +00:00
lifetime_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
lldb_init_test.dart Add lldb init file (#164344) 2025-03-06 21:21:52 +00:00
macos_assemble_test.dart Call xcode_backend.dart from macos_assemble.sh (#168108) 2025-05-13 15:57:26 +00:00
observatory_port_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
overall_experience_test.dart [flutter_tools] remove SkSL bundling and dump skp on compilation. (#162849) 2025-02-10 16:54:02 +00:00
plist_parser_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
README.md Added missing code block language in docs (#147481) 2024-05-01 14:44:27 +00:00
shader_compiler_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
stateless_stateful_hot_reload_test.dart Implement hot reload using the DDC library bundle format (#162498) 2025-02-03 06:10:24 +00:00
swift_package_manager_create_app_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
swift_package_manager_create_plugin_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
swift_package_manager_test.dart Symlink SwiftPM plugins in the same directory (#168932) 2025-06-02 16:11:06 +00:00
swift_package_manager_utils.dart Symlink SwiftPM plugins in the same directory (#168932) 2025-06-02 16:11:06 +00:00
template_manifest_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
test_driver.dart Roll forward: "Initialize default-app-flavor" (#169298) (#169602) 2025-05-28 20:15:01 +00:00
test_test.dart Start removing Observatory support and references (#169216) 2025-05-24 00:00:30 +00:00
test_utils.dart Refactor writing of package config in tests (#163734) 2025-02-28 08:51:59 +00:00
timeline_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
tool_backend_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
transition_test_utils.dart [tool] Fix broken comment references and code spans in doc comments (#168498) 2025-05-15 21:14:26 +00:00
unit_coverage_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
variable_expansion_windows_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
variable_expansion_windows.dart Enable avoid_print lint. (#91444) 2021-10-07 16:48:04 -07:00
vmservice_integration_test.dart [flutter_tools] remove SkSL bundling and dump skp on compilation. (#162849) 2025-02-10 16:54:02 +00:00
web_plugin_registrant_test.dart [tool] Fix broken comment references and code spans in doc comments (#168498) 2025-05-15 21:14:26 +00:00
widget_preview_test.dart [ Widget Previews ] Remove deprecated desktop support (#169703) 2025-06-02 15:23:43 +00:00
xcode_backend_test.dart Validate build configuration during Xcode build phase (#169395) 2025-05-29 19:00:56 +00:00
xcode_verify_configuration_test.dart Validate build configuration during Xcode build phase (#169395) 2025-05-29 19:00:56 +00:00

Integration tests

These tests are not hermetic, and use the actual Flutter SDK. While they don't require actual devices, they run flutter_tester to test Dart VM and Flutter integration.

Use this command to run (from the flutter_tools directory):

../../bin/cache/dart-sdk/bin/dart run test test/integration.shard

You need to have downloaded the Dart SDK in your Flutter clone for this to work. Running ../../bin/flutter will automatically download it.

Coverage exclusion

These tests are expensive to run and do not give meaningful coverage information for the flutter tool (since they are black-box tests that run the tool as a subprocess, rather than being unit tests). For this reason, they are in a separate shard when running on continuous integration and are not run when calculating coverage.

Adding new test files

When adding a new test file make sure that it ends with _test.dart, or else it will not be run.