Unverified Commit 6ca9cd7b authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Use real flutter root for finding pub in command integration test (#64021)

parent 48287750
......@@ -6,6 +6,7 @@ import 'dart:async';
import 'package:flutter_tools/src/artifacts.dart';
import 'package:flutter_tools/src/base/common.dart';
import 'package:flutter_tools/src/cache.dart';
import 'package:mockito/mockito.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/file_system.dart';
......@@ -17,13 +18,16 @@ import 'package:flutter_tools/src/commands/analyze.dart';
import 'package:flutter_tools/src/dart/analysis.dart';
import 'package:flutter_tools/src/dart/pub.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/runner/flutter_command_runner.dart';
import 'package:process/process.dart';
import '../../src/common.dart';
import '../../src/context.dart';
void main() {
setUpAll(() {
Cache.flutterRoot = getFlutterRoot();
});
AnalysisServer server;
Directory tempDir;
FileSystem fileSystem;
......@@ -33,13 +37,11 @@ void main() {
Logger logger;
setUp(() {
platform = const LocalPlatform();
fileSystem = LocalFileSystem.instance;
platform = const LocalPlatform();
processManager = const LocalProcessManager();
terminal = AnsiTerminal(platform: platform, stdio: Stdio());
logger = BufferLogger(outputPreferences: OutputPreferences.test(), terminal: terminal);
FlutterCommandRunner.initFlutterRoot();
tempDir = fileSystem.systemTempDirectory.createTempSync('flutter_analysis_test.');
});
......
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