]> git.sur5r.net Git - u-boot/blob - tools/binman/etype/_testing.py
Merge branch 'master' of git://git.denx.de/u-boot-spi
[u-boot] / tools / binman / etype / _testing.py
1 # Copyright (c) 2016 Google, Inc
2 # Written by Simon Glass <sjg@chromium.org>
3 #
4 # SPDX-License-Identifier:      GPL-2.0+
5 #
6 # Entry-type module for testing purposes. Not used in real images.
7 #
8
9 from entry import Entry
10 import fdt_util
11 import tools
12
13 class Entry__testing(Entry):
14     def __init__(self, image, etype, node):
15         Entry.__init__(self, image, etype, node)
16
17     def ObtainContents(self):
18         self.data = 'a'
19         self.contents_size = len(self.data)
20         return True
21
22     def ReadContents(self):
23         return True
24
25     def GetPositions(self):
26         return {'invalid-entry': [1, 2]}