From ed8e0132a727a60dc950d3253732085a2ed9a854 Mon Sep 17 00:00:00 2001 From: toddouska Date: Tue, 6 Dec 2016 13:04:12 -0800 Subject: [PATCH] do_cleanup on pkcallbacks.test --- scripts/pkcallbacks.test | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/pkcallbacks.test b/scripts/pkcallbacks.test index 6a0e1c569..24c9228f5 100755 --- a/scripts/pkcallbacks.test +++ b/scripts/pkcallbacks.test @@ -23,6 +23,17 @@ remove_ready_file() { fi } +do_cleanup() { + echo "in cleanup" + + if [ $server_pid != $no_pid ] + then + echo "killing server" + kill -9 $server_pid + fi + remove_ready_file +} + # trap this function so if user aborts with ^C or other kill signal we still # get an exit that will in turn clean up the file system abort_trap() { @@ -94,7 +105,6 @@ run_test() { if [ $server_result != 0 ] then echo -e "server failed!" - do_cleanup exit 1 fi