]> code.ossystems Code Review - openembedded-core.git/commit
oeqa/oelib/path: don't leak temporary directories
authorRoss Burton <ross.burton@intel.com>
Mon, 3 Dec 2018 11:47:58 +0000 (11:47 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Dec 2018 10:29:29 +0000 (10:29 +0000)
commitedd2ecbc86d8b02a0467491451306f67e81d9ead
tree13cfc6dfd0e5a7a86bccb26a1fd9b4f0a2b2b08c
parentd5ce38168238181423c9dcd1d258253e3515d0a5
oeqa/oelib/path: don't leak temporary directories

setUp() is used to populate a directory of temporary files, and deleted in
__del__.  However setUp() is called once *per test* so __del__ would only be
able to remove the last directory created.

Fix the code by using the natural counterpart to setUp, tearDown(), to clean up.

(From OE-Core rev: 68b4723e6fb11d171869185bccf28f32f6284c18)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/oelib/path.py