From 9e1cef01ecfdb132e180cc680294008d19e76d46 Mon Sep 17 00:00:00 2001 From: Gregory Haynes Date: Wed, 22 Jul 2015 03:57:09 -0700 Subject: [PATCH] Fix test cleanup trap to cleanup tmpdir We have a bug where we are overriding the tmpdir cleanup with the docker image rm cleanup. We should be doing both. Change-Id: I678c6248c1902095352a454618e3bdb9ed73630a --- tests/test_functions.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_functions.bash b/tests/test_functions.bash index 67f28bfd..b89a4597 100644 --- a/tests/test_functions.bash +++ b/tests/test_functions.bash @@ -14,8 +14,7 @@ function build_test_image() { dest_dir=$(mktemp -d) base_dest=$(basename $dest_dir) - trap "rm -rf $dest_dir" EXIT - trap "docker rmi $base_dest/image" EXIT + trap "rm -rf $dest_dir; docker rmi $base_dest/image" EXIT ELEMENTS_PATH=$DIB_ELEMENTS:$TEST_ELEMENTS \ $DIB_CMD -x $type_arg --docker-target=$base_dest/image \