binman: Tidy up _SetupDtb() to use its own temporary file
authorSimon Glass <sjg@chromium.org>
Sat, 20 Jul 2019 18:23:49 +0000 (12:23 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 29 Jul 2019 15:38:06 +0000 (09:38 -0600)
commita004f29464d14f3535ed8db22e5dfed02c8fc9d8
tree0451f714cdca079bad5d1d99e08d26b32b45fe80
parent02fd463cfeeb3ec693539885dbc58e0439d3b4de
binman: Tidy up _SetupDtb() to use its own temporary file

At present EnsureCompiled() uses an file from the 'output' directory (in
the tools module) when compiling the device tree. This is fine in most
cases, allowing useful inspection of the output files from binman.

However in functional tests, _SetupDtb() creates an output directory and
immediately removes it afterwards. This serves no benefit and just
confuses things, since the 'official' output directory is supposed to be
created and destroyed in control.Binman().

Add a new parameter for the optional temporary directory to use, and use a
separate temporary directory in _SetupDtb().

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/binman/ftest.py
tools/dtoc/fdt_util.py
tools/dtoc/test_fdt.py