Each trace hook subclass (Variable and Comparator) has setup and teardown hooks that are executed before a trace is run and after it has completed, respectively. We also need a similar definition in the trace template config to run commands in a configurable way, outside of a variable or comparator. For example, when testing a TCP client, we'll need to start the TCP server before running the client and then stop the server after the client has exited. This could be done with a couple new configuration options in the trace template:
Both setup and teardown commands must be run through jinja2 and support variables. Once generated, the commands must be saved to a bash script in the trace directory and run as part of the trace hook process.
Each trace hook subclass (Variable and Comparator) has setup and teardown hooks that are executed before a trace is run and after it has completed, respectively. We also need a similar definition in the trace template config to run commands in a configurable way, outside of a variable or comparator. For example, when testing a TCP client, we'll need to start the TCP server before running the client and then stop the server after the client has exited. This could be done with a couple new configuration options in the trace template:
Both setup and teardown commands must be run through jinja2 and support variables. Once generated, the commands must be saved to a bash script in the trace directory and run as part of the trace hook process.