You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: script/tool/lib/src/xctest_command.dart
+36-68Lines changed: 36 additions & 68 deletions
Original file line number
Diff line number
Diff line change
@@ -12,17 +12,15 @@ import 'package:path/path.dart' as p;
12
12
import'common.dart';
13
13
14
14
constString _kiOSDestination ='ios-destination';
15
-
constString _kTarget ='target';
16
15
constString _kSkip ='skip';
17
16
constString _kXcodeBuildCommand ='xcodebuild';
18
17
constString _kXCRunCommand ='xcrun';
19
18
constString _kFoundNoSimulatorsMessage =
20
19
'Cannot find any available simulators, tests failed';
21
20
22
-
/// The command to run iOS' XCTests in plugins, this should work for both XCUnitTest and XCUITest targets.
23
-
/// The tests target have to be added to the xcode project of the example app. Usually at "example/ios/Runner.xcodeproj".
24
-
/// The command takes a "-target" argument which has to match the target of the test target.
25
-
/// For information on how to add test target in an xcode project, see https://developer.apple.com/library/archive/documentation/ToolsLanguages/Conceptual/Xcode_Overview/UnitTesting.html
21
+
/// The command to run iOS XCTests in plugins, this should work for both XCUnitTest and XCUITest targets.
22
+
/// The tests target have to be added to the xcode project of the example app. Usually at "example/ios/Runner.xcworkspace".
23
+
/// The static analyzer is also run.
26
24
classXCTestCommandextendsPluginCommand {
27
25
XCTestCommand(
28
26
Directory packagesDir,
@@ -36,10 +34,6 @@ class XCTestCommand extends PluginCommand {
36
34
'this is passed to the `-destination` argument in xcodebuild command.\n'
37
35
'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.',
38
36
);
39
-
argParser.addOption(_kTarget,
40
-
help:'The test target.\n'
41
-
'This is the xcode project test target. This is passed to the `-scheme` argument in the xcodebuild command. \n'
42
-
'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 scheme');
43
37
argParser.addMultiOption(_kSkip,
44
38
help:'Plugins to skip while running this command. \n');
45
39
}
@@ -49,17 +43,10 @@ class XCTestCommand extends PluginCommand {
49
43
50
44
@override
51
45
finalString description ='Runs the xctests in the iOS example apps.\n\n'
52
-
'This command requires "flutter" to be in your path.';
46
+
'This command requires "flutter" and "xcrun" to be in your path.';
53
47
54
48
@override
55
49
Future<Null> run() async {
56
-
if (argResults[_kTarget] ==null) {
57
-
// TODO(cyanglaz): Automatically find all the available testing schemes if this argument is not specified.
0 commit comments