[flutter_plugin_tools] Remove xctest's --skip (#4022)
diff --git a/script/tool/CHANGELOG.md b/script/tool/CHANGELOG.md
index 6250e2a..bd0875c 100644
--- a/script/tool/CHANGELOG.md
+++ b/script/tool/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.2.0
+
+- Remove `xctest`'s `--skip`, which is redundant with `--ignore`.
+
## 0.1.4
- Add a `pubspec-check` command
diff --git a/script/tool/README.md b/script/tool/README.md
index 3e9484c..8ff33a8 100644
--- a/script/tool/README.md
+++ b/script/tool/README.md
@@ -46,7 +46,7 @@
## Commands
Run with `--help` for a full list of commands and arguments, but the
-following shows a number of common commands.
+following shows a number of common commands being run for a specific plugin.
All examples assume running from source; see above for running the
published version instead.
@@ -79,7 +79,7 @@
```sh
cd <repository root>
-dart run ./script/tool/lib/src/main.dart xctest --target RunnerUITests --skip <plugins_to_skip>
+dart run ./script/tool/lib/src/main.dart xctest --plugins plugin_name
```
### Publish a Release
diff --git a/script/tool/lib/src/xctest_command.dart b/script/tool/lib/src/xctest_command.dart
index e41164e..c877530 100644
--- a/script/tool/lib/src/xctest_command.dart
+++ b/script/tool/lib/src/xctest_command.dart
@@ -14,7 +14,6 @@
import 'common.dart';
const String _kiOSDestination = 'ios-destination';
-const String _kSkip = 'skip';
const String _kXcodeBuildCommand = 'xcodebuild';
const String _kXCRunCommand = 'xcrun';
const String _kFoundNoSimulatorsMessage =
@@ -36,8 +35,6 @@
'this is passed to the `-destination` argument in xcodebuild command.\n'
'See https://developer.apple.com/library/archive/technotes/tn2339/_index.html#//apple_ref/doc/uid/DTS40014588-CH1-UNIT for details on how to specify the destination.',
);
- argParser.addMultiOption(_kSkip,
- help: 'Plugins to skip while running this command. \n');
}
@override
@@ -59,8 +56,6 @@
destination = 'id=$simulatorId';
}
- final List<String> skipped = getStringListArg(_kSkip);
-
final List<String> failingPackages = <String>[];
await for (final Directory plugin in getPlugins()) {
// Start running for package.
@@ -72,11 +67,6 @@
print('\n\n');
continue;
}
- if (skipped.contains(packageName)) {
- print('$packageName was skipped with the --skip flag.');
- print('\n\n');
- continue;
- }
for (final Directory example in getExamplesForPlugin(plugin)) {
// Running tests and static analyzer.
print('Running tests and analyzer for $packageName ...');
diff --git a/script/tool/pubspec.yaml b/script/tool/pubspec.yaml
index ab422da..5d2200a 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/master/script/tool
-version: 0.1.4
+version: 0.2.0
dependencies:
args: ^2.1.0
diff --git a/script/tool/test/xctest_command_test.dart b/script/tool/test/xctest_command_test.dart
index 174dba1..ede2311 100644
--- a/script/tool/test/xctest_command_test.dart
+++ b/script/tool/test/xctest_command_test.dart
@@ -83,7 +83,6 @@
void main() {
const String _kDestination = '--ios-destination';
- const String _kSkip = '--skip';
group('test xctest_command', () {
FileSystem fileSystem;
@@ -121,7 +120,7 @@
expect(processRunner.recordedCalls, orderedEquals(<ProcessCall>[]));
});
- test('running with correct destination, skip 1 plugin', () async {
+ test('running with correct destination, exclude 1 plugin', () async {
final Directory pluginDirectory1 =
createFakePlugin('plugin1', packagesDir,
withExtraFiles: <List<String>>[
@@ -151,11 +150,11 @@
'xctest',
_kDestination,
'foo_destination',
- _kSkip,
+ '--exclude',
'plugin1'
]);
- expect(output, contains('plugin1 was skipped with the --skip flag.'));
+ expect(output, isNot(contains('Successfully ran xctest for plugin1')));
expect(output, contains('Successfully ran xctest for plugin2'));
expect(