mirror of
https://github.com/flutter/packages.git
synced 2025-06-20 06:08:35 +08:00
[tools] Add 'run_tests.sh' to the dev-only list (#6474)
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
## NEXT
|
## 0.10.0+1
|
||||||
|
|
||||||
|
* Recognizes `run_test.sh` as a developer-only file in `version-check`.
|
||||||
* Adds `readme-check` validation that the example/README.md for a federated
|
* Adds `readme-check` validation that the example/README.md for a federated
|
||||||
plugin's implementation packages has a warning about the intended use of the
|
plugin's implementation packages has a warning about the intended use of the
|
||||||
example instead of the template boilerplate.
|
example instead of the template boilerplate.
|
||||||
|
@ -168,6 +168,9 @@ Future<bool> _isDevChange(List<String> pathComponents,
|
|||||||
// The top-level "tool" directory is for non-client-facing utility
|
// The top-level "tool" directory is for non-client-facing utility
|
||||||
// code, such as test scripts.
|
// code, such as test scripts.
|
||||||
pathComponents.first == 'tool' ||
|
pathComponents.first == 'tool' ||
|
||||||
|
// Entry point for the 'custom-test' command, which is only for CI and
|
||||||
|
// local testing.
|
||||||
|
pathComponents.first == 'run_tests.sh' ||
|
||||||
// Ignoring lints doesn't affect clients.
|
// Ignoring lints doesn't affect clients.
|
||||||
pathComponents.contains('lint-baseline.xml') ||
|
pathComponents.contains('lint-baseline.xml') ||
|
||||||
await _isGradleTestDependencyChange(pathComponents,
|
await _isGradleTestDependencyChange(pathComponents,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: flutter_plugin_tools
|
name: flutter_plugin_tools
|
||||||
description: Productivity utils for flutter/plugins and flutter/packages
|
description: Productivity utils for flutter/plugins and flutter/packages
|
||||||
repository: https://github.com/flutter/plugins/tree/main/script/tool
|
repository: https://github.com/flutter/plugins/tree/main/script/tool
|
||||||
version: 0.10.0
|
version: 0.10.0+1
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
args: ^2.1.0
|
args: ^2.1.0
|
||||||
|
@ -66,6 +66,7 @@ void main() {
|
|||||||
'packages/a_plugin/example/ios/RunnerTests/Foo.m',
|
'packages/a_plugin/example/ios/RunnerTests/Foo.m',
|
||||||
'packages/a_plugin/example/ios/RunnerUITests/info.plist',
|
'packages/a_plugin/example/ios/RunnerUITests/info.plist',
|
||||||
'packages/a_plugin/tool/a_development_tool.dart',
|
'packages/a_plugin/tool/a_development_tool.dart',
|
||||||
|
'packages/a_plugin/run_tests.sh',
|
||||||
'packages/a_plugin/CHANGELOG.md',
|
'packages/a_plugin/CHANGELOG.md',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1059,6 +1059,38 @@ packages/plugin/android/build.gradle
|
|||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('allows missing CHANGELOG and version change for dev-only changes',
|
||||||
|
() async {
|
||||||
|
final RepositoryPackage plugin =
|
||||||
|
createFakePlugin('plugin', packagesDir, version: '1.0.0');
|
||||||
|
|
||||||
|
const String changelog = '''
|
||||||
|
## 1.0.0
|
||||||
|
* Some changes.
|
||||||
|
''';
|
||||||
|
plugin.changelogFile.writeAsStringSync(changelog);
|
||||||
|
processRunner.mockProcessesForExecutable['git-show'] = <io.Process>[
|
||||||
|
MockProcess(stdout: 'version: 1.0.0'),
|
||||||
|
];
|
||||||
|
processRunner.mockProcessesForExecutable['git-diff'] = <io.Process>[
|
||||||
|
// File list.
|
||||||
|
MockProcess(stdout: '''
|
||||||
|
packages/plugin/tool/run_tests.dart
|
||||||
|
packages/plugin/run_tests.sh
|
||||||
|
'''),
|
||||||
|
];
|
||||||
|
|
||||||
|
final List<String> output =
|
||||||
|
await _runWithMissingChangeDetection(<String>[]);
|
||||||
|
|
||||||
|
expect(
|
||||||
|
output,
|
||||||
|
containsAllInOrder(<Matcher>[
|
||||||
|
contains('Running for plugin'),
|
||||||
|
]),
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('allows valid against pub', () async {
|
test('allows valid against pub', () async {
|
||||||
|
Reference in New Issue
Block a user