[ CLI ] Fix IPv6 VM service support for standalone VM

The CLI was not providing the ipv6 flag to DDS, resulting in a "Could
not start Observatory" error.

Change-Id: Idff0f525455f121b8f1e89bc4ad20a01cd1165ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204860
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
Ben Konyi 2021-06-24 19:50:59 +00:00 committed by commit-bot@chromium.org
parent 09994d6eaa
commit 0d61348584
2 changed files with 23 additions and 0 deletions

View file

@ -237,6 +237,28 @@ void main(List<String> args) => print("$b $args");
);
expect(result.stderr, isEmpty);
expect(result.exitCode, 0);
// Again, with IPv6.
result = p.runSync([
'run',
'--observe=8181/::1',
'--pause-isolates-on-start',
// This should negate the above flag.
'--no-pause-isolates-on-start',
'--no-pause-isolates-on-exit',
'--no-pause-isolates-on-unhandled-exceptions',
'-Dfoo=bar',
'--define=bar=foo',
p.relativeFilePath,
]);
expect(
result.stdout,
matches(
r'Observatory listening on http:\/\/\[::1\]:8181\/[a-zA-Z0-9_-]+=\/\n.*'),
);
expect(result.stderr, isEmpty);
expect(result.exitCode, 0);
});
test('fails when provided verbose VM flags', () async {

View file

@ -53,6 +53,7 @@ Future<void> main(List<String> args) async {
remoteVmServiceUri,
serviceUri: serviceUri,
enableAuthCodes: !disableServiceAuthCodes,
ipv6: address.type == InternetAddressType.IPv6,
devToolsConfiguration: startDevTools && devToolsBuildDirectory != null
? DevToolsConfiguration(
enable: startDevTools,