]> 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>
Wed, 5 Dec 2018 12:28:54 +0000 (12:28 +0000)
commit68b4723e6fb11d171869185bccf28f32f6284c18
tree1c8ff6e0f5f4e687e29ff81a7937e770f40842fb
parent24000d1fdba2684202e15371f80bb385722c9d91
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.

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