Support execution on devices via CLI
We need to create a target that can be used via the CLI to transfer files to a device, run a binary on the device, and transfer files back.
Usage would look like:
bazel run --platform=:my-platform //labgrid/cli -- --put=`pwd`/my_bin:my_bin --put=`pwd`/data:data --get=out:`pwd`/out -- my_bin --some_arg=data
To do this we will require a new labgrid_binary
rule. This will take a given src
script and wrap it in //labgrid/executor
to provide toolchain resolution and setup environment variables.
Then for our use case in the CLI, we will create a target with //labgrid/run
as the src
:
labgrid_binary(
name = "cli",
src = "//labgrid/run",
)
Edited by Luke Hackwell