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