binman: Clean up unnecessary code related to ELF test files
authorSimon Glass <sjg@chromium.org>
Sat, 24 Aug 2019 13:22:59 +0000 (07:22 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 15 Oct 2019 14:40:02 +0000 (08:40 -0600)
We use the Makefile for all ELF test files now, so drop all the code that
checks whether to get the test file from the Makefile or from the git
repo.

Also add a comment to the Makefile indicating that it is run from binman.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/binman/elf_test.py
tools/binman/ftest.py
tools/binman/test/Makefile

index 1ee5d9d57c774c06a3e7df0c16cedab1440f3ccf..f05545bcb13b5e592b4f4708619fbf082ac7e533 100644 (file)
@@ -69,10 +69,7 @@ def BuildElfTestFiles(target_dir):
     if 'MAKEFLAGS' in os.environ:
         del os.environ['MAKEFLAGS']
     tools.Run('make', '-C', target_dir, '-f',
-              os.path.join(testdir, 'Makefile'), 'SRC=%s/' % testdir,
-              'bss_data', 'u_boot_ucode_ptr', 'u_boot_no_ucode_ptr',
-              'u_boot_binman_syms', 'u_boot_binman_syms.bin',
-              'u_boot_binman_syms_size', 'u_boot_binman_syms_bad')
+              os.path.join(testdir, 'Makefile'), 'SRC=%s/' % testdir)
 
 
 class TestElf(unittest.TestCase):
index 51eab6fbfada9ea2edf3d9880034cf71c11ef4a7..1d774e28e54a09cb5f3295544fc6c3428d78840e 100644 (file)
@@ -488,13 +488,8 @@ class TestFunctional(unittest.TestCase):
         Args:
             Filename of ELF file to use as SPL
         """
-        # TODO(sjg@chromium.org): Drop this when all Elf files use ElfTestFile()
-        if src_fname in ['bss_data', 'u_boot_ucode_ptr', 'u_boot_no_ucode_ptr',
-                         'u_boot_binman_syms', 'u_boot_binman_syms_size']:
-            fname = cls.ElfTestFile(src_fname)
-        else:
-            fname = cls.TestFile(src_fname)
-        TestFunctional._MakeInputFile('spl/u-boot-spl', tools.ReadFile(fname))
+        TestFunctional._MakeInputFile('spl/u-boot-spl',
+            tools.ReadFile(cls.ElfTestFile(src_fname)))
 
     @classmethod
     def TestFile(cls, fname):
index 593bbe9bd9d3482f8d7c321712dff2234b90ecd0..bdbb009874d4a6a1016a4735328ce22ce4456442 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Builds test programs
+# Builds test programs. This is launched from elf_test.BuildElfTestFiles()
 #
 # Copyright (C) 2017 Google, Inc
 # Written by Simon Glass <sjg@chromium.org>