Closed rcooke-warwick closed 1 year ago
No objections from me. What is the main use case or benefit of adding this?
@rcooke-warwick how is the caller to executeCommandInHostOs()
choosing channel (ssh/serial)?
sorry @alexgg @klutchell I had opened this PR the other week just to test flowzone out (it was during that point where alexes PR got caught in the required checks deadlock) it wasn't ready for a review
I hadn't looked at it since then, but will come back to it now. The main use cases were:
Sounds good to me, if it's working for you!
@balena-ci I self-certify!
PR to enable
executeCommandInHostOs()
in tests to use serial terminal as an option, instead of sshThe main use cases were:
Notes on implementation:
/dev/*
and collect the exit code and response" is implemented here: https://www.npmjs.com/package/@balena/node-serial-terminal/v/0.0.2-build-ryan-initial-commit-0150dd382d2567fd3ad5d5203301918b27a51a60-1. It deals with the login prompts, retries, and managing the shell. This was generic functionality that's potentially useful elsewhere, so its a package/dev/pts/*
device is allocated at runtime, so I had to also check and parse the stdout from qemu-system to extract itexecuteCommandInHostOS
function to allow for it to use serial instead of ssh as the communication channel, will update this when its madeChange-type: patch