Commit 111392d7 authored by Devon Carew's avatar Devon Carew

run pub get (w/ symlinks) for flutter drive (#4259)

* run pub get (w/ symlinks) for flutter drive

* review comments
parent d6147fd7
......@@ -12,8 +12,11 @@ import '../android/android_device.dart' show AndroidDevice;
import '../application_package.dart';
import '../base/file_system.dart';
import '../base/common.dart';
import '../base/logger.dart';
import '../base/os.dart';
import '../base/process.dart';
import '../build_info.dart';
import '../dart/sdk.dart';
import '../device.dart';
import '../globals.dart';
import '../ios/simulators.dart' show SimControl, IOSSimulatorUtils;
......@@ -121,6 +124,16 @@ class DriveCommand extends RunCommandBase {
printStatus('Will connect to already running application instance.');
}
// Check for the existance of a `packages/` directory; pub test does not yet
// support running without symlinks.
if (!new io.Directory('packages').existsSync()) {
Status status = logger.startProgress(
'Missing packages directory; running `pub get` (to work around https://github.com/dart-lang/test/issues/327):'
);
await runAsync(<String>[sdkBinaryName('pub'), 'get', '--no-precompile']);
status.stop(showElapsedTime: true);
}
try {
return await testRunner(<String>[testFile])
.catchError((dynamic error, dynamic stackTrace) {
......
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