- suite = unittest.TestLoader().loadTestsFromTestCase(entry_test.TestEntry)
- suite.run(result)
- for module in (ftest.TestFunctional, fdt_test.TestFdt):
- suite = unittest.TestLoader().loadTestsFromTestCase(module)
+ test_name = args and args[0] or None
+ 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(test_name, module)
+ except AttributeError:
+ continue
+ else:
+ suite = unittest.TestLoader().loadTestsFromTestCase(module)