Home
last modified time | relevance | path

Searched full:self (Results 1 – 25 of 3505) sorted by relevance

12345678910>>...141

/openbmc/qemu/scripts/
H A Dminikconf.py38 def __init__(self, msg): argument
39 self.msg = msg
41 def __str__(self): argument
42 return self.msg
51 def __and__(self, rhs): argument
52 return KconfigData.AND(self, rhs)
53 def __or__(self, rhs): argument
54 return KconfigData.OR(self, rhs)
55 def __invert__(self): argument
56 return KconfigData.NOT(self)
[all …]
H A Danalyze-migration.py36 def __init__(self, filename): argument
37 self.filename = filename
38 self.file = open(self.filename, "rb")
40 def read64(self): argument
41 return int.from_bytes(self.file.read(8), byteorder='big', signed=False)
43 def read32(self): argument
44 return int.from_bytes(self.file.read(4), byteorder='big', signed=False)
46 def read16(self): argument
47 return int.from_bytes(self.file.read(2), byteorder='big', signed=False)
49 def read8(self): argument
[all …]
/openbmc/openbmc/poky/bitbake/lib/
H A Dcodegen.py87 def __init__(self, indent_with, add_line_information=False): argument
88 self.result = []
89 self.indent_with = indent_with
90 self.add_line_information = add_line_information
91 self.indentation = 0
92 self.new_lines = 0
94 def write(self, x): argument
95 if self.new_lines:
96 if self.result:
97 self.result.append('\n' * self.new_lines)
[all …]
/openbmc/linux/tools/perf/scripts/python/
H A Dexported-sql-viewer.py194 def __init__(self, task, param=None, parent=None): argument
195 super(Thread, self).__init__(parent)
196 self.task = task
197 self.param = param
199 def run(self): argument
201 if self.param is None:
202 done, result = self.task()
204 done, result = self.task(self.param)
205 self.done.emit(result)
213 def __init__(self, glb, params, parent=None): argument
[all …]
/openbmc/openbmc/poky/bitbake/lib/bb/tests/
H A Ddata.py18 def __enter__(self): argument
21 def emit(self, record): argument
25 self.handler = handler
28 def __exit__(self, type, value, traceback): argument
30 logger.removeHandler(self.handler)
41 def setUp(self): argument
42 self.d = bb.data.init()
43 self.d["foo"] = "value_of_foo"
44 self.d["bar"] = "value_of_bar"
45 self.d["value_of_foo"] = "value_of_'value_of_foo'"
[all …]
H A Dcodeparser.py22 def setUp(self): argument
23 self.d = bb.data.init()
25 def setEmptyVars(self, varlist): argument
27 self.d.setVar(k, "")
29 def setValues(self, values): argument
31 self.d.setVar(k, v)
33 def assertReferences(self, refs): argument
34 self.assertEqual(self.references, refs)
36 def assertExecs(self, execs): argument
37 self.assertEqual(self.execs, execs)
[all …]
/openbmc/openbmc/poky/bitbake/lib/layerindexlib/tests/
H A Dlayerindexobj.py10 def setUp(self): argument
13 LayersTest.setUp(self)
15 self.index = LayerIndexObj()
25 self.index.branches = {}
26 self.index.layerItems = {}
27 self.index.layerBranches = {}
28 self.index.layerDependencies = {}
29 self.index.recipes = {}
30 self.index.machines = {}
31 self.index.distros = {}
[all …]
/openbmc/openbmc/poky/scripts/pybootchartgui/pybootchartgui/
H A Dgui.py47 def __init__(self, trace, options, xscale): argument
48 gtk.DrawingArea.__init__(self)
50 self.trace = trace
51 self.options = options
53 self.set_can_focus(True)
55 self.add_events(Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK)
56 self.connect("button-press-event", self.on_area_button_press)
57 self.connect("button-release-event", self.on_area_button_release)
58self.add_events(Gdk.EventMask.POINTER_MOTION_MASK | Gdk.EventMask.POINTER_MOTION_HINT_MASK | Gdk.E…
59 self.connect("motion-notify-event", self.on_area_motion_notify)
[all …]
H A Dsamples.py18 def __init__(self, time): argument
19 self.time = time
20 self.diskdata = [0, 0, 0]
21 def add_diskdata(self, new_diskdata): argument
22 self.diskdata = [ a + b for a, b in zip(self.diskdata, new_diskdata) ]
25 def __init__(self, time, user, sys, io = 0.0, swap = 0.0): argument
26 self.time = time
27 self.user = user
28 self.sys = sys
29 self.io = io
[all …]
/openbmc/linux/scripts/gdb/linux/
H A Dmm.py24 def __init__(self): argument
28 self.ops = aarch64_page_ops()
33 def __init__(self): argument
34 self.SUBSECTION_SHIFT = 21
35 self.SEBSECTION_SIZE = 1 << self.SUBSECTION_SHIFT
36 self.MODULES_VSIZE = 128 * 1024 * 1024
39 self.SECTION_SIZE_BITS = 29
41 self.SECTION_SIZE_BITS = 27
42 self.MAX_PHYSMEM_BITS = constants.LX_CONFIG_ARM64_VA_BITS
44 self.PAGE_SHIFT = constants.LX_CONFIG_ARM64_PAGE_SHIFT
[all …]
/openbmc/openbmc/poky/bitbake/lib/hashserv/
H A Dtests.py44 …def start_server(self, dbpath=None, upstream=None, read_only=False, prefunc=server_prefunc, anon_p… argument
45 self.server_index += 1
47 dbpath = self.make_dbpath()
56 server = create_server(self.get_server_addr(self.server_index),
65 server.serve_as_process(prefunc=prefunc, args=(self.server_index,))
66 self.addCleanup(cleanup_server, server)
70 def make_dbpath(self): argument
71 return os.path.join(self.temp_dir.name, "db%d.sqlite" % self.server_index)
73 def start_client(self, server_address, username=None, password=None): argument
78 self.addCleanup(cleanup_client, client)
[all …]
H A Dserver.py54 def __init__(self, sample): argument
55 self.sample = sample
57 def start(self): argument
58 self.start_time = time.perf_counter()
60 def end(self): argument
61 self.sample.add(time.perf_counter() - self.start_time)
63 def __enter__(self): argument
64 self.start()
65 return self
67 def __exit__(self, *args, **kwargs): argument
[all …]
/openbmc/qemu/docs/sphinx/
H A Ddbusparser.py24 def __init__(self, key, value): argument
25 self.key = key
26 self.value = value
27 self.annotations = []
28 self.since = ""
32 def __init__(self, name, signature): argument
33 self.name = name
34 self.signature = signature
35 self.annotations = []
36 self.doc_string = ""
[all …]
/openbmc/qemu/tests/qemu-iotests/
H A D11848 def process_events(self): argument
49 for event in self.vm.get_qmp_events(wait=False):
52 event['data']['id'] == self.device_name)):
54 self.has_closed = True
56 self.has_opened = True
58 def wait_for_open(self): argument
59 if not self.has_real_tray:
63 while not self.has_opened:
64 self.process_events()
66 def wait_for_close(self): argument
[all …]
H A D04039 def wait_for_complete(self, need_ready=False): argument
43 for event in self.vm.get_qmp_events(wait=True):
45 self.assert_qmp_absent(event, 'data/error')
46 self.assert_qmp(event, 'data/type', 'commit')
47 self.assert_qmp(event, 'data/device', 'drive0')
48 self.assert_qmp(event, 'data/offset', event['data']['len'])
50 self.assertTrue(ready, "Expecting BLOCK_JOB_COMPLETED event")
54 self.assert_qmp(event, 'data/type', 'commit')
55 self.assert_qmp(event, 'data/device', 'drive0')
56 self.vm.qmp('block-job-complete', device='drive0')
[all …]
/openbmc/linux/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/
H A DSchedGui.py23 def __init__(self, sched_tracer, title, parent = None, id = -1): argument
24 wx.Frame.__init__(self, parent, id, title)
26 (self.screen_width, self.screen_height) = wx.GetDisplaySize()
27 self.screen_width -= 10
28 self.screen_height -= 10
29 self.zoom = 0.5
30 self.scroll_scale = 20
31 self.sched_tracer = sched_tracer
32 self.sched_tracer.set_root_win(self)
33 (self.ts_start, self.ts_end) = sched_tracer.interval()
[all …]
/openbmc/openbmc/poky/bitbake/lib/prserv/
H A Dtests.py49 def start_server(self, name, dbfile, upstream=None, read_only=False, prefunc=server_prefunc): argument
63 self.addCleanup(cleanup_server, server)
67 def start_client(self, server_address): argument
72 self.addCleanup(cleanup_client, client)
78 def setUp(self): argument
79 self.temp_dir = tempfile.TemporaryDirectory(prefix='bb-prserv')
80 self.addCleanup(self.temp_dir.cleanup)
82 def test_increase_revision(self): argument
83 self.assertEqual(increase_revision("1"), "2")
84 self.assertEqual(increase_revision("1.0"), "1.1")
[all …]
/openbmc/qemu/tests/functional/
H A Dtest_ppc_74xx.py17 def test_ppc_7400(self): argument
18 self.require_accelerator("tcg")
19 self.set_machine('g3beige')
20 self.vm.set_console()
21 self.vm.add_args('-cpu', '7400')
22 self.vm.launch()
23 wait_for_console_pattern(self, '>> OpenBIOS')
24 wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
26 def test_ppc_7410(self): argument
27 self.require_accelerator("tcg")
[all …]
/openbmc/u-boot/tools/dtoc/
H A Dtest_fdt65 def setUp(self): argument
66 self.dtb = fdt.FdtScan('tools/dtoc/dtoc_test_simple.dts')
68 def testFdt(self): argument
70 self.dtb.Scan()
71 root = self.dtb.GetRoot()
72 self.assertTrue(isinstance(root, fdt.Node))
74 def testGetNode(self): argument
76 node = self.dtb.GetNode('/spl-test')
77 self.assertTrue(isinstance(node, fdt.Node))
78 node = self.dtb.GetNode('/i2c@0/pmic@9')
[all …]
H A Dtest_fdt.py65 def setUp(self): argument
66 self.dtb = fdt.FdtScan('tools/dtoc/dtoc_test_simple.dts')
68 def testFdt(self): argument
70 self.dtb.Scan()
71 root = self.dtb.GetRoot()
72 self.assertTrue(isinstance(root, fdt.Node))
74 def testGetNode(self): argument
76 node = self.dtb.GetNode('/spl-test')
77 self.assertTrue(isinstance(node, fdt.Node))
78 node = self.dtb.GetNode('/i2c@0/pmic@9')
[all …]
/openbmc/openbmc/poky/bitbake/lib/bb/asyncrpc/
H A Dserv.py21 def process(self, msg, kwargs): argument
22 return f"[Client {self.extra['address']}] {msg}", kwargs
26 # If a handler returns this object (e.g. `return self.NO_RESPONSE`), no
30 def __init__(self, socket, proto_name, logger): argument
31 self.socket = socket
32 self.proto_name = proto_name
33 self.handlers = {
34 "ping": self.handle_ping,
36 self.logger = ClientLoggerAdapter(
42 self.client_headers = {}
[all …]
/openbmc/phosphor-dbus-monitor/src/
H A Dpdmgen.py32 def __init__(self, path, msg): argument
36 self.config = path
37 self.msg = msg
45 def __init__(self, path, cls, *names): argument
47 super(NotUniqueError, self).__init__(
92 def __init__(self, cast, target): argument
95 self.cast = cast
96 self.target = target
98 def __call__(self, arg): argument
99 return "{0}_cast<{1}>({2})".format(self.cast, self.target, arg)
[all …]
/openbmc/qemu/tests/functional/acpi-bits/bits-tests/
H A Dsmbios.py269 def __init__(self):
70 super(SMBIOS, self).__init__()
71 u = unpack.Unpackable(self._header_memory)
72 self.add_field('header', Header(u))
73self._structure_memory = bits.memory(self.header.structure_table_address, self.header.structure_ta…
74 u = unpack.Unpackable(self._structure_memory)
75self.add_field('structures', unpack.unpack_all(u, _smbios_structures, self), unpack.format_each("\…
77 def structure_type(self, num):
80 … types_present = [self.structures[x].smbios_structure_type for x in range(len(self.structures))]
84 matrix[types_present[index]] = self.structures[index]
[all …]
/openbmc/qemu/scripts/qapi/
H A Dschema.py51 self, argument
54 self.ifcond = ifcond
56 def _cgen(self) -> str: argument
57 return cgen_ifcond(self.ifcond)
59 def gen_if(self) -> str: argument
60 return gen_if(self._cgen())
62 def gen_endif(self) -> str: argument
63 return gen_endif(self._cgen())
65 def docgen(self) -> str: argument
66 return docgen_ifcond(self.ifcond)
[all …]
/openbmc/linux/tools/crypto/ccp/
H A Dtest_dbc.py34 def __init__(self, data) -> None: argument
35 self.d = None
36 self.signature = b"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
37 self.uid = b"1111111111111111"
40 def setUp(self) -> None: argument
41 self.d = open(DEVICE_NODE)
44 def tearDown(self) -> None: argument
45 if self.d:
46 self.d.close()
51 def setUp(self) -> None: argument
[all …]

12345678910>>...141