Skip to content

Commit e74b239

Browse files
mkustermanncommit-bot@chromium.org
authored andcommitted
[gardening] Fix test to pass along VM arguments to subprocess
If the test runs in AOT mode the executable is `dart_precompiled_runtime` and the script is the AOT snapshot. If the AOT snapshot was compiled with `--enable-assert` then the subprocess has to be launched with the same flag. TEST=Fixes current test failure in dartkp-weak-asserts-mac-release-simarm64 mode. Change-Id: I69a17f9a355f8729e9047f98c920a5c7c2480293 Fixed: 3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187920 Reviewed-by: Vyacheslav Egorov <vegorov@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
1 parent 93f4ac0 commit e74b239

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

tests/standalone/io/https_connection_closed_during_handshake_test.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ void main(List<String> args) async {
5050

5151
asyncStart();
5252

53-
final serverProcess = await Process.start(
54-
Platform.executable, [Platform.script.toFilePath(), 'server']);
53+
final serverProcess = await Process.start(Platform.executable, [
54+
...Platform.executableArguments,
55+
Platform.script.toFilePath(),
56+
'server'
57+
]);
5558
final serverPortCompleter = Completer<int>();
5659

5760
serverProcess.stdout

tests/standalone_2/io/https_connection_closed_during_handshake_test.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@ void main(List<String> args) async {
4747
print('server: exiting');
4848
exit(1);
4949
}
50+
5051
asyncStart();
5152

52-
final serverProcess = await Process.start(
53-
Platform.executable, [Platform.script.toFilePath(), 'server']);
53+
final serverProcess = await Process.start(Platform.executable, [
54+
...Platform.executableArguments,
55+
Platform.script.toFilePath(),
56+
'server'
57+
]);
5458
final serverPortCompleter = Completer<int>();
5559

5660
serverProcess.stdout

0 commit comments

Comments
 (0)