From e0e6275f4c6cbcf2b975dbd9771b14f21eb51a36 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Oct 2018 21:12:41 -0600 Subject: binman: Fix up removal of temporary directories At present 'make check' leaves some temporary directories around. Part of this is because we call tools.PrepareOutputDir() twice in some cases, without calling tools.FinaliseOutputDir() in between. Fix this. Signed-off-by: Simon Glass --- tools/binman/entry_test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tools/binman/entry_test.py') diff --git a/tools/binman/entry_test.py b/tools/binman/entry_test.py index 69d85b4ced..a8bc938f9e 100644 --- a/tools/binman/entry_test.py +++ b/tools/binman/entry_test.py @@ -14,9 +14,14 @@ import fdt_util import tools class TestEntry(unittest.TestCase): + def setUp(self): + tools.PrepareOutputDir(None) + + def tearDown(self): + tools.FinaliseOutputDir() + def GetNode(self): binman_dir = os.path.dirname(os.path.realpath(sys.argv[0])) - tools.PrepareOutputDir(None) fname = fdt_util.EnsureCompiled( os.path.join(binman_dir,('test/05_simple.dts'))) dtb = fdt.FdtScan(fname) @@ -35,7 +40,6 @@ class TestEntry(unittest.TestCase): global entry reload(entry) entry.Entry.Create(None, self.GetNode(), 'u-boot-spl') - tools._RemoveOutputDir() del entry def testEntryContents(self): -- cgit v1.2.3