Unverified Commit 556e374e authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

fix default artifacts to exclude ios and android (#35303)

parent 763ce632
......@@ -30,6 +30,17 @@ class DoctorCommand extends FlutterCommand {
@override
final String description = 'Show information about the installed tooling.';
@override
Future<Set<DevelopmentArtifact>> get requiredArtifacts async {
return <DevelopmentArtifact>{
DevelopmentArtifact.universal,
// This is required because we use gen_snapshot to check if the host
// machine can execute the provided artifacts. See `_genSnapshotRuns`
// in `doctor.dart`.
DevelopmentArtifact.android,
};
}
@override
Future<FlutterCommandResult> runCommand() async {
if (argResults.wasParsed('check-for-remote-artifacts')) {
......
......@@ -479,12 +479,9 @@ abstract class FlutterCommand extends Command<void> {
/// The set of development artifacts required for this command.
///
/// Defaults to [DevelopmentArtifact.universal],
/// [DevelopmentArtifact.android], and [DevelopmentArtifact.iOS].
/// Defaults to [DevelopmentArtifact.universal].
Future<Set<DevelopmentArtifact>> get requiredArtifacts async => const <DevelopmentArtifact>{
DevelopmentArtifact.universal,
DevelopmentArtifact.iOS,
DevelopmentArtifact.android,
};
/// Subclasses must implement this to execute the command.
......
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_tools/src/cache.dart';
import 'package:flutter_tools/src/commands/install.dart';
import 'package:mockito/mockito.dart';
......@@ -11,6 +12,10 @@ import '../src/mocks.dart';
void main() {
group('install', () {
setUpAll(() {
Cache.disableLocking();
});
testUsingContext('returns 0 when Android is connected and ready for an install', () async {
final InstallCommand command = InstallCommand();
applyMocksToCommand(command);
......@@ -21,6 +26,8 @@ void main() {
testDeviceManager.addDevice(device);
await createTestCommandRunner(command).run(<String>['install']);
}, overrides: <Type, Generator>{
Cache: () => MockCache(),
});
testUsingContext('returns 0 when iOS is connected and ready for an install', () async {
......@@ -33,6 +40,10 @@ void main() {
testDeviceManager.addDevice(device);
await createTestCommandRunner(command).run(<String>['install']);
}, overrides: <Type, Generator>{
Cache: () => MockCache(),
});
});
}
class MockCache extends Mock implements Cache {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment