From 5036e58c23e837886a4462be7fc3775b42c17318 Mon Sep 17 00:00:00 2001 From: Derek Xu Date: Fri, 20 Dec 2024 22:15:13 -0500 Subject: [PATCH] Annotate entrypoints in the "isolate spawner" files generated by `flutter test --experimental-faster-testing` (#160694) This fixes the test timeouts (https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20tool_integration_tests_2_5/1951/overview) introduced by the most recent Dart SDK roll (https://github.com/flutter/flutter/commit/895f0e291af00c3d45df0d931900bbad3061b681). --- packages/flutter_tools/lib/src/test/runner.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/flutter_tools/lib/src/test/runner.dart b/packages/flutter_tools/lib/src/test/runner.dart index 908c432dab..6254b884e8 100644 --- a/packages/flutter_tools/lib/src/test/runner.dart +++ b/packages/flutter_tools/lib/src/test/runner.dart @@ -394,6 +394,7 @@ void createChannelAndConnect(String path, String name, Function testMain) { channel.pipe(RemoteListener.start(() => testMain)); } +@pragma('vm:entry-point') void testMain() { final String route = PlatformDispatcher.instance.defaultRouteName; switch (route) { @@ -418,6 +419,7 @@ void testMain() { } } +@pragma('vm:entry-point') void main([dynamic sendPort]) { if (sendPort is SendPort) { final ReceivePort receivePort = ReceivePort(); @@ -495,6 +497,7 @@ Future spawn({ commandPort.send(['spawn', port, entrypoint, route]); } +@pragma('vm:entry-point') void main() async { final String route = PlatformDispatcher.instance.defaultRouteName;