qiime/automated_testing — pull request #8 by jrrideout (2012-11-14 18:48:44+00:00)
Title: Command execution code now uses threads instead of signals

The code that executes commands now spawns a worker thread to execute these commands. The command timeout code now uses the timeout mechanism provided by Python's threading module instead of relying on ```signal.SIGALRM```, which caused a number of issues (see issue #1 for more details).

Benefits of this new approach:

1. Multiple instances of the script should play nicer with each other.
2. If a command times out, we now get a log file for it with output right up to when it timed out. This will be extremely useful for debugging because we now have context of exactly where the timeout occurred.
3. The code is closer to being platform-independent (i.e. running on Windows). There is now only a single spot in the code that won't work on Windows, but this will be fixed whenever we get to tackling issue #6.
4. If a process times out, it is now terminated.
5. We can specify fractions of minutes for the length of the timeouts. This is mostly beneficial for the unit tests, which previously took ~3 minutes to run because the smallest timeout I could give was 1 minute (and so unit tests that tested that timeouts worked correctly had to each run for at least 1 minute).

These changes were tested on Mac OS X and Ubuntu (unit tests and real examples).

This fixes issue #1.