flutter/packages/flutter_tools/test/general.shard
Andrew Kolos 9cd2fc90af
Handle ProcessExceptions due to git missing on the host (#154445)
Fixes https://github.com/flutter/flutter/issues/133585.

This PR elects to add a new catch within `_handleToolError` that checks any uncaught error. This new catch will exit the tool without crashing provided the following conditions are met:

1. the error is a `ProcessException`,
2. the error message contains `git` somewhere in the message (we don't match on the entire string in case it changes or is locale-dependent), and
3. `git` does not appear to be runnable on the host system (`ProcessManager.canRun` returns `false` for git).

This is preferable to checking for runnability of `git` before we run it for 1) its simplicity and 2) lack of performance penalty for users that already have git installed (almost every single one).

This PR also does some light refactoring to runner_test.dart to make room for tests that aren't related to crash reporting.
2024-09-09 20:47:05 +00:00
..
android Agp Java Compatability Custom Error (#154142) 2024-08-29 10:06:48 -07:00
base Remove one set of parens that wrap a single String literal (#152031) 2024-08-01 19:13:13 +00:00
build_system Improve iOS unpack target's error messages (#154649) 2024-09-05 23:46:22 +00:00
commands Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
custom_devices provide command to FakeCommand::onRun (#142206) 2024-01-25 07:51:25 +00:00
dap [tool] Guard more write/writeln calls on Process.stdin (#151146) 2024-07-23 19:27:52 +00:00
dart Do not silently fail pub get even if output-mode is "none" (#153596) 2024-08-22 09:12:54 -07:00
drive Document that flutter drive --test-arguments can opt-in to dart test (#152410) 2024-07-26 18:25:58 -07:00
fuchsia Reland "Launch DDS from Dart SDK and prepare to serve DevTools from DDS (#146593)" (#152386) 2024-07-26 20:51:19 +00:00
intellij Switch to more reliable flutter.dev link destinations in the tool (#150587) 2024-06-26 23:30:39 +00:00
ios Reland "Load parent package config" (#153754) 2024-08-20 15:30:46 +02:00
isolated [native assets] Rewrite install names for relocated native libraries (#153054) 2024-08-29 14:51:23 +00:00
linux Reland "Move native assets to isolated/ directory" (#143055) 2024-02-08 17:49:48 +00:00
macos Reland "Load parent package config" (#153754) 2024-08-20 15:30:46 +02:00
migrations Add migration to git ignore SwiftPM build directories (#152766) 2024-08-05 20:26:16 +00:00
proxied_devices Reland "Launch DDS from Dart SDK and prepare to serve DevTools from DDS (#146593)" (#152386) 2024-07-26 20:51:19 +00:00
reporting [flutter_tools] fix instructions to disable CLI animations (#139094) 2023-11-27 22:00:50 +00:00
runner Handle ProcessExceptions due to git missing on the host (#154445) 2024-09-09 20:47:05 +00:00
test Remove --disable-dart-dev across flutter/flutter. (#154280) 2024-08-29 22:50:04 +00:00
tester Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
vscode Added support for vscode and vscode-insiders installed via Flatpak (#137123) 2023-12-04 21:59:53 +00:00
web [web] Set COEP:credentialless on flutter run/drive. (#152413) 2024-07-30 23:14:06 +00:00
windows [tool] Add dartFileName setting for platform plugins (#153099) 2024-09-06 18:27:09 +00:00
analytics_test.dart Flutter preview device (#135639) 2023-10-18 00:27:54 +00:00
android_plugin_test.dart
application_package_test.dart Use Xcode build setting PRODUCT_NAME to find app and archive paths (#140242) 2024-07-22 23:54:24 +00:00
args_test.dart [web] hide the --web-renderer option in the tool (#152683) 2024-08-07 18:40:58 +00:00
artifact_updater_test.dart iOS,macOS: Do not copy unsigned_binaries.txt to build outputs (#154684) 2024-09-05 21:37:28 +00:00
artifacts_test.dart Reland "Add FlutterMacOS.xcframework artifact (#143244)" (#144275) 2024-02-28 20:09:54 +00:00
asset_bundle_flavors_test.dart Reland "Load parent package config" (#153754) 2024-08-20 15:30:46 +02:00
asset_bundle_package_fonts_test.dart Reland "Load parent package config" (#153754) 2024-08-20 15:30:46 +02:00
asset_bundle_package_test.dart Reland "Load parent package config" (#153754) 2024-08-20 15:30:46 +02:00
asset_bundle_test.dart Reland "Load parent package config" (#153754) 2024-08-20 15:30:46 +02:00
asset_bundle_variant_test.dart Reland "Load parent package config" (#153754) 2024-08-20 15:30:46 +02:00
asset_test.dart Reland "Load parent package config" (#153754) 2024-08-20 15:30:46 +02:00
base_utils_test.dart Fixed race condition in PollingDeviceDiscovery. (#145506) 2024-03-21 22:37:08 +00:00
build_info_test.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
bundle_builder_test.dart Fix asset transformation in the presence of resolution-aware asset variants (#151932) 2024-07-22 23:46:19 +00:00
cache_test.dart Do not silently fail pub get even if output-mode is "none" (#153596) 2024-08-22 09:12:54 -07:00
channel_test.dart
cmake_test.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
cold_test.dart Reland "Launch DDS from Dart SDK and prepare to serve DevTools from DDS (#146593)" (#152386) 2024-07-26 20:51:19 +00:00
common_test.dart
compile_batch_test.dart Remove --disable-dart-dev across flutter/flutter. (#154280) 2024-08-29 22:50:04 +00:00
compile_expression_test.dart
compile_incremental_test.dart Remove --disable-dart-dev across flutter/flutter. (#154280) 2024-08-29 22:50:04 +00:00
compile_test.dart Remove toString() overrides in dart:ui/package:flutter in profile/release mode on wasm/vm targets (#144763) 2024-03-08 09:55:02 +01:00
config_test.dart
convert_test.dart
coverage_collector_test.dart Roll pub packages (#154267) 2024-08-29 16:28:08 +00:00
crash_reporting_test.dart Swap crash reporting with unified analytics (#148525) 2024-05-18 01:30:13 +00:00
create_config_test.dart
daemon_test.dart [flutter_tools] Fix missing stack trace from daemon (#144113) 2024-02-27 08:39:49 +00:00
dart_plugin_test.dart [tool] Add dartFileName setting for platform plugins (#153099) 2024-09-06 18:27:09 +00:00
desktop_device_test.dart Disable sandboxing for macOS apps and tests in CI (#149618) 2024-06-04 21:51:19 +00:00
devfs_test.dart Reland "Load parent package config" (#153754) 2024-08-20 15:30:46 +02:00
device_port_forwarder_test.dart
device_test.dart Reland "Launch DDS from Dart SDK and prepare to serve DevTools from DDS (#146593)" (#152386) 2024-07-26 20:51:19 +00:00
device_vm_service_discovery_for_attach_test.dart Support mdns when attaching to proxied devices. (#146021) 2024-04-09 20:00:21 +00:00
devtools_launcher_test.dart Reland "Launch DDS from Dart SDK and prepare to serve DevTools from DDS (#146593)" (#152386) 2024-07-26 20:51:19 +00:00
emulator_test.dart Fixed few typos (#147087) 2024-04-22 16:49:19 +00:00
fake_process_manager_test.dart [tool] Fix stdin.flush calls on processes started by FakeProcessManager (#151183) 2024-07-02 20:40:06 +00:00
features_test.dart Reverts "Enable Swift Package Manager by default on master channel (#152049)" (#152243) 2024-07-24 16:49:25 +00:00
flutter_manifest_assets_test.dart add parsing of assets transformer declarations in pubspec.yaml (#143557) 2024-02-16 22:24:59 +00:00
flutter_manifest_assets_transformers_test.dart add parsing of assets transformer declarations in pubspec.yaml (#143557) 2024-02-16 22:24:59 +00:00
flutter_manifest_test.dart add default-flavor field to flutter pubspec, which will be used as the flavor in flutter build/run if --flavor is not provided (#147968) 2024-05-22 05:11:24 +00:00
flutter_platform_test.dart Reland "Launch DDS from Dart SDK and prepare to serve DevTools from DDS (#146593)" (#152386) 2024-07-26 20:51:19 +00:00
flutter_project_metadata_test.dart Native assets support for MacOS and iOS (#130494) 2023-09-10 08:07:13 +00:00
flutter_tester_device_test.dart Launch DDS using DartDevelopmentServiceLauncher (#154015) 2024-08-29 16:16:27 -04:00
flutter_validator_test.dart Switch to more reliable flutter.dev link destinations in the tool (#150587) 2024-06-26 23:30:39 +00:00
generate_localizations_test.dart [gen_l10n] isCustomDateFormat accepts an actual boolean (#153439) 2024-08-18 08:57:30 -07:00
github_template_test.dart Added missing code block language in docs (#147481) 2024-05-01 14:44:27 +00:00
hot_shared.dart Reverts "[tool] Guard process writes to frontend server in ResidentCompiler (#152358)" (#153028) 2024-08-07 16:11:26 +00:00
hot_test.dart Reland "Launch DDS from Dart SDK and prepare to serve DevTools from DDS (#146593)" (#152386) 2024-07-26 20:51:19 +00:00
integration_test_device_test.dart Do not cancel the VmService's subscription to the isolate event stream in FlutterVmService.findExtensionIsolate (#153607) 2024-08-19 17:40:07 +00:00
license_collector_test.dart
mdns_discovery_test.dart Clean up lint ignores (#144229) 2024-02-27 23:21:03 +00:00
message_parser_test.dart
persistent_tool_state_test.dart
plugin_parsing_test.dart [tool] Add dartFileName setting for platform plugins (#153099) 2024-09-06 18:27:09 +00:00
plugins_test.dart [tool] Add dartFileName setting for platform plugins (#153099) 2024-09-06 18:27:09 +00:00
preview_device_test.dart [flutter_tools] Ensure flutter daemon clients can detect preview device (#140112) 2023-12-21 19:01:16 +00:00
project_file_invalidator_test.dart Reland "Load parent package config" (#153754) 2024-08-20 15:30:46 +02:00
project_test.dart Add a RegExp for iOS domain when reading domains from xcodeProject (#154201) 2024-08-30 11:17:29 -07:00
project_validator_result_test.dart
protocol_discovery_test.dart
pub_dependencies_project_validator_test.dart
resident_devtools_handler_test.dart Do not cancel the VmService's subscription to the isolate event stream in FlutterVmService.findExtensionIsolate (#153607) 2024-08-19 17:40:07 +00:00
resident_runner_helpers.dart Launch DDS using DartDevelopmentServiceLauncher (#154015) 2024-08-29 16:16:27 -04:00
resident_runner_test.dart Launch DDS using DartDevelopmentServiceLauncher (#154015) 2024-08-29 16:16:27 -04:00
resident_web_runner_cold_test.dart Reland "Launch DDS from Dart SDK and prepare to serve DevTools from DDS (#146593)" (#152386) 2024-07-26 20:51:19 +00:00
resident_web_runner_test.dart add HttpException to the list of handled exceptions within ResidentWebRunner::run (#153527) 2024-08-16 16:40:19 +00:00
run_hot_test.dart Clean up lint ignores (#144229) 2024-02-27 23:21:03 +00:00
template_test.dart Locate the template directory using a TemplatePathProvider. (#132156) 2023-08-08 21:43:00 +00:00
terminal_handler_test.dart [flutter_tools] remove raster stats CLI option. (#152501) 2024-07-29 20:30:54 +00:00
testbed_test.dart
time_test.dart
tracing_test.dart [flutter_tools] Catch rpc error in render frame with raster stats (#144190) 2024-02-28 18:54:18 +00:00
unified_analytics_test.dart Bump dependencies in Flutter (#147546) 2024-04-29 15:53:25 -07:00
update_packages_test.dart Allow explicit exclusion of packages from pinned packages in flutter update-packages --force-update (#147679) 2024-05-02 01:16:54 +00:00
utils_test.dart Reland #128236 "Improve build output for all platforms" (#145495) 2024-03-23 12:05:21 +00:00
version_test.dart [flutter_tools] Fix "FormatException: Invalid date format" during version freshness check (#134088) 2023-09-06 17:22:13 +00:00
vmservice_test.dart Do not cancel the VmService's subscription to the isolate event stream in FlutterVmService.findExtensionIsolate (#153607) 2024-08-19 17:40:07 +00:00
web_template_test.dart Flutter Web Bootstrapping Improvements (#144434) 2024-03-12 22:41:26 +00:00
windows_version_validator_test.dart Add check for Bank of Brazil security module to Windows Flutter Doctor validators (#141135) 2024-01-18 12:32:49 -05:00
xcode_backend_test.dart Improve build time when using SwiftPM (#150052) 2024-06-12 21:16:07 +00:00
xcode_project_test.dart Add Swift Package Manager as new opt-in feature for iOS and macOS (#146256) 2024-04-18 21:12:36 +00:00