diff options
author | Simon Glass <sjg@chromium.org> | 2018-10-01 21:12:41 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-10-08 07:34:34 -0600 |
commit | e0e6275f4c6cbcf2b975dbd9771b14f21eb51a36 (patch) | |
tree | 79a413610800f0c24082f194b3c4d2c862b1e5a1 /tools/binman/ftest.py | |
parent | ed59e005e6ed388609749d52e98804b76db095d1 (diff) | |
download | u-boot-e0e6275f4c6cbcf2b975dbd9771b14f21eb51a36.tar.gz |
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 <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r-- | tools/binman/ftest.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 57725c928e..9ef259a699 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -115,7 +115,6 @@ class TestFunctional(unittest.TestCase): TestFunctional._MakeInputFile('ecrw.bin', CROS_EC_RW_DATA) TestFunctional._MakeInputDir('devkeys') TestFunctional._MakeInputFile('bmpblk.bin', BMPBLK_DATA) - self._output_setup = False # ELF file with a '_dt_ucode_base_size' symbol with open(self.TestFile('u_boot_ucode_ptr')) as fd: @@ -230,14 +229,13 @@ class TestFunctional(unittest.TestCase): Returns: Contents of device-tree binary """ - if not self._output_setup: - tools.PrepareOutputDir(self._indir, True) - self._output_setup = True + tools.PrepareOutputDir(None) dtb = fdt_util.EnsureCompiled(self.TestFile(fname)) with open(dtb) as fd: data = fd.read() TestFunctional._MakeInputFile(outfile, data) - return data + tools.FinaliseOutputDir() + return data def _GetDtbContentsForSplTpl(self, dtb_data, name): """Create a version of the main DTB for SPL or SPL |