mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
fix test for null flutter root (#44468)
This commit is contained in:
parent
03ac37af08
commit
9fa0f3b2ea
@ -87,11 +87,16 @@ class AssembleCommand extends FlutterCommand {
|
||||
if (futterProject == null) {
|
||||
return const <CustomDimensions, String>{};
|
||||
}
|
||||
final Environment localEnvironment = environment;
|
||||
return <CustomDimensions, String>{
|
||||
CustomDimensions.commandBuildBundleTargetPlatform: localEnvironment.defines['TargetPlatform'],
|
||||
CustomDimensions.commandBuildBundleIsModule: '${futterProject.isModule}',
|
||||
};
|
||||
try {
|
||||
final Environment localEnvironment = environment;
|
||||
return <CustomDimensions, String>{
|
||||
CustomDimensions.commandBuildBundleTargetPlatform: localEnvironment.defines['TargetPlatform'],
|
||||
CustomDimensions.commandBuildBundleIsModule: '${futterProject.isModule}',
|
||||
};
|
||||
} catch (err) {
|
||||
// We've failed to send usage.
|
||||
}
|
||||
return const <CustomDimensions, String>{};
|
||||
}
|
||||
|
||||
/// The target we are building.
|
||||
|
||||
@ -18,15 +18,13 @@ import '../../src/testbed.dart';
|
||||
void main() {
|
||||
Testbed testbed;
|
||||
MockBuildSystem mockBuildSystem;
|
||||
|
||||
setUpAll(() {
|
||||
Cache.disableLocking();
|
||||
});
|
||||
Cache.disableLocking();
|
||||
|
||||
setUp(() {
|
||||
mockBuildSystem = MockBuildSystem();
|
||||
testbed = Testbed(overrides: <Type, Generator>{
|
||||
BuildSystem: () => mockBuildSystem,
|
||||
Cache: () => FakeCache(),
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user