From 0609adb457fd448be2f3c3684cc7582814fef4f8 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Sat, 10 Dec 2022 20:09:32 -0500 Subject: [PATCH] [tools] Recognize Pigeon tests in version-check (#6813) Pigeon has an usual test structure since it generates test code to run in a dummy plugin; add that structure to the list of recognized tests so that changes to its platform tests won't be flagged by `version-check`. --- script/tool/CHANGELOG.md | 3 ++- script/tool/lib/src/common/package_state_utils.dart | 4 +++- script/tool/pubspec.yaml | 2 +- script/tool/test/common/package_state_utils_test.dart | 3 +++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/script/tool/CHANGELOG.md b/script/tool/CHANGELOG.md index a346ac093c68..021259083af8 100644 --- a/script/tool/CHANGELOG.md +++ b/script/tool/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 13.1 +* Updates `version-check` to recognize Pigeon's platform test structure. * Pins `package:git` dependency to `2.0.x` until `dart >=2.18.0` becomes our oldest legacy. * Updates test mocks. diff --git a/script/tool/lib/src/common/package_state_utils.dart b/script/tool/lib/src/common/package_state_utils.dart index 5aabd75a4d31..464dac6c18d6 100644 --- a/script/tool/lib/src/common/package_state_utils.dart +++ b/script/tool/lib/src/common/package_state_utils.dart @@ -110,7 +110,9 @@ bool _isTestChange(List pathComponents) { pathComponents.contains('integration_test') || pathComponents.contains('androidTest') || pathComponents.contains('RunnerTests') || - pathComponents.contains('RunnerUITests'); + pathComponents.contains('RunnerUITests') || + // Pigeon's custom platform tests. + pathComponents.first == 'platform_tests'; } // True if the given file is an example file other than the one that will be diff --git a/script/tool/pubspec.yaml b/script/tool/pubspec.yaml index e450a1114e87..2879ff125020 100644 --- a/script/tool/pubspec.yaml +++ b/script/tool/pubspec.yaml @@ -1,7 +1,7 @@ name: flutter_plugin_tools description: Productivity utils for flutter/plugins and flutter/packages repository: https://github.com/flutter/plugins/tree/main/script/tool -version: 0.13.0 +version: 0.13.1 dependencies: args: ^2.1.0 diff --git a/script/tool/test/common/package_state_utils_test.dart b/script/tool/test/common/package_state_utils_test.dart index c9ae5ba4c742..86029cdf73a8 100644 --- a/script/tool/test/common/package_state_utils_test.dart +++ b/script/tool/test/common/package_state_utils_test.dart @@ -80,6 +80,9 @@ void main() { 'packages/a_plugin/example/macos/Runner.xcodeproj/project.pbxproj', 'packages/a_plugin/example/windows/CMakeLists.txt', 'packages/a_plugin/example/pubspec.yaml', + // Pigeon platform tests, which have an unusual structure. + 'packages/a_plugin/platform_tests/shared_test_plugin_code/lib/integration_tests.dart', + 'packages/a_plugin/platform_tests/test_plugin/windows/test_plugin.cpp', ]; final PackageChangeState state = await checkPackageChangeState(package,