From: Simon Glass Date: Fri, 6 Jul 2018 10:27:18 -0600 Subject: [U-Boot] [PATCH v2 05/29] binman: Tidy up execution of tests In-Reply-To: <20180706162742.186950-1-sjg@chromium.org> References: <20180706162742.186950-1-sjg@chromium.org> Message-ID: <20180706162742.186950-6-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v2: None tools/binman/binman.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/binman/binman.py b/tools/binman/binman.py index 944fd5d7ba..74862b1146 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: -- 2.18.0.203.gfac676dfb9-goog