aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/etype/_testing.py
blob: c376dd5c9ca296d3b87618f36a0a4d589ddccd78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2016 Google, Inc
# Written by Simon Glass <sjg@chromium.org>
#
# Entry-type module for testing purposes. Not used in real images.
#

from entry import Entry
import fdt_util
import tools

class Entry__testing(Entry):
    def __init__(self, section, etype, node):
        Entry.__init__(self, section, etype, node)

    def ObtainContents(self):
        self.data = 'a'
        self.contents_size = len(self.data)
        return True

    def ReadContents(self):
        return True

    def GetPositions(self):
        return {'invalid-entry': [1, 2]}