mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() Better debugging to investigate: https://github.com/flutter/flutter/issues/125241 When the `test/integration.shard/break_on_framework_exceptions_test.dart` test times out, log out verbose logging to give clues as to why it did not complete. From one local run it looks like the test runner is failing to load a test file (when I checked the path locally, the file was there, and re-running the `flutter test ...` invocation succeeded--in that the app threw an exception): ``` 14:12 +26 -1: breaks when StatefulWidget.build throws [E] Timed out launching `flutter test` package:matcher fail test/integration.shard/break_on_framework_exceptions_test.dart 623:11 _timeoutAfter.<fn> 250s Spawning flutter [test, --disable-service-auth-codes, --machine, --start-paused, test/test.dart] in /tmp/flutter_break_on_framework_exceptions.GUJDAZ 251s <=stdout= {"protocolVersion":"0.1.1","runnerVersion":null,"pid":25763,"type":"start","time":0} <=stdout= {"suite":{"id":0,"platform":"vm","path":"/tmp/flutter_break_on_framework_exceptions.GUJDAZ/test/test.dart"},"type":"suite","time":0} <=stdout= {"test":{"id":1,"name":"loading /tmp/flutter_break_on_framework_exceptions.GUJDAZ/test/test.dart","suiteID":0,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":0} 258s <=stdout= {"testID":1,"error":"Exception: the Dart compiler exited unexpectedly.","stackTrace":"package:flutter_tools/src/base/common.dart 10:3 throwToolExit\npackage:flutter_tools/src/compile.dart 813:13 DefaultResidentCompiler._compile.<fn>\ndart:async/zone.dart 1391:47 _rootRun\ndart:async/zone.dart 1301:19 _CustomZone.run\ndart:async/zone.dart 1209:7 _CustomZone.runGuarded\ndart:async/stream_impl.dart 392:13 _BufferingStreamSubscription._sendDone.sendDone\ndart:async/stream_impl.dart 402:7 _BufferingStreamSubscription._sendDone\ndart:async/stream_impl.dart 291:7 _BufferingStreamSubscription._close\ndart:async/stream_transformers.dart 87:11 _SinkTransformerStreamSubscription._close\ndart:async/stream_transformers.dart 21:11 _EventSinkWrapper.close\ndart:convert/string_conversion.dart 241:11 _StringAdapterSink.close\ndart:convert/line_splitter.dart 141:11 _LineSplitterSink.close\ndart:async/stream_transformers.dart 132:24 _SinkTransformerStreamSubscription._handleDone\ndart:async/zone.dart 1391:47 _rootRun\ndart:async/zone.dart 1301:19 _CustomZone.run\ndart:async/zone.dart 1209:7 _CustomZone.runGuarded\ndart:async/stream_impl.dart 392:13 _BufferingStreamSubscription._sendDone.sendDone\ndart:async/stream_impl.dart 402:7 _BufferingStreamSubscription._sendDone\ndart:async/stream_impl.dart 291:7 _BufferingStreamSubscription._close\ndart:async/stream_transformers.dart 87:11 _SinkTransformerStreamSubscription._close\ndart:async/stream_transformers.dart 21:11 _EventSinkWrapper.close\ndart:convert/string_conversion.dart 241:11 _StringAdapterSink.close\ndart:convert/string_conversion.dart 295:20 _Utf8ConversionSink.close\ndart:convert/chunked_conversion.dart 78:18 _ConverterStreamEventSink.close\ndart:async/stream_transformers.dart 132:24 _SinkTransformerStreamSubscription._handleDone\ndart:async/zone.dart 1391:47 _rootRun\ndart:async/zone.dart 1301:19 _CustomZone.run\ndart:async/zone.dart 1209:7 _CustomZone.runGuarded\ndart:async/stream_impl.dart 392:13 _BufferingStreamSubscription._sendDone.sendDone\ndart:async/stream_impl.dart 402:7 _BufferingStreamSubscription._sendDone\ndart:async/stream_impl.dart... <=stdout= {"testID":1,"error":"Failed to load \"/tmp/flutter_break_on_framework_exceptions.GUJDAZ/test/test.dart\": Compilation failed for testPath=/tmp/flutter_break_on_framework_exceptions.GUJDAZ/test/test.dart","stackTrace":"","isFailure":false,"type":"error","time":7518} <=stdout= {"testID":1,"result":"error","skipped":false,"hidden":false,"type":"testDone","time":7521} <=stdout= {"count":1,"time":7526,"type":"allSuites"} <=stdout= {"success":false,"type":"done","time":7529} 259s Process exited (1) 371s Expecting test.startedProcess event [+ 95] <=stdout= {"suite":{"id":0,"platform":"vm","path":"/tmp/flutter_break_on_framework_exceptions.GUJDAZ/test/test.dart"},"type":"suite","time":0} [+ 95] <=stdout= {"test":{"id":1,"name":"loading /tmp/flutter_break_on_framework_exceptions.GUJDAZ/test/test.dart","suiteID":0,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":0} [+ 7600] <=stdout= {"testID":1,"error":"Exception: the Dart compiler exited unexpectedly.","stackTrace":"package:flutter_tools/src/base/common.dart 10:3 throwToolExit\npackage:flutter_tools/src/compile.dart 813:13 DefaultResidentCompiler._compile.<fn>\ndart:async/zone.dart 1391:47 _rootRun\ndart:async/zone.dart 1301:19 _CustomZone.run\ndart:async/zone.dart 1209:7 _CustomZone.runGuarded\ndart:async/stream_impl.dart 392:13 _BufferingStreamSubscription._sendDone.sendDone\ndart:async/stream_impl.dart 402:7 _BufferingStreamSubscription._sendDone\ndart:async/stream_impl.dart 291:7 _BufferingStreamSubscription._close\ndart:async/stream_transformers.dart 87:11 _SinkTransformerStreamSubscription._close\ndart:async/stream_transformers.dart 21:11 _EventSinkWrapper.close\ndart:convert/string_conversion.dart 241:11 _StringAdapterSink.close\ndart:convert/line_splitter.dart 141:11 _LineSplitterSink.close\ndart:async/stream_transformers.dart 132:24 _SinkTransformerStreamSubscription._handleDone\ndart:async/zone.dart 1391:47 _rootRun\ndart:async/zone.dart 1301:19 _CustomZone.run\ndart:async/zone.dart 1209:7 _CustomZone.runGuarded\ndart:async/stream_impl.dart 392:13 _BufferingStreamSubscription._sendDone.sendDone\ndart:async/stream_impl.dart 402:7 _BufferingStreamSubscription._sendDone\ndart:async/stream_impl.dart 291:7 _BufferingStreamSubscription._close\ndart:async/stream_transformers.dart 87:11 _SinkTransformerStreamSubscription._close\ndart:async/stream_transformers.dart 21:11 _EventSinkWrapper.close\ndart:convert/string_conversion.dart 241:11 _StringAdapterSink.close\ndart:convert/string_conversion.dart 295:20 _Utf8ConversionSink.close\ndart:convert/chunked_conversion.dart 78:18 _ConverterStreamEventSink.close\ndart:async/stream_transformers.dart 132:24... Expecting test.startedProcess event is taking longer than usual... ``` |
||
---|---|---|
.. | ||
debug_adapter | ||
test_data | ||
analyze_all_templates_test.dart | ||
analyze_once_test.dart | ||
analyze_size_test.dart | ||
analyze_suggestions_integration_test.dart | ||
android_e2e_api_test.dart | ||
android_gradle_java_version_test.dart | ||
android_gradle_print_build_variants_test.dart | ||
android_plugin_compilesdkversion_mismatch_test.dart | ||
android_plugin_example_app_build_test.dart | ||
android_plugin_ndkversion_mismatch_test.dart | ||
android_plugin_new_output_dir_test.dart | ||
background_isolate_test.dart | ||
bash_entrypoint_test.dart | ||
break_on_framework_exceptions_test.dart | ||
build_ios_config_only_test.dart | ||
build_macos_config_only_test.dart | ||
cache_test.dart | ||
command_output_test.dart | ||
coverage_collection_test.dart | ||
daemon_mode_test.dart | ||
debugger_stepping_test.dart | ||
deferred_components_test.dart | ||
deprecated_gradle_settings_test.dart | ||
downgrade_upgrade_integration_test.dart | ||
exit_code_test.dart | ||
expression_evaluation_test.dart | ||
flutter_attach_test.dart | ||
flutter_build_android_app_project_builddir_test.dart | ||
flutter_build_apk_verbose_test.dart | ||
flutter_build_config_only_test.dart | ||
flutter_build_preview_sdk.dart | ||
flutter_build_wasm_test.dart | ||
flutter_build_windows_test.dart | ||
flutter_build_with_compilation_error_test.dart | ||
flutter_gen_test.dart | ||
flutter_run_test.dart | ||
flutter_run_with_error_test.dart | ||
forbidden_imports_test.dart | ||
gen_l10n_test.dart | ||
gradle_non_android_plugin_test.dart | ||
hot_reload_errors_test.dart | ||
hot_reload_test.dart | ||
hot_reload_with_asset_test.dart | ||
lifetime_test.dart | ||
multidex_build_test.dart | ||
observatory_port_test.dart | ||
overall_experience_test.dart | ||
plist_parser_test.dart | ||
README.md | ||
shader_compiler_test.dart | ||
single_widget_reload_test.dart | ||
stateless_stateful_hot_reload_test.dart | ||
template_manifest_test.dart | ||
test_driver.dart | ||
test_test.dart | ||
test_utils.dart | ||
timeline_test.dart | ||
tool_backend_test.dart | ||
unit_coverage_test.dart | ||
variable_expansion_windows_test.dart | ||
variable_expansion_windows.dart | ||
vmservice_integration_test.dart | ||
web_plugin_registrant_test.dart | ||
xcode_backend_test.dart |
Integration tests
These tests are not hermetic, and use the actual Flutter SDK. While
they don't require actual devices, they run flutter_tester
to test
Dart VM and Flutter integration.
Use this command to run (from the flutter_tools
directory):
../../bin/cache/dart-sdk/bin/dart run test test/integration.shard
You need to have downloaded the Dart SDK in your Flutter clone for this
to work. Running ../../bin/flutter
will automatically download it.
Coverage exclusion
These tests are expensive to run and do not give meaningful coverage
information for the flutter
tool (since they are black-box tests that
run the tool as a subprocess, rather than being unit tests). For this
reason, they are in a separate shard when running on continuous
integration and are not run when calculating coverage.