Repository: flutter
Issue: flutter test is missing `--host-vmservice-port`
Labels: a: tests,c: new feature,tool,c: proposal,P3,team-tool,triaged-tool

Hi,

I am working with vscode devcontainer.
For `flutter run` I use `--host-vmservice-port` (or `--web-port=8090`) to define a port that is mapped into the WSL2 (so the connection works for debug).
Now I would like to use `integration_test` and unfortunately with `flutter test` there is no such parameter and a random port is taken that is obviously not routed into the devcontainer.

Therefore I cannot run the tests because the connection cannot be established.
The app begins starting on the device for a short moment and crashes then (see log below).

Am I missing something or is this feature missing?

Steps to reproduce:
1. Run a vscode devcontainer
2. Try to run an `integration_test` on a real device `flutter test integration_test/my_test.dart -d Nokia`

## Logs

<details>
<summary>Logs</summary>

00:00 +0: loading /workspaces/my_project/integration_test/my_test.dart                                                                                                                    R00:31 +0: loading /workspaces/my_project/integration_test/my_test.dart                                                                                                               31.1s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
00:32 +0: loading /workspaces/my_project/integration_test/my_test.dart                                                                                                                    I00:40 +0: loading /workspaces/my_project/integration_test/my_test.dart                                                                                                                8.7s
00:48 +0 -1: loading /workspaces/my_project/integration_test/my_test.dart [E]
  Failed to load "/workspaces/my_project/integration_test/my_test.dart": Connecting to the VM Service timed out.
  package:flutter_tools/src/test/integration_test_device.dart 75:24  IntegrationTestTestDevice.start.<fn>
  dart:async/zone.dart 1383:47                                       _rootRun
  dart:async/zone.dart 1293:19                                       _CustomZone.run
  dart:async/future_impl.dart 864:34                                 Future.timeout.<fn>
  dart:async/zone.dart 1383:47                                       _rootRun
  dart:async/zone.dart 1293:19                                       _CustomZone.run
  dart:async/zone.dart 1201:7                                        _CustomZone.runGuarded
  dart:async/zone.dart 1241:23                                       _CustomZone.bindCallbackGuarded.<fn>
  dart:async/zone.dart 1391:13                                       _rootRun
  dart:async/zone.dart 1293:19                                       _CustomZone.run
  dart:async/zone.dart 1225:23                                       _CustomZone.bindCallback.<fn>
  dart:async-patch/timer_patch.dart 18:15                            Timer._createTimer.<fn>
  dart:isolate-patch/timer_impl.dart 398:19                          _Timer._runTimers
  dart:isolate-patch/timer_impl.dart 429:5                           _Timer._handleMessage
  dart:isolate-patch/isolate_patch.dart 192:12                       _RawReceivePortImpl._handleMessage


To run this test again: /flutter/bin/cache/dart-sdk/bin/dart test /workspaces/my_project/integration_test/my_test.dart -p vm --plain-name 'loading /workspaces/my_project/integration_test/my_test.dart'
00:48 +0 -1: Some tests failed.

</details>

## flutter doctor
<details>
[✓] Flutter (Channel stable, 3.3.9, on Ubuntu 20.04.5 LTS 5.15.79.1-microsoft-standard-WSL2, locale en_US.UTF-8)
    • Flutter version 3.3.9 on channel stable at /flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8f7f1f986 (2 weeks ago), 2022-11-23 06:43:51 +0900
    • Engine revision 8f2221fbef
    • Dart version 2.18.5
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /android-sdk
    • Platform android-33, build-tools 33.0.0
    • ANDROID_HOME = /android-sdk
    • ANDROID_SDK_ROOT = /android-sdk
    • Java binary at: /usr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.5+8-Ubuntu-2ubuntu120.04)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✗] Linux toolchain - develop for Linux desktop
    ✗ clang++ is required for Linux development.
      It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/
    ✗ CMake is required for Linux development.
      It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
    ✗ ninja is required for Linux development.
      It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases
    ✗ pkg-config is required for Linux development.
      It is likely available from your distribution (e.g.: apt install pkg-config), or can be downloaded from https://www.freedesktop.org/wiki/Software/pkg-config/

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Connected device (2 available)
    • Nokia 7 2 (mobile) • D0AA002938J82200216 • android-arm64 • Android 11 (API 30)
    • Linux (desktop)    • linux               • linux-x64     • Ubuntu 20.04.5 LTS 5.15.79.1-microsoft-standard-WSL2

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 3 categories.
</details>

Regards,
Florian