Skip to content

Commit 65069fb

Browse files
[flutter_plugin_tools] Remove --skip flag
The xctest command has a --skip flag that is redundant with the general --exclude flag. Part of flutter/flutter#83413
1 parent 464303f commit 65069fb

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

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/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)