genodelabs / goa

Tool for streamlining the development of Genode applications
GNU Affero General Public License v3.0
20 stars 17 forks source link

Separate run and "prepare run" steps? #45

Closed Time0o closed 1 year ago

Time0o commented 1 year ago

Currently, goa run will download and prepare dependencies before starting Genode. In some situations it might be desirable to separate these steps. For example: while testing my Goa projects I'd like to interact with the spawned Genode process via expect and time out if a certain output is not produced. This does not work if I call goa run because downloading the dependencies might take an arbitrarily long time.

One idea would be to create a new prepare-run subcommand that does everything that run currently does but does not call run_genode. run would then depend on this and only call run_genode. Is there a specific reason why it does not currently work this way?

jschlatow commented 1 year ago

@Time0o It's nice to read that you're using Goa for testing. We recently had some discussions about adding testing support in Goa (see #43). I'm wondering whether proper testing support in Goa would be a more natural way to solve your issue. Nevertheless, separating the run-dir preparation from goa run could become handy as soon as we add testing support since it may simplify reporting in what stage a test failed. In contrast to your suggestion, I'd name the command run-dir (similar to build and build-dir.

If I understand you correctly, your main problem at the moment is that downloading the dependencies already contributes to the timeout, right? Couldn't you just wait for the first output from core and then start the timeout?

@nfeske Do you have an opinion on this?

Time0o commented 1 year ago

If I understand you correctly, your main problem at the moment is that downloading the dependencies already contributes to the timeout, right? Couldn't you just wait for the first output from core and then start the timeout?

Yes, that's what I'm doing currently, it works but is maybe not so elegant.

jschlatow commented 1 year ago

Fixed by 4826e56