Reland "Launch DDS from Dart SDK and prepare to serve DevTools from DDS (#146593)" (#152386)

This reverts commit 7cdc23b3e1.

The failure in the `native_assets_test` integration test on Windows was caused by the DevTools process not being shutdown by the `ColdRunner` when running the profile mode portion of the test. This resulted in the test being unable to clean up the project created by the test as DevTools was still holding onto a handle within the directory. This PR adds back the mistakenly removed DevTools shutdown logic in the `ColdRunner`.
This commit is contained in:
Ben Konyi
2024-07-26 16:51:19 -04:00
committed by GitHub
parent 3a737c9a56
commit 33b402d24c
57 changed files with 790 additions and 752 deletions

View File

@@ -9,6 +9,8 @@ import 'package:flutter_tools/src/build_info.dart';
import 'package:flutter_tools/src/device.dart';
import 'package:flutter_tools/src/project.dart';
import 'fakes.dart';
/// A list of fake devices to test JSON serialization
/// (`Device.toJson()` and `--machine` flag for `devices` command)
List<FakeDeviceJsonData> fakeDevices = <FakeDeviceJsonData>[
@@ -129,6 +131,7 @@ class FakeDevice extends Device {
platformType: type,
category: Category.mobile,
ephemeral: ephemeral,
logger: FakeLogger(),
);
final bool _isSupported;

View File

@@ -741,6 +741,12 @@ class FakeDevtoolsLauncher extends Fake implements DevtoolsLauncher {
}
}
/// A fake [Logger] that throws the [Invocation] for any method call.
class FakeLogger implements Logger {
@override
dynamic noSuchMethod(Invocation invocation) => throw invocation; // ignore: only_throw_errors
}
class ClosedStdinController extends Fake implements StreamSink<List<int>> {
@override
Future<Object?> addStream(Stream<List<int>> stream) async => throw const SocketException('Bad pipe');