提交 c9a0b275 编写于 作者: S Simon Glass

binman: Clean up unnecessary code related to ELF test files

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: NSimon Glass <sjg@chromium.org>
上级 8dc60f99
...@@ -69,10 +69,7 @@ def BuildElfTestFiles(target_dir): ...@@ -69,10 +69,7 @@ def BuildElfTestFiles(target_dir):
if 'MAKEFLAGS' in os.environ: if 'MAKEFLAGS' in os.environ:
del os.environ['MAKEFLAGS'] del os.environ['MAKEFLAGS']
tools.Run('make', '-C', target_dir, '-f', tools.Run('make', '-C', target_dir, '-f',
os.path.join(testdir, 'Makefile'), 'SRC=%s/' % testdir, 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')
class TestElf(unittest.TestCase): class TestElf(unittest.TestCase):
......
...@@ -488,13 +488,8 @@ class TestFunctional(unittest.TestCase): ...@@ -488,13 +488,8 @@ class TestFunctional(unittest.TestCase):
Args: Args:
Filename of ELF file to use as SPL Filename of ELF file to use as SPL
""" """
# TODO(sjg@chromium.org): Drop this when all Elf files use ElfTestFile() TestFunctional._MakeInputFile('spl/u-boot-spl',
if src_fname in ['bss_data', 'u_boot_ucode_ptr', 'u_boot_no_ucode_ptr', tools.ReadFile(cls.ElfTestFile(src_fname)))
'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))
@classmethod @classmethod
def TestFile(cls, fname): def TestFile(cls, fname):
......
# #
# Builds test programs # Builds test programs. This is launched from elf_test.BuildElfTestFiles()
# #
# Copyright (C) 2017 Google, Inc # Copyright (C) 2017 Google, Inc
# Written by Simon Glass <sjg@chromium.org> # Written by Simon Glass <sjg@chromium.org>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册