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

Commit 04f8ef7

Browse files
[flutter_plugin_tools] Remove xctest's --skip (#4022)
1 parent 464303f commit 04f8ef7

File tree

5 files changed

+10
-17
lines changed

5 files changed

+10
-17
lines changed

script/tool/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.0
2+
3+
- Remove `xctest`'s `--skip`, which is redundant with `--ignore`.
4+
15
## 0.1.4
26

37
- Add a `pubspec-check` command

script/tool/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ dart pub global run flutter_plugin_tools <args>
4646
## Commands
4747

4848
Run with `--help` for a full list of commands and arguments, but the
49-
following shows a number of common commands.
49+
following shows a number of common commands being run for a specific plugin.
5050

5151
All examples assume running from source; see above for running the
5252
published version instead.
@@ -79,7 +79,7 @@ dart run ./script/tool/lib/src/main.dart test --plugins plugin_name
7979

8080
```sh
8181
cd <repository root>
82-
dart run ./script/tool/lib/src/main.dart xctest --target RunnerUITests --skip <plugins_to_skip>
82+
dart run ./script/tool/lib/src/main.dart xctest --plugins plugin_name
8383
```
8484

8585
### Publish a Release

script/tool/lib/src/xctest_command.dart

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import 'package:path/path.dart' as p;
1414
import 'common.dart';
1515

1616
const String _kiOSDestination = 'ios-destination';
17-
const String _kSkip = 'skip';
1817
const String _kXcodeBuildCommand = 'xcodebuild';
1918
const String _kXCRunCommand = 'xcrun';
2019
const String _kFoundNoSimulatorsMessage =
@@ -36,8 +35,6 @@ class XCTestCommand extends PluginCommand {
3635
'this is passed to the `-destination` argument in xcodebuild command.\n'
3736
'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.',
3837
);
39-
argParser.addMultiOption(_kSkip,
40-
help: 'Plugins to skip while running this command. \n');
4138
}
4239

4340
@override
@@ -59,8 +56,6 @@ class XCTestCommand extends PluginCommand {
5956
destination = 'id=$simulatorId';
6057
}
6158

62-
final List<String> skipped = getStringListArg(_kSkip);
63-
6459
final List<String> failingPackages = <String>[];
6560
await for (final Directory plugin in getPlugins()) {
6661
// Start running for package.
@@ -72,11 +67,6 @@ class XCTestCommand extends PluginCommand {
7267
print('\n\n');
7368
continue;
7469
}
75-
if (skipped.contains(packageName)) {
76-
print('$packageName was skipped with the --skip flag.');
77-
print('\n\n');
78-
continue;
79-
}
8070
for (final Directory example in getExamplesForPlugin(plugin)) {
8171
// Running tests and static analyzer.
8272
print('Running tests and analyzer for $packageName ...');

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/master/script/tool
4-
version: 0.1.4
4+
version: 0.2.0
55

66
dependencies:
77
args: ^2.1.0

script/tool/test/xctest_command_test.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ final Map<String, dynamic> _kDeviceListMap = <String, dynamic>{
8383

8484
void main() {
8585
const String _kDestination = '--ios-destination';
86-
const String _kSkip = '--skip';
8786

8887
group('test xctest_command', () {
8988
FileSystem fileSystem;
@@ -121,7 +120,7 @@ void main() {
121120
expect(processRunner.recordedCalls, orderedEquals(<ProcessCall>[]));
122121
});
123122

124-
test('running with correct destination, skip 1 plugin', () async {
123+
test('running with correct destination, exclude 1 plugin', () async {
125124
final Directory pluginDirectory1 =
126125
createFakePlugin('plugin1', packagesDir,
127126
withExtraFiles: <List<String>>[
@@ -151,11 +150,11 @@ void main() {
151150
'xctest',
152151
_kDestination,
153152
'foo_destination',
154-
_kSkip,
153+
'--exclude',
155154
'plugin1'
156155
]);
157156

158-
expect(output, contains('plugin1 was skipped with the --skip flag.'));
157+
expect(output, isNot(contains('Successfully ran xctest for plugin1')));
159158
expect(output, contains('Successfully ran xctest for plugin2'));
160159

161160
expect(

0 commit comments

Comments
 (0)