mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-01 03:51:31 +00:00
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>
This commit is contained in:
parent
736bb0aec8
commit
2cd01285b5
1 changed files with 3 additions and 5 deletions
|
@ -54,14 +54,12 @@ def RunTests(debug, args):
|
||||||
|
|
||||||
# Run the entry tests first ,since these need to be the first to import the
|
# Run the entry tests first ,since these need to be the first to import the
|
||||||
# 'entry' module.
|
# 'entry' module.
|
||||||
suite = unittest.TestLoader().loadTestsFromTestCase(entry_test.TestEntry)
|
|
||||||
suite.run(result)
|
|
||||||
test_name = args and args[0] or None
|
test_name = args and args[0] or None
|
||||||
for module in (ftest.TestFunctional, fdt_test.TestFdt, elf_test.TestElf,
|
for module in (entry_test.TestEntry, ftest.TestFunctional, fdt_test.TestFdt,
|
||||||
image_test.TestImage):
|
elf_test.TestElf, image_test.TestImage):
|
||||||
if test_name:
|
if test_name:
|
||||||
try:
|
try:
|
||||||
suite = unittest.TestLoader().loadTestsFromName(args[0], module)
|
suite = unittest.TestLoader().loadTestsFromName(test_name, module)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue