Replies: 1 comment
-
This was done in #5939 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I just noticed all the work that has gone into cleaning up and improving the android-commands.sh script. Kudos to @Joining7943 (and @sylvestre), it's quite impressive. :)
While I haven't played with the problems it now works around so much, I'm going to revive a point I made in my original PR: this could likely be made better using SSH. I use similar scripts for research artifacts, and that's what I do for those. As I said in the original PR, the reason I didn't do so here was you need the fake user input to bootstrap the emulator environment anyway, so in theory sshd is just adding one more failure point for little gain, but as the commands get more complicated and workarounds for failures in the runner crop up (e.g., all the sleep calls), it starts making more sense to keep the hacky fake input stuff to just the bootstrap phase, and try to avoid using it at all during test runs. To emphasize, the fake input stuff would still need to exist for the foreseeable future (until someone figures out a way to enter a termux shell via the adb shell), but only to install and configure sshd; from that point on, everything would look like normal techniques to run remote shell scripts.
As an overview of how it would work: while setting up the emulator for caching, generate an ssh key pair, use
run_termux_command
to install sshd, copy the pubkey to the accepted keys, and launch sshd. From there, we can ssh in and configure termux to always launch sshd, and install all the dependencies. Then we can change the command for running tests to just ensuring termux is running, and a normal shell function that gets passed via ssh (no need for special handling of output, return codes, timing considerations, probing, etc., it would all be there in the runner's shell).Does this sound like something I should add, or does the extra headache of maintaining ssh bootstrapping to essentially run one command at the end of the day sound too heavy?
Beta Was this translation helpful? Give feedback.
All reactions