dgrnbrg/autotest — pull request #1 by dgrnbrg (2012-01-12 21:44:15+00:00)
Title: Added async job to client

This change adds asynchronicity to autotest. Essentially, it allows several programs to be started, their output to be monitored, and for them to be killed manually, none of which block the main thread.

It extends BgJob to allow the job to run an external command in the background, and it uses threads to manage the communication. It allows for safe retrieval of the stdout and stderr while the process is executing and after it finishes.

It also adds a mixin to SSHHost to allow remote asynchronous SSH jobs. The usage case for this is that you're testing an application that runs on a cluster and is composed of several daemons. With this, you can easily start all the daemons in the correct order, possibly waiting for them to complete initialization before starting the next daemon, and then you can observe the output and kill the daemons if they aren't designed to be shutdown (i.e. the should run forever until ctrl-c'ed).

I think that these will need to be placed into other files, and possibly have other work done on them, but I'd like to start the dialogue.