Merge "Fix test cleanup trap to cleanup tmpdir"

This commit is contained in:
Jenkins 2015-09-16 14:53:35 +00:00 committed by Gerrit Code Review
commit 801bd2a5be

View File

@ -14,8 +14,7 @@ function build_test_image() {
dest_dir=$(mktemp -d) dest_dir=$(mktemp -d)
base_dest=$(basename $dest_dir) base_dest=$(basename $dest_dir)
trap "rm -rf $dest_dir" EXIT trap "rm -rf $dest_dir; docker rmi $base_dest/image" EXIT
trap "docker rmi $base_dest/image" EXIT
ELEMENTS_PATH=$DIB_ELEMENTS:$TEST_ELEMENTS \ ELEMENTS_PATH=$DIB_ELEMENTS:$TEST_ELEMENTS \
$DIB_CMD -x $type_arg --docker-target=$base_dest/image \ $DIB_CMD -x $type_arg --docker-target=$base_dest/image \