Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 376a64f

Browse files
[tools] Add 'run_tests.sh' to the dev-only list (#6474)
1 parent 97d48f4 commit 376a64f

File tree

5 files changed

+39
-2
lines changed

5 files changed

+39
-2
lines changed

script/tool/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 0.10.0+1
22

3+
* Recognizes `run_test.sh` as a developer-only file in `version-check`.
34
* Adds `readme-check` validation that the example/README.md for a federated
45
plugin's implementation packages has a warning about the intended use of the
56
example instead of the template boilerplate.

script/tool/lib/src/common/package_state_utils.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ Future<bool> _isDevChange(List<String> pathComponents,
168168
// The top-level "tool" directory is for non-client-facing utility
169169
// code, such as test scripts.
170170
pathComponents.first == 'tool' ||
171+
// Entry point for the 'custom-test' command, which is only for CI and
172+
// local testing.
173+
pathComponents.first == 'run_tests.sh' ||
171174
// Ignoring lints doesn't affect clients.
172175
pathComponents.contains('lint-baseline.xml') ||
173176
await _isGradleTestDependencyChange(pathComponents,

script/tool/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: flutter_plugin_tools
22
description: Productivity utils for flutter/plugins and flutter/packages
33
repository: https://github.com/flutter/plugins/tree/main/script/tool
4-
version: 0.10.0
4+
version: 0.10.0+1
55

66
dependencies:
77
args: ^2.1.0

script/tool/test/common/package_state_utils_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ void main() {
6666
'packages/a_plugin/example/ios/RunnerTests/Foo.m',
6767
'packages/a_plugin/example/ios/RunnerUITests/info.plist',
6868
'packages/a_plugin/tool/a_development_tool.dart',
69+
'packages/a_plugin/run_tests.sh',
6970
'packages/a_plugin/CHANGELOG.md',
7071
];
7172

script/tool/test/version_check_command_test.dart

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,38 @@ packages/plugin/android/build.gradle
10591059
]),
10601060
);
10611061
});
1062+
1063+
test('allows missing CHANGELOG and version change for dev-only changes',
1064+
() async {
1065+
final RepositoryPackage plugin =
1066+
createFakePlugin('plugin', packagesDir, version: '1.0.0');
1067+
1068+
const String changelog = '''
1069+
## 1.0.0
1070+
* Some changes.
1071+
''';
1072+
plugin.changelogFile.writeAsStringSync(changelog);
1073+
processRunner.mockProcessesForExecutable['git-show'] = <io.Process>[
1074+
MockProcess(stdout: 'version: 1.0.0'),
1075+
];
1076+
processRunner.mockProcessesForExecutable['git-diff'] = <io.Process>[
1077+
// File list.
1078+
MockProcess(stdout: '''
1079+
packages/plugin/tool/run_tests.dart
1080+
packages/plugin/run_tests.sh
1081+
'''),
1082+
];
1083+
1084+
final List<String> output =
1085+
await _runWithMissingChangeDetection(<String>[]);
1086+
1087+
expect(
1088+
output,
1089+
containsAllInOrder(<Matcher>[
1090+
contains('Running for plugin'),
1091+
]),
1092+
);
1093+
});
10621094
});
10631095

10641096
test('allows valid against pub', () async {

0 commit comments

Comments
 (0)