From 91ea3532983036486bc1ea7ac911d86e8a99ca47 Mon Sep 17 00:00:00 2001 From: Martin Kustermann Date: Wed, 8 Mar 2023 10:22:46 +0000 Subject: [PATCH] [gardening] Make new standalone/io/exit_works_with_blocked_isolate_test be a nop in the training run TEST=Fixes standalone/io/exit_works_with_blocked_isolate_test in app-jit mode Change-Id: Icd4f43dfe524b5a9f8569a520a661289214bfddf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287461 Reviewed-by: Daco Harkes --- .../standalone/io/exit_works_with_blocked_isolate_test.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/standalone/io/exit_works_with_blocked_isolate_test.dart b/tests/standalone/io/exit_works_with_blocked_isolate_test.dart index b31cd79c9fb..76b26ecdbeb 100644 --- a/tests/standalone/io/exit_works_with_blocked_isolate_test.dart +++ b/tests/standalone/io/exit_works_with_blocked_isolate_test.dart @@ -5,6 +5,9 @@ import "dart:io"; import "dart:isolate"; +final bool isAppJitTrainingRun = + Platform.executableArguments.any((arg) => arg == '--snapshot-kind=app-jit'); + child(msg) { // This should work even though the parent isolate is blocked and won't // respond to OOB messages such as shutdown requests. @@ -12,6 +15,8 @@ child(msg) { } main() { + if (isAppJitTrainingRun) return; + Isolate.spawn(child, null); // The test harness provides no input, so this will block forever.