[U-Boot] [PATCH v2 01/31] binman: Simplify the entry test

sjg at google.com sjg at google.com
Thu Jul 18 01:59:04 UTC 2019


The current test for the 'entry' module is a bit convoluted since it has
to import the module multiple times. It also relies on ordering, in that
test1EntryNoImportLib() must run before test2EntryImportLib() if they are
running in the same Python process.

This is unreliable since neither the ordering of tests nor the process
that they run in is defined.

Fix this by always reloading the entry in these two tests. Also add a
check that the expected value of have_importlib is obtained.

This corrects a code-coverage problem in the 'entry' module on some
systems.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2: None

 tools/binman/entry_test.py | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list