[PATCH v3 13/35] binman: Report an error if test files fail to compile

Simon Glass sjg at chromium.org
Tue Oct 26 05:30:36 CEST 2021


At present any error from the 'make' command is silently swallowed by the
test system. Fix this by showing it when detected.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 tools/binman/elf_test.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/binman/elf_test.py b/tools/binman/elf_test.py
index 7a128018d9f..bcccd78c0a1 100644
--- a/tools/binman/elf_test.py
+++ b/tools/binman/elf_test.py
@@ -70,8 +70,12 @@ def BuildElfTestFiles(target_dir):
     # correctly. So drop any make flags here.
     if 'MAKEFLAGS' in os.environ:
         del os.environ['MAKEFLAGS']
-    tools.Run('make', '-C', target_dir, '-f',
-              os.path.join(testdir, 'Makefile'), 'SRC=%s/' % testdir)
+    try:
+        tools.Run('make', '-C', target_dir, '-f',
+                  os.path.join(testdir, 'Makefile'), 'SRC=%s/' % testdir)
+    except ValueError as e:
+        # The test system seems to suppress this in a strange way
+        print(e)
 
 
 class TestElf(unittest.TestCase):
-- 
2.33.0.1079.g6e70778dc9-goog



More information about the U-Boot mailing list