fix test for null flutter root (#44468)
This commit is contained in:
@@ -87,11 +87,16 @@ class AssembleCommand extends FlutterCommand {
|
|||||||
if (futterProject == null) {
|
if (futterProject == null) {
|
||||||
return const <CustomDimensions, String>{};
|
return const <CustomDimensions, String>{};
|
||||||
}
|
}
|
||||||
final Environment localEnvironment = environment;
|
try {
|
||||||
return <CustomDimensions, String>{
|
final Environment localEnvironment = environment;
|
||||||
CustomDimensions.commandBuildBundleTargetPlatform: localEnvironment.defines['TargetPlatform'],
|
return <CustomDimensions, String>{
|
||||||
CustomDimensions.commandBuildBundleIsModule: '${futterProject.isModule}',
|
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.
|
/// The target we are building.
|
||||||
|
|||||||
@@ -18,15 +18,13 @@ import '../../src/testbed.dart';
|
|||||||
void main() {
|
void main() {
|
||||||
Testbed testbed;
|
Testbed testbed;
|
||||||
MockBuildSystem mockBuildSystem;
|
MockBuildSystem mockBuildSystem;
|
||||||
|
Cache.disableLocking();
|
||||||
setUpAll(() {
|
|
||||||
Cache.disableLocking();
|
|
||||||
});
|
|
||||||
|
|
||||||
setUp(() {
|
setUp(() {
|
||||||
mockBuildSystem = MockBuildSystem();
|
mockBuildSystem = MockBuildSystem();
|
||||||
testbed = Testbed(overrides: <Type, Generator>{
|
testbed = Testbed(overrides: <Type, Generator>{
|
||||||
BuildSystem: () => mockBuildSystem,
|
BuildSystem: () => mockBuildSystem,
|
||||||
|
Cache: () => FakeCache(),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user