summaryrefslogtreecommitdiff
path: root/tools/binman/entry_test.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-10-01 21:12:47 -0600
committerSimon Glass <sjg@chromium.org>2018-10-08 07:34:34 -0600
commit11ae93eef40c09280f36104b6a8cf5d807f0bb0d (patch)
tree66b0e782d4901eb24e87354444bb73dda4f39a0e /tools/binman/entry_test.py
parent2673afe221d17b8d43df3ecae3e3a6024b209ffe (diff)
downloadu-boot-11ae93eef40c09280f36104b6a8cf5d807f0bb0d.tar.gz
binman: Run tests concurrently
At present the tests run one after the other using a single CPU. This is not very efficient. Bring in the concurrencytest module and run the tests concurrently, using one process for each CPU by default. A -P option allows this to be overridden, which is necessary for code-coverage to function correctly. This requires fixing a few tests which are currently not fully independent. At some point we might consider doing this across all pytests in U-Boot. There is a pytest version that supports specifying the number of processes to use, but it did not work for me. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry_test.py')
-rw-r--r--tools/binman/entry_test.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/binman/entry_test.py b/tools/binman/entry_test.py
index a8bc938f9e..17ab229014 100644
--- a/tools/binman/entry_test.py
+++ b/tools/binman/entry_test.py
@@ -13,6 +13,8 @@ import fdt
import fdt_util
import tools
+entry = None
+
class TestEntry(unittest.TestCase):
def setUp(self):
tools.PrepareOutputDir(None)
@@ -38,7 +40,10 @@ class TestEntry(unittest.TestCase):
def test2EntryImportLib(self):
del sys.modules['importlib']
global entry
- reload(entry)
+ if entry:
+ reload(entry)
+ else:
+ import entry
entry.Entry.Create(None, self.GetNode(), 'u-boot-spl')
del entry