Skip to content

Commit

Permalink
[tools] Recognize Pigeon tests in version-check (flutter#6813)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
stuartmorgan committed Dec 11, 2022
1 parent 2dab59d commit 0609adb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion script/tool/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 3 additions & 1 deletion script/tool/lib/src/common/package_state_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ bool _isTestChange(List<String> 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
Expand Down
2 changes: 1 addition & 1 deletion script/tool/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions script/tool/test/common/package_state_utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0609adb

Please sign in to comment.