mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-04 10:43:35 +00:00
binman: Add a test for Intel reference code
Unfortunately the test was not included in the original implementation. Add one. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
c95c666d01
commit
3ae192c2a4
2 changed files with 21 additions and 0 deletions
|
@ -60,6 +60,7 @@ VBLOCK_DATA = 'vblk'
|
||||||
FILES_DATA = ("sorry I'm late\nOh, don't bother apologising, I'm " +
|
FILES_DATA = ("sorry I'm late\nOh, don't bother apologising, I'm " +
|
||||||
"sorry you're alive\n")
|
"sorry you're alive\n")
|
||||||
COMPRESS_DATA = 'data to compress'
|
COMPRESS_DATA = 'data to compress'
|
||||||
|
REFCODE_DATA = 'refcode'
|
||||||
|
|
||||||
|
|
||||||
class TestFunctional(unittest.TestCase):
|
class TestFunctional(unittest.TestCase):
|
||||||
|
@ -115,6 +116,7 @@ class TestFunctional(unittest.TestCase):
|
||||||
TestFunctional._MakeInputFile('ecrw.bin', CROS_EC_RW_DATA)
|
TestFunctional._MakeInputFile('ecrw.bin', CROS_EC_RW_DATA)
|
||||||
TestFunctional._MakeInputDir('devkeys')
|
TestFunctional._MakeInputDir('devkeys')
|
||||||
TestFunctional._MakeInputFile('bmpblk.bin', BMPBLK_DATA)
|
TestFunctional._MakeInputFile('bmpblk.bin', BMPBLK_DATA)
|
||||||
|
TestFunctional._MakeInputFile('refcode.bin', REFCODE_DATA)
|
||||||
|
|
||||||
# ELF file with a '_dt_ucode_base_size' symbol
|
# ELF file with a '_dt_ucode_base_size' symbol
|
||||||
with open(self.TestFile('u_boot_ucode_ptr')) as fd:
|
with open(self.TestFile('u_boot_ucode_ptr')) as fd:
|
||||||
|
@ -1764,6 +1766,11 @@ class TestFunctional(unittest.TestCase):
|
||||||
<none> 00000003 00000004 u-boot-align
|
<none> 00000003 00000004 u-boot-align
|
||||||
''', map_data)
|
''', map_data)
|
||||||
|
|
||||||
|
def testPacRefCode(self):
|
||||||
|
"""Test that an image with an Intel Reference code binary works"""
|
||||||
|
data = self._DoReadFile('100_intel_refcode.dts')
|
||||||
|
self.assertEqual(REFCODE_DATA, data[:len(REFCODE_DATA)])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
14
tools/binman/test/100_intel_refcode.dts
Normal file
14
tools/binman/test/100_intel_refcode.dts
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
/ {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
binman {
|
||||||
|
size = <16>;
|
||||||
|
|
||||||
|
intel-refcode {
|
||||||
|
filename = "refcode.bin";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
Loading…
Add table
Reference in a new issue