amluto / virtme

An easy way to virtualize the running system
GNU General Public License v2.0
330 stars 66 forks source link

run: Add a --script-dir to run user-defined init-scripts #70

Open nfraprado opened 3 years ago

nfraprado commented 3 years ago
This new parameter can be used as:

  virtme-run --kdir ~/repos/builds/virtme-x86_64 --script-dir test/

And virtme will run any *.sh script in ./test dir in the guest.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>

I'd like to upstream this patch from @ezequielgarcia (https://github.com/ezequielgarcia/virtme/commit/c7760c75104e7db48734a62d5f519f4a00aa0dfb). I'm aware of --script-sh, but it only allows a single command, and, more importantly, it cannot be used together with --graphics. So, for the use case of automatically running tests on a graphical environment, --script-dir is a must.

Signed-off-by: Nícolas F. R. A. Prado nfraprado@collabora.com

fooishbar commented 2 years ago

FWIW we've been using this within Weston and it's been really helpful to us.

musamaanjum commented 2 years ago

I've just tested it and it works. Thanks.

marcosps commented 2 years ago

@amluto can you please check?