Implement hooks for scripts to run before/after tests
As suggested by @cgmb, it would be helpful if we could trigger scripts before and after tests are run.
This would allow us to perform health checks at those points in time, and performing any necessary actions, for example taking a worker offline. This would be cleaner to the solution proposed in #15 (closed).
At first glance, this would actually be quite easy to implement. The question is how configurable do we want this to be. I guess the most flexible option would be for the relevant debci
commands to accept
--script-before=
--script-after=
options, and delegate the finer details to those scripts. Those scripts would have access to all of debci
's configuration.
As the --script-before
command would be run before a testbed is instantiated, it would have the power to stop a test before it is even run.
This could be implemented either generally, or specifically for the QEMU backend.