Unverified Commit 020bf31c authored by Mathieu Dubois-Briand's avatar Mathieu Dubois-Briand Committed by GitHub

Fix custom-device default forwardPortSuccessRegex (#97719)

parent 163a7ac1
...@@ -736,11 +736,12 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase { ...@@ -736,11 +736,12 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
'-o', 'ExitOnForwardFailure=yes', '-o', 'ExitOnForwardFailure=yes',
if (ipv6) '-6', if (ipv6) '-6',
'-L', '$formattedLoopbackIp:\${hostPort}:$formattedLoopbackIp:\${devicePort}', '-L', '$formattedLoopbackIp:\${hostPort}:$formattedLoopbackIp:\${devicePort}',
sshTarget sshTarget,
"echo 'Port forwarding success'; read"
] ]
: null, : null,
forwardPortSuccessRegex: usePortForwarding forwardPortSuccessRegex: usePortForwarding
? RegExp('Linux') ? RegExp('Port forwarding success')
: null, : null,
screenshotCommand: screenshotCommand.isNotEmpty screenshotCommand: screenshotCommand.isNotEmpty
......
...@@ -264,8 +264,9 @@ class CustomDeviceConfig { ...@@ -264,8 +264,9 @@ class CustomDeviceConfig {
'-o', 'ExitOnForwardFailure=yes', '-o', 'ExitOnForwardFailure=yes',
'-L', r'127.0.0.1:${hostPort}:127.0.0.1:${devicePort}', '-L', r'127.0.0.1:${hostPort}:127.0.0.1:${devicePort}',
'pi@raspberrypi', 'pi@raspberrypi',
"echo 'Port forwarding success'; read",
], ],
forwardPortSuccessRegex: RegExp('Linux'), forwardPortSuccessRegex: RegExp('Port forwarding success'),
screenshotCommand: const <String>[ screenshotCommand: const <String>[
'ssh', 'ssh',
'-o', 'BatchMode=yes', '-o', 'BatchMode=yes',
...@@ -472,7 +473,7 @@ class CustomDeviceConfig { ...@@ -472,7 +473,7 @@ class CustomDeviceConfig {
_kEnabled: enabled, _kEnabled: enabled,
_kPingCommand: pingCommand, _kPingCommand: pingCommand,
_kPingSuccessRegex: pingSuccessRegex?.pattern, _kPingSuccessRegex: pingSuccessRegex?.pattern,
_kPostBuildCommand: postBuildCommand, _kPostBuildCommand: (postBuildCommand?.length ?? 0) > 0 ? postBuildCommand : null,
_kInstallCommand: installCommand, _kInstallCommand: installCommand,
_kUninstallCommand: uninstallCommand, _kUninstallCommand: uninstallCommand,
_kRunDebugCommand: runDebugCommand, _kRunDebugCommand: runDebugCommand,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment