[ddc] use snapshot when running worker test.
The snapshot is already available in the build directory, this makes the test save up 11 times all the parse and warmup costs of loading the compiler in the VM. In aggregate, this made the test run in 5 seconds instead of 2 and half minutes on my local desktop. Change-Id: Ic0f1ef030b06467999fd0178b599de697f8ccc94 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264730 Commit-Queue: Sigmund Cherem <sigmund@google.com> Reviewed-by: Nate Bosch <nbosch@google.com>
This commit is contained in:
committed by
Commit Queue
parent
f14aba03e7
commit
9846309cf0
@@ -12,18 +12,19 @@ import 'package:test/test.dart';
|
||||
|
||||
Directory tmp = Directory.systemTemp.createTempSync('ddc_worker_test');
|
||||
File file(String path) => File.fromUri(tmp.uri.resolve(path));
|
||||
String _resolvePath(String executableRelativePath) {
|
||||
return Uri.file(Platform.resolvedExecutable)
|
||||
.resolve(executableRelativePath)
|
||||
.toFilePath();
|
||||
}
|
||||
|
||||
void main() {
|
||||
var baseArgs = <String>[];
|
||||
final executableArgs = <String>[
|
||||
Platform.script
|
||||
.resolve('../../bin/dartdevc.dart')
|
||||
.toFilePath(windows: Platform.isWindows),
|
||||
_resolvePath('gen/dartdevc.dart.snapshot'),
|
||||
'--sound-null-safety',
|
||||
'--dart-sdk-summary',
|
||||
Uri.file(Platform.resolvedExecutable, windows: Platform.isWindows)
|
||||
.resolve('ddc_outline_sound.dill')
|
||||
.path
|
||||
_resolvePath('ddc_outline_sound.dill'),
|
||||
];
|
||||
group('DDC: Hello World', () {
|
||||
final argsFile = file('hello_world.args');
|
||||
|
||||
Reference in New Issue
Block a user