-
Committer:
ChromeBot
-
Author(s):
Alex Deymo
-
Date:
2013-08-09 21:54:19 UTC
-
Revision ID:
git-v1:a58b62a57eb2fe4070ed7efbf869b37037fbeaa7
unittest: Remove temporary directories.
The CreateExtImageAtPath() test helper function creates an image
and mounts it at a randomly genereted path directory. Nevertheless,
this function wasn't removing the created mount path at the end
since the mount path is a directory and not a regular file. This
was leaving a lot of empty temporary directories in /tmp and
printing the following error message during test:
[0808/211221:ERROR:utils.h(401)] Unable to unlink path /tmp/UpdateEngineTests_mnt-fymh70: Is a directory
This patch fixes that problem removing the directory when the
function exits.
BUG=None
TEST=unittest pass and doesn't print the mentioned error line.
Change-Id: Iec1d38b0fce437a3b5ecc26ae8c933b8ff1bba80
Reviewed-on: https://gerrit.chromium.org/gerrit/65286
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>