From e06f9c6acb0e117a3865bd4259d906fb35b30aab Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Tue, 5 Oct 2021 11:24:58 -0700 Subject: [PATCH] E2E: Make SIGINT handling more complete --- test_e2e.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test_e2e.sh b/test_e2e.sh index 3528ee6..9a7cf41 100755 --- a/test_e2e.sh +++ b/test_e2e.sh @@ -153,12 +153,15 @@ ssh-keygen -f "$DOT_SSH/id_test" -P "" >/dev/null cat "$DOT_SSH/id_test.pub" > "$DOT_SSH/authorized_keys" function finish() { - if [[ $? -ne 0 ]]; then + r=$? + trap "" INT EXIT + if [[ $r != 0 ]]; then echo echo "the directory $DIR was not removed as it contains"\ "log files useful for debugging" fi remove_containers + exit $r } trap finish INT EXIT