diff options
author | Simon Glass <sjg@chromium.org> | 2018-07-06 10:27:18 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-07-09 09:11:00 -0600 |
commit | 2cd01285b53f376e439e4cbdbce808ca8231ef84 (patch) | |
tree | cd3f390d68280f612e95777e8ac0feaa28b9d68a /tools | |
parent | 736bb0aec80891891f3f86004e1afa7976585918 (diff) | |
download | u-boot-2cd01285b53f376e439e4cbdbce808ca8231ef84.zip u-boot-2cd01285b53f376e439e4cbdbce808ca8231ef84.tar.gz u-boot-2cd01285b53f376e439e4cbdbce808ca8231ef84.tar.bz2 |
binman: Tidy up execution of tests
Move all the test execution into the same mechanism so that we can request
a particular test (from any suite) by passing it as an argument to
'binman -t'.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/binman/binman.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/binman/binman.py b/tools/binman/binman.py index 944fd5d..74862b1 100755 --- a/tools/binman/binman.py +++ b/tools/binman/binman.py @@ -54,14 +54,12 @@ def RunTests(debug, args): # Run the entry tests first ,since these need to be the first to import the # 'entry' module. - suite = unittest.TestLoader().loadTestsFromTestCase(entry_test.TestEntry) - suite.run(result) test_name = args and args[0] or None - for module in (ftest.TestFunctional, fdt_test.TestFdt, elf_test.TestElf, - image_test.TestImage): + for module in (entry_test.TestEntry, ftest.TestFunctional, fdt_test.TestFdt, + elf_test.TestElf, image_test.TestImage): if test_name: try: - suite = unittest.TestLoader().loadTestsFromName(args[0], module) + suite = unittest.TestLoader().loadTestsFromName(test_name, module) except AttributeError: continue else: |