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).

BUG=chromium:213051
TEST=Sent a SIGTERM to script process using `kill` command, saw that
test_that child processes and autoserv processes cleaned up and exited.
CQ-DEPEND=CL:I6bba284f28736e26e0685c9911dbaa4e82a90472

Change-Id: I2391bccbb9086582ee530a129703912690396134
Reviewed-on: https://gerrit.chromium.org/gerrit/58594
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
diff --git a/test_that b/test_that
index 4776de5..0077613 100755
--- a/test_that
+++ b/test_that
@@ -12,4 +12,14 @@
     exit 1
 fi
 
-sudo $SCR $@
\ No newline at end of file
+trap : SIGTERM SIGINT
+
+sudo $SCR $@ &
+child_pid=$!
+wait $child_pid
+
+if [[ $? -gt 128 ]]
+then
+    sudo kill $child_pid
+    wait $child_pid
+fi
\ No newline at end of file