mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
This reverts commit 9534082fc0
.
Causes hot_mode_dev_cycle__preview_dart_2_benchmark test timeout.
This commit is contained in:
parent
9534082fc0
commit
5dc4ce85d9
@ -342,10 +342,6 @@ Future<String> _buildAotSnapshot(
|
|||||||
aot : true,
|
aot : true,
|
||||||
strongMode: strongMode,
|
strongMode: strongMode,
|
||||||
);
|
);
|
||||||
if (mainPath == null) {
|
|
||||||
printError('Compiler terminated unexpectedly.');
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
genSnapshotCmd.add(mainPath);
|
genSnapshotCmd.add(mainPath);
|
||||||
|
@ -110,8 +110,8 @@ Future<String> compile(
|
|||||||
.transform(UTF8.decoder)
|
.transform(UTF8.decoder)
|
||||||
.transform(const LineSplitter())
|
.transform(const LineSplitter())
|
||||||
.listen(stdoutHandler.handler);
|
.listen(stdoutHandler.handler);
|
||||||
final int exitCode = await server.exitCode;
|
await server.exitCode;
|
||||||
return exitCode == 0 ? stdoutHandler.outputFilename.future : null;
|
return stdoutHandler.outputFilename.future;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Wrapper around incremental frontend server compiler, that communicates with
|
/// Wrapper around incremental frontend server compiler, that communicates with
|
||||||
@ -175,8 +175,7 @@ class ResidentCompiler {
|
|||||||
|
|
||||||
_server.stdin.writeln('compile $scriptFilename');
|
_server.stdin.writeln('compile $scriptFilename');
|
||||||
|
|
||||||
final int exitCode = await _server.exitCode;
|
return stdoutHandler.outputFilename.future;
|
||||||
return exitCode == 0 ? stdoutHandler.outputFilename.future : null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,9 +76,6 @@ Future<Null> build({
|
|||||||
mainPath: fs.file(mainPath).absolute.path,
|
mainPath: fs.file(mainPath).absolute.path,
|
||||||
strongMode: strongMode
|
strongMode: strongMode
|
||||||
);
|
);
|
||||||
if (kernelBinaryFilename == null) {
|
|
||||||
throwToolExit('Compiler terminated unexpectedly on $mainPath');
|
|
||||||
}
|
|
||||||
kernelContent = new DevFSFileContent(fs.file(kernelBinaryFilename));
|
kernelContent = new DevFSFileContent(fs.file(kernelBinaryFilename));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,28 +74,6 @@ void main() {
|
|||||||
}, overrides: <Type, Generator>{
|
}, overrides: <Type, Generator>{
|
||||||
ProcessManager: () => mockProcessManager,
|
ProcessManager: () => mockProcessManager,
|
||||||
});
|
});
|
||||||
|
|
||||||
testUsingContext('single dart abnormal compiler termination', () async {
|
|
||||||
when(mockFrontendServer.exitCode).thenReturn(255);
|
|
||||||
|
|
||||||
final BufferLogger logger = context[Logger];
|
|
||||||
|
|
||||||
when(mockFrontendServer.stdout)
|
|
||||||
.thenAnswer((Invocation invocation) => new Stream<List<int>>.fromFuture(
|
|
||||||
new Future<List<int>>.value(UTF8.encode(
|
|
||||||
'result abc\nline1\nline2\nabc'
|
|
||||||
))
|
|
||||||
));
|
|
||||||
|
|
||||||
final String output = await compile(sdkRoot: '/path/to/sdkroot',
|
|
||||||
mainPath: '/path/to/main.dart'
|
|
||||||
);
|
|
||||||
expect(mockFrontendServerStdIn.getAndClear(), isEmpty);
|
|
||||||
expect(logger.errorText, equals('compiler message: line1\ncompiler message: line2\n'));
|
|
||||||
expect(output, equals(null));
|
|
||||||
}, overrides: <Type, Generator>{
|
|
||||||
ProcessManager: () => mockProcessManager,
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
group('incremental compile', () {
|
group('incremental compile', () {
|
||||||
@ -147,27 +125,6 @@ void main() {
|
|||||||
ProcessManager: () => mockProcessManager,
|
ProcessManager: () => mockProcessManager,
|
||||||
});
|
});
|
||||||
|
|
||||||
testUsingContext('single dart compile abnormally terminates', () async {
|
|
||||||
when(mockFrontendServer.exitCode).thenReturn(255);
|
|
||||||
|
|
||||||
final BufferLogger logger = context[Logger];
|
|
||||||
|
|
||||||
when(mockFrontendServer.stdout)
|
|
||||||
.thenAnswer((Invocation invocation) => new Stream<List<int>>.fromFuture(
|
|
||||||
new Future<List<int>>.value(UTF8.encode(
|
|
||||||
'result abc\nline1\nline2\nabc /path/to/main.dart.dill'
|
|
||||||
))
|
|
||||||
));
|
|
||||||
|
|
||||||
final String output = await generator.recompile(
|
|
||||||
'/path/to/main.dart', null /* invalidatedFiles */
|
|
||||||
);
|
|
||||||
expect(logger.errorText, equals('compiler message: line1\ncompiler message: line2\n'));
|
|
||||||
expect(output, equals(null));
|
|
||||||
}, overrides: <Type, Generator>{
|
|
||||||
ProcessManager: () => mockProcessManager,
|
|
||||||
});
|
|
||||||
|
|
||||||
testUsingContext('compile and recompile', () async {
|
testUsingContext('compile and recompile', () async {
|
||||||
final BufferLogger logger = context[Logger];
|
final BufferLogger logger = context[Logger];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user