Fix custom-device default forwardPortSuccessRegex (#97719)

This commit is contained in:
Mathieu Dubois-Briand
2022-03-04 20:06:22 +01:00
committed by GitHub
parent 163a7ac116
commit 020bf31c99
3 changed files with 547 additions and 8 deletions

View File

@@ -736,11 +736,12 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
'-o', 'ExitOnForwardFailure=yes',
if (ipv6) '-6',
'-L', '$formattedLoopbackIp:\${hostPort}:$formattedLoopbackIp:\${devicePort}',
sshTarget
sshTarget,
"echo 'Port forwarding success'; read"
]
: null,
forwardPortSuccessRegex: usePortForwarding
? RegExp('Linux')
? RegExp('Port forwarding success')
: null,
screenshotCommand: screenshotCommand.isNotEmpty

View File

@@ -264,8 +264,9 @@ class CustomDeviceConfig {
'-o', 'ExitOnForwardFailure=yes',
'-L', r'127.0.0.1:${hostPort}:127.0.0.1:${devicePort}',
'pi@raspberrypi',
"echo 'Port forwarding success'; read",
],
forwardPortSuccessRegex: RegExp('Linux'),
forwardPortSuccessRegex: RegExp('Port forwarding success'),
screenshotCommand: const <String>[
'ssh',
'-o', 'BatchMode=yes',
@@ -472,7 +473,7 @@ class CustomDeviceConfig {
_kEnabled: enabled,
_kPingCommand: pingCommand,
_kPingSuccessRegex: pingSuccessRegex?.pattern,
_kPostBuildCommand: postBuildCommand,
_kPostBuildCommand: (postBuildCommand?.length ?? 0) > 0 ? postBuildCommand : null,
_kInstallCommand: installCommand,
_kUninstallCommand: uninstallCommand,
_kRunDebugCommand: runDebugCommand,