mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-28 17:21:36 +02:00
binman: Tweak elf tests for a toolchain change
Some newer toolchains do not create a symbol for the .ucode section that this test relies on. Update the test to use the symbol that is explicitly created, instead. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
8bbd8a3594
commit
1e18a69394
@ -99,17 +99,17 @@ class TestElf(unittest.TestCase):
|
|||||||
"""Test that we can obtain a symbol from the ELF file"""
|
"""Test that we can obtain a symbol from the ELF file"""
|
||||||
fname = self.ElfTestFile('u_boot_ucode_ptr')
|
fname = self.ElfTestFile('u_boot_ucode_ptr')
|
||||||
syms = elf.GetSymbols(fname, [])
|
syms = elf.GetSymbols(fname, [])
|
||||||
self.assertIn('.ucode', syms)
|
self.assertIn('_dt_ucode_base_size', syms)
|
||||||
|
|
||||||
def testRegexSymbols(self):
|
def testRegexSymbols(self):
|
||||||
"""Test that we can obtain from the ELF file by regular expression"""
|
"""Test that we can obtain from the ELF file by regular expression"""
|
||||||
fname = self.ElfTestFile('u_boot_ucode_ptr')
|
fname = self.ElfTestFile('u_boot_ucode_ptr')
|
||||||
syms = elf.GetSymbols(fname, ['ucode'])
|
syms = elf.GetSymbols(fname, ['ucode'])
|
||||||
self.assertIn('.ucode', syms)
|
self.assertIn('_dt_ucode_base_size', syms)
|
||||||
syms = elf.GetSymbols(fname, ['missing'])
|
syms = elf.GetSymbols(fname, ['missing'])
|
||||||
self.assertNotIn('.ucode', syms)
|
self.assertNotIn('_dt_ucode_base_size', syms)
|
||||||
syms = elf.GetSymbols(fname, ['missing', 'ucode'])
|
syms = elf.GetSymbols(fname, ['missing', 'ucode'])
|
||||||
self.assertIn('.ucode', syms)
|
self.assertIn('_dt_ucode_base_size', syms)
|
||||||
|
|
||||||
def testMissingFile(self):
|
def testMissingFile(self):
|
||||||
"""Test that a missing file is detected"""
|
"""Test that a missing file is detected"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user