[flutter_tools] correctly forward error only stdout in non-verbose modes (#63815)
This commit is contained in:
@@ -86,7 +86,9 @@ void main() {
|
||||
'OBJROOT=${fileSystem.path.join(flutterBuildDir.absolute.path, 'Build', 'Intermediates.noindex')}',
|
||||
'SYMROOT=${fileSystem.path.join(flutterBuildDir.absolute.path, 'Build', 'Products')}',
|
||||
if (verbose)
|
||||
'VERBOSE_SCRIPT_LOGGING=YES',
|
||||
'VERBOSE_SCRIPT_LOGGING=YES'
|
||||
else
|
||||
'-quiet',
|
||||
'COMPILER_INDEX_STORE_ENABLE=NO',
|
||||
],
|
||||
stdout: 'STDOUT STUFF',
|
||||
@@ -129,7 +131,7 @@ void main() {
|
||||
FeatureFlags: () => TestFeatureFlags(isMacOSEnabled: true),
|
||||
});
|
||||
|
||||
testUsingContext('macOS build does not spew stdout to status logger', () async {
|
||||
testUsingContext('macOS build forwards error stdout to status logger error', () async {
|
||||
final BuildCommand command = BuildCommand();
|
||||
createMinimalMockProjectFiles();
|
||||
|
||||
@@ -137,7 +139,8 @@ void main() {
|
||||
const <String>['build', 'macos', '--debug']
|
||||
);
|
||||
expect(testLogger.statusText, isNot(contains('STDOUT STUFF')));
|
||||
expect(testLogger.traceText, contains('STDOUT STUFF'));
|
||||
expect(testLogger.traceText, isNot(contains('STDOUT STUFF')));
|
||||
expect(testLogger.errorText, contains('STDOUT STUFF'));
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => fileSystem,
|
||||
ProcessManager: () => FakeProcessManager.list(<FakeCommand>[
|
||||
|
||||
Reference in New Issue
Block a user