upstream u-boot with additional patches for our devices/boards: https://lists.denx.de/pipermail/u-boot/2017-March/282789.html (AXP crashes) ; Gbit ethernet patch for some LIME2 revisions ; with SPI flash support
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
u-boot/tools/binman/elf_test.py

32 lines
821 B

#
# Copyright (c) 2017 Google, Inc
# Written by Simon Glass <sjg@chromium.org>
#
# SPDX-License-Identifier: GPL-2.0+
#
# Test for the elf module
import os
import sys
import unittest
import elf
binman_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
fname = os.path.join(binman_dir, 'test', 'u_boot_ucode_ptr')
class TestElf(unittest.TestCase):
def testAllSymbols(self):
syms = elf.GetSymbols(fname, [])
self.assertIn('.ucode', syms)
def testRegexSymbols(self):
syms = elf.GetSymbols(fname, ['ucode'])
self.assertIn('.ucode', syms)
syms = elf.GetSymbols(fname, ['missing'])
self.assertNotIn('.ucode', syms)
syms = elf.GetSymbols(fname, ['missing', 'ucode'])
self.assertIn('.ucode', syms)
if __name__ == '__main__':
unittest.main()