]> 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:18:50 +0000 (10:18 +0000)
commiteee30d799ff892443d21de4128e7d643215b0ac1
tree9492e381220e1b689c33d545de4a2a8b2575178f
parent1ec53b8d82491aeb9f49e7a78f531e98b5608f0f
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