make test_that wrapper script handle SIGTERM and SIGINT correctly
Prior to this CL, sending either a SIGTERM or a SIGINT signal to this
script process using the `kill` command would result in the underlying
test_that.py processing being left around as an orphan.
This CL traps causes the script to trap SIGTERM and SIGINT signals. When
either signal is received, the child `sudo test_that` process is sent a
SIGTERM signal using the `kill` command, and the script waits on that
process to end (since it may take up to 5 seconds for autoserv to clean
up after itself).
TEST=Sent a SIGTERM to script process using `kill` command, saw that
test_that child processes and autoserv processes cleaned up and exited.
Tested-by: Aviv Keshet <firstname.lastname@example.org>
Reviewed-by: Scott Zawalski <email@example.com>
Commit-Queue: Aviv Keshet <firstname.lastname@example.org>
1 file changed