[flutter_tools] prevent running analyze-size with split-debug-info (#66983)
Running a build command with split debug info and analyze size causes a crash in the snapshot analysis library. Disable the combination of these two flags. Fixes #66962
This commit is contained in:
@@ -81,4 +81,21 @@ void main() {
|
||||
|
||||
expect(result.exitCode, 1);
|
||||
});
|
||||
|
||||
testWithoutContext('--analyze-size is not supported in combination with --split-debug-info', () async {
|
||||
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
|
||||
final ProcessResult result = await processManager.run(<String>[
|
||||
flutterBin,
|
||||
...getLocalEngineArguments(),
|
||||
'build',
|
||||
'apk',
|
||||
'--analyze-size',
|
||||
'--target-platform=android-arm64',
|
||||
'--split-debug-info=infos'
|
||||
], workingDirectory: fileSystem.path.join(getFlutterRoot(), 'examples', 'hello_world'));
|
||||
|
||||
expect(result.stderr.toString(), contains('--analyze-size cannot be combined with --split-debug-info'));
|
||||
|
||||
expect(result.exitCode, 1);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user