kvm test: Added functionality to the preprocessor to run scripts

This patch adds the processes_command function to the preprocessor which
will run custom scripts before and after a test is executed.

processes_command will export all test parameters as environmental variables
for passing parameters to a custom script.

processes_command uses parameters defined in the config file:
pre_command, pre_command_timeout, pre_command_noncritical
post_command, post_command_timeout, post_commmand_noncritical

command - just defines the script to be run
timeout - timeout to kill script if hung
noncritical - if yes do not fail test if command fails, default no

Currently it is still using the returned status from kvm_utils.run_bg If
kvm_utils.run_bg is changed to throw an exception, process_command will
have to be updated at that time.

Signed-off-by: David Huff <dhuff@redhat.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3269 592f7852-d20e-0410-864c-8624ca9c26a4
1 file changed