[dartdev] Fix resident compiler tests

Explicitly set `--resident-compiler-info-file`.

Closes: https://github.com/dart-lang/sdk/issues/62598
Closes: https://github.com/dart-lang/sdk/issues/62599

Change-Id: Iefd6ab479c2f5a4291156f453e2f3f4f5fc66fc3
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/486181
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
Daco Harkes
2026-03-06 12:23:07 -08:00
committed by Commit Queue
parent 2ddceeaa3f
commit 769752be6f
2 changed files with 17 additions and 2 deletions
+6 -1
View File
@@ -961,7 +961,12 @@ Future<void> main() async {
expect(pubGetResult.stderr, isEmpty);
expect(pubGetResult.exitCode, 0);
ProcessResult result = await p.run(['run', '--resident', 'bin/main.dart']);
ProcessResult result = await p.run([
'run',
'--resident',
'--$residentCompilerInfoFileOption=$serverInfoFile',
'bin/main.dart',
]);
expect(result.stdout, contains('file://'));
expect(result.exitCode, 0);
+11 -1
View File
@@ -43,8 +43,18 @@ void main([List<String> args = const []]) async {
testModifier += verbose ? ' verbose' : '';
test('dart run$testModifier', timeout: longTimeout, () async {
await nativeAssetsTest('dart_app', (dartAppUri) async {
final serverInfoFile = File.fromUri(
dartAppUri.resolve('.resident-info'),
).path;
final result = await runDart(
arguments: ['run', if (residentCompiler) '-r', if (verbose) '-v'],
arguments: [
'run',
if (residentCompiler) ...[
'--resident',
'--resident-compiler-info-file=$serverInfoFile',
],
if (verbose) '-v',
],
workingDirectory: dartAppUri,
logger: logger,
);