/openbmc/qemu/scripts/ |
H A D | minikconf.py | 3 # Mini-Kconfig parser 12 # the top-level directory. 27 # ------------------------------------------- 35 # ------------------------------------------- 38 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) [all …]
|
H A D | analyze-migration.py | 36 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/hashserv/ |
H A D | tests.py | 3 # Copyright (C) 2018-2019 Garmin Ltd. 5 # SPDX-License-Identifier: GPL-2.0-only 32 logging.basicConfig(level=logging.DEBUG, filename='bbhashserv-%d.log' % idx, filemode='w', 35 sys.stdout = open('bbhashserv-stdout-%d.log' % idx, 'w') 44 …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) [all …]
|
H A D | server.py | 3 # SPDX-License-Identifier: GPL-2.0-only 25 DB_ADMIN_PERM = "@db-admin" 26 USER_ADMIN_PERM = "@user-admin" 54 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 [all …]
|
/openbmc/linux/scripts/gdb/linux/ |
H A D | mm.py | 1 # SPDX-License-Identifier: GPL-2.0 6 # Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> 14 return ((n) + (d) - 1) // (d) 24 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 [all …]
|
/openbmc/linux/tools/perf/scripts/python/ |
H A D | exported-sql-viewer.py | 2 # SPDX-License-Identifier: GPL-2.0 3 # exported-sql-viewer.py: view data from sql database 4 # Copyright (c) 2014-2018, Intel Corporation. 7 # export-to-sqlite.py or the export-to-postgresql.py script. Refer to those 11 # call-graph can be displayed for the pt_example database like this: 13 # python tools/perf/scripts/python/exported-sql-viewer.py pt_example 18 # python tools/perf/scripts/python/exported-sql-viewer.py "hostname=myhost username=myuser password… 20 # The result is a GUI window with a tree representing a context-sensitive 21 # call-graph. Expanding a couple of levels of the tree and adjusting column 26 # v- ls [all …]
|
/openbmc/qemu/tests/qemu-iotests/ |
H A D | 118 | 33 return 'ide-cd' 37 return 'scsi-cd' 48 def process_events(self): argument 49 for event in self.vm.get_qmp_events(wait=False): 52 event['data']['id'] == self.device_name)): 53 if event['data']['tray-open'] == False: 54 self.has_closed = True 56 self.has_opened = True 58 def wait_for_open(self): argument 59 if not self.has_real_tray: [all …]
|
H A D | 040 | 39 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 …]
|
H A D | 055 | 4 # Tests for drive-backup and blockdev-backup 31 blockdev_target_img = os.path.join(iotests.test_dir, 'blockdev-target.img') 36 qemu_img('create', '-f', iotests.imgfmt, test_img, str(image_len)) 37 qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x11 0 64k', test_img) 38 qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x00 64k 128k', test_img) 39 qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x22 162k 32k', test_img) 40 qemu_io('-f', iotests.imgfmt, '-c', 'write -P0xd5 1M 32k', test_img) 41 qemu_io('-f', iotests.imgfmt, '-c', 'write -P0xdc 32M 124k', test_img) 42 qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x33 67043328 64k', test_img) 49 def setUp(self): argument [all …]
|
H A D | 041 | 30 target_backing_img = os.path.join(iotests.test_dir, 'target-backing.img') 44 qmp_cmd = 'drive-mirror' 47 def setUp(self): argument 48 iotests.create_image(backing_img, self.image_len) 49 qemu_img('create', '-f', iotests.imgfmt, 50 '-o', 'backing_file=%s' % backing_img, '-F', 'raw', test_img) 51 self.vm = iotests.VM().add_drive(test_img, "node-name=top,backing.node-name=base") 53 self.vm.add_drive(None, 'media=cdrom', 'ide') 54 self.vm.launch() 56 def tearDown(self): argument [all …]
|
H A D | 030 | 35 def setUp(self): argument 37 qemu_img('create', '-f', iotests.imgfmt, 38 '-o', 'backing_file=%s' % backing_img, 39 '-F', 'raw', mid_img) 40 qemu_img('create', '-f', iotests.imgfmt, 41 '-o', 'backing_file=%s' % mid_img, 42 '-F', iotests.imgfmt, test_img) 43 qemu_io('-f', 'raw', '-c', 'write -P 0x1 0 512', backing_img) 44 qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0x1 524288 512', mid_img) 45 self.vm = iotests.VM().add_drive("blkdebug::" + test_img, [all …]
|
/openbmc/openbmc/poky/scripts/pybootchartgui/pybootchartgui/ |
H A D | gui.py | 30 …'position-changed' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_INT, gobject.TYPE_… 31 …'set-scroll-adjustments' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gtk.Adjustment, gtk.Adjus… 47 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) [all …]
|
H A D | samples.py | 18 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/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/ |
H A D | SchedGui.py | 1 # SchedGui.py - Python extension for perf script, basic GUI code for 23 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) [all …]
|
/openbmc/qemu/scripts/qapi/ |
H A D | schema.py | 1 # -*- coding: utf-8 -*- 5 # Copyright (c) 2015-2019 Red Hat Inc. 10 # Marc-André Lureau <marcandre.lureau@redhat.com> 13 # See the COPYING file in the top-level directory. 15 # pylint: disable=too-many-lines 51 self, argument 53 ) -> None: 54 self.ifcond = ifcond 56 def _cgen(self) -> str: argument 57 return cgen_ifcond(self.ifcond) [all …]
|
/openbmc/openbmc/poky/bitbake/lib/prserv/ |
H A D | tests.py | 5 # SPDX-License-Identifier: GPL-2.0-only 23 version = "dummy-1.0-r0" 24 pkgarch = "core2-64" 41 logging.basicConfig(level=logging.DEBUG, filename='prserv-%s.log' % name, filemode='w', 44 sys.stdout = open('prserv-stdout-%s.log' % name, 'w') 49 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 [all …]
|
/openbmc/openbmc/poky/bitbake/lib/bb/tests/ |
H A D | data.py | 7 # SPDX-License-Identifier: GPL-2.0-only 18 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" [all …]
|
H A D | fetch.py | 6 # SPDX-License-Identifier: GPL-2.0-only 33 def __init__(self, seconds): argument 34 self.seconds = seconds 36 def handle_timeout(self, signum, frame): argument 39 def __enter__(self): argument 40 signal.signal(signal.SIGALRM, self.handle_timeout) 41 signal.alarm(self 43 __exit__(self, exc_type, exc_val, exc_tb) global() argument 330 test_uri(self) global() argument 352 test_dict(self) global() argument 413 setUp(self) global() argument 425 tearDown(self) global() argument 433 git(self, cmd, cwd=None) global() argument 442 git_init(self, cwd=None) global() argument 517 test_urireplace(self) global() argument 526 test_urilist1(self) global() argument 532 test_urilist2(self) global() argument 539 test_urilistsvn(self) global() argument 546 test_mirror_of_mirror(self) global() argument 561 test_recursive(self) global() argument 571 setUp(self) global() argument 580 setup_mirror_rewrite(self) global() argument 584 test_that_directory_is_named_after_recipe_url_when_no_mirroring_is_used(self) global() argument 594 test_that_directory_exists_for_mirrored_url_and_recipe_url_when_mirroring_is_used(self) global() argument 605 test_that_recipe_directory_and_mirrored_directory_exists_when_mirroring_is_used_and_the_mirrored_directory_already_exists(self) global() argument 619 setUp(self) global() argument 629 setup_mirror_rewrite(self) global() argument 633 test_that_the_recipe_tarball_is_created_when_no_mirroring_is_used(self) global() argument 642 test_that_the_mirror_tarball_is_created_when_mirroring_is_used(self) global() argument 653 setUp(self) global() argument 664 setup_mirror_rewrite(self) global() argument 668 test_that_the_tarball_is_named_after_recipe_url_when_no_mirroring_is_used(self) global() argument 677 test_that_the_mirror_tarball_is_created_when_mirroring_is_used(self) global() argument 688 setUp(self) global() argument 697 test_that_the_tarball_contents_does_not_leak_info(self) global() argument 721 setUp(self) global() argument 742 fetchUnpack(self, uris) global() argument 753 test_local_checksum_fails_no_file(self) global() argument 758 test_local(self) global() argument 762 test_local_backslash(self) global() argument 766 test_local_wildcard(self) global() argument 770 test_local_dir(self) global() argument 774 test_local_subdir(self) global() argument 778 test_local_subdir_file(self) global() argument 782 test_local_subdirparam(self) global() argument 786 test_local_deepsubdirparam(self) global() argument 790 test_local_absolutedir(self) global() argument 799 test_local_striplevel(self) global() argument 803 test_local_striplevel_gzip(self) global() argument 807 test_local_striplevel_bzip2(self) global() argument 811 dummyGitTest(self, suffix) global() argument 834 test_local_gitfetch_usehead(self) global() argument 837 test_local_gitfetch_usehead_withname(self) global() argument 840 test_local_gitfetch_shared(self) global() argument 845 test_local_gitfetch_noshared(self) global() argument 853 setUp(self) global() argument 858 test_missing(self) global() argument 869 test_valid_missing_donestamp(self) global() argument 884 test_invalid_missing_donestamp(self) global() argument 901 test_nochecksums_missing(self) global() argument 910 test_nochecksums_missing_donestamp(self) global() argument 923 test_nochecksums_has_donestamp(self) global() argument 940 test_nochecksums_missing_has_donestamp(self) global() argument 957 test_fetch(self) global() argument 970 test_fetch_mirror(self) global() argument 977 test_fetch_mirror_of_mirror(self) global() argument 984 test_fetch_file_mirror_of_mirror(self) global() argument 993 test_fetch_premirror(self) global() argument 1000 test_fetch_specify_downloadfilename(self) global() argument 1006 test_fetch_premirror_specify_downloadfilename_regex_uri(self) global() argument 1014 test_fetch_premirror_specify_downloadfilename_specific_uri(self) global() argument 1021 test_fetch_premirror_use_downloadfilename_to_fetch(self) global() argument 1029 gitfetcher(self, url1, url2) global() argument 1030 checkrevision(self, fetcher) global() argument 1050 test_gitfetch(self) global() argument 1055 test_gitfetch_goodsrcrev(self) global() argument 1061 test_gitfetch_badsrcrev(self) global() argument 1067 test_gitfetch_tagandrev(self) global() argument 1073 test_gitfetch_usehead(self) global() argument 1082 test_gitfetch_usehead_withname(self) global() argument 1091 test_gitfetch_finds_local_tarball_for_mirrored_url_when_previous_downloaded_by_the_recipe_url(self) global() argument 1098 test_gitfetch_finds_local_tarball_when_previous_downloaded_from_a_premirror(self) global() argument 1104 test_gitfetch_finds_local_repository_when_premirror_rewrites_the_recipe_url(self) global() argument 1114 test_git_submodule(self) global() argument 1135 test_git_submodule_restricted_network_premirrors(self) global() argument 1154 test_git_submodule_dbus_broker(self) global() argument 1172 test_git_submodule_CLI11(self) global() argument 1186 test_git_submodule_update_CLI11(self) global() argument 1206 test_git_submodule_aktualizr(self) global() argument 1223 test_git_submodule_iotedge(self) global() argument 1251 test_git_submodule_reference_to_parent(self) global() argument 1271 setUp(self) global() argument 1304 tearDown(self) global() argument 1313 test_noexternal_svn(self) global() argument 1327 test_external_svn(self) global() argument 1341 test_trusted_network(self) global() argument 1347 test_wild_trusted_network(self) global() argument 1353 test_prefix_wild_trusted_network(self) global() argument 1359 test_two_prefix_wild_trusted_network(self) global() argument 1365 test_port_trusted_network(self) global() argument 1371 test_untrusted_network(self) global() argument 1377 test_wild_untrusted_network(self) global() argument 1402 test_decodeurl(self) global() argument 1407 test_encodeurl(self) global() argument 1511 test_git_latest_versionstring(self) global() argument 1526 test_wget_latest_versionstring(self) global() argument 1550 test_crate_latest_versionstring(self) global() argument 1574 test_wget_checkstatus(self) global() argument 1584 test_wget_checkstatus_connection_cache(self) global() argument 1602 setUp(self) global() argument 1608 assertRefs(self, expected_refs) global() argument 1613 assertRevCount(self, expected_count, args=None) global() argument 1620 make_shallow(self, args=None) global() argument 1625 add_empty_file(self, path, msg=None) global() argument 1632 test_make_shallow_single_branch_no_merge(self) global() argument 1639 test_make_shallow_single_branch_one_merge(self) global() argument 1653 test_make_shallow_at_merge(self) global() argument 1664 test_make_shallow_annotated_tag(self) global() argument 1672 test_make_shallow_multi_ref(self) global() argument 1689 test_make_shallow_multi_ref_trim(self) global() argument 1701 test_make_shallow_noop(self) global() argument 1708 test_make_shallow_bitbake(self) global() argument 1716 setUp(self) global() argument 1738 assertRefs(self, expected_refs, cwd=None) global() argument 1747 assertRevCount(self, expected_count, args=None, cwd=None) global() argument 1756 add_empty_file(self, path, cwd=None, msg=None) global() argument 1765 fetch(self, uri=None) global() argument 1781 fetch_and_unpack(self, uri=None) global() argument 1787 fetch_shallow(self, uri=None, disabled=False, keepclone=False) global() argument 1811 test_shallow_disabled(self) global() argument 1820 test_shallow_nobranch(self) global() argument 1837 test_shallow_default_depth_1(self) global() argument 1846 test_shallow_depth_0_disables(self) global() argument 1855 test_shallow_depth_default_override(self) global() argument 1865 test_shallow_depth_default_override_disable(self) global() argument 1876 test_current_shallow_out_of_date_clone(self) global() argument 1896 test_shallow_single_branch_no_merge(self) global() argument 1906 test_shallow_no_dangling(self) global() argument 1915 test_shallow_srcrev_branch_truncation(self) global() argument 1932 test_shallow_ref_pruning(self) global() argument 1944 test_shallow_submodules(self) global() argument 1974 test_shallow_submodule_mirrors(self) global() argument 2017 test_shallow_annex(self) global() argument 2033 test_shallow_multi_one_uri(self) global() argument 2060 test_shallow_multi_one_uri_depths(self) global() argument 2087 test_shallow_clone_preferred_over_shallow(self) global() argument 2103 test_shallow_mirrors(self) global() argument 2126 test_shallow_invalid_depth(self) global() argument 2134 test_shallow_invalid_depth_default(self) global() argument 2142 test_shallow_extra_refs(self) global() argument 2155 test_shallow_extra_refs_wildcard(self) global() argument 2169 test_shallow_missing_extra_refs(self) global() argument 2177 test_shallow_missing_extra_refs_wildcard(self) global() argument 2184 test_shallow_remove_revs(self) global() argument 2206 test_shallow_invalid_revs(self) global() argument 2216 test_shallow_fetch_missing_revs(self) global() argument 2228 test_shallow_fetch_missing_revs_fails(self) global() argument 2240 test_bitbake(self) global() argument 2259 test_that_unpack_throws_an_error_when_the_git_clone_nor_shallow_tarball_exist(self) global() argument 2272 test_that_unpack_does_work_when_using_git_shallow_tarball_but_tarball_is_not_available(self) global() argument 2292 setUp(self) global() argument 2311 commit_file(self, filename, content) global() argument 2318 fetch(self, uri=None, download=True) global() argument 2329 get_real_git_lfs_file(self) global() argument 2337 test_fetch_lfs_on_srcrev_change(self) global() argument 2376 test_real_git_lfs_repo_succeeds_without_lfs_param(self) global() argument 2384 test_real_git_lfs_repo_succeeds(self) global() argument 2392 test_real_git_lfs_repo_skips(self) global() argument 2406 test_lfs_enabled(self) global() argument 2418 test_lfs_disabled(self) global() argument 2429 test_lfs_enabled_not_installed(self) global() argument 2451 test_lfs_disabled_not_installed(self) global() argument 2486 test_urls(self) global() argument 2506 test_crate_url(self) global() argument 2530 test_crate_url_matching_recipe(self) global() argument 2555 test_crate_url_params(self) global() argument 2579 test_crate_url_multi(self) global() argument 2611 test_crate_incorrect_cksum(self) global() argument 2631 test_npm(self) global() argument 2645 test_npm_bad_checksum(self) global() argument 2664 test_npm_premirrors(self) global() argument 2694 test_npm_premirrors_with_specified_filename(self) global() argument 2715 test_npm_mirrors(self) global() argument 2741 test_npm_destsuffix_downloadfilename(self) global() argument 2750 test_npm_no_network_no_tarball(self) global() argument 2759 test_npm_no_network_with_tarball(self) global() argument 2774 test_npm_registry_alternate(self) global() argument 2784 test_npm_version_latest(self) global() argument 2794 test_npm_registry_invalid(self) global() argument 2802 test_npm_package_invalid(self) global() argument 2810 test_npm_version_invalid(self) global() argument 2817 test_npm_registry_none(self) global() argument 2824 test_npm_package_none(self) global() argument 2831 test_npm_version_none(self) global() argument 2836 create_shrinkwrap_file(self, data) global() argument 2846 test_npmsw(self) global() argument 2882 test_npmsw_git(self) global() argument 2895 test_npmsw_dev(self) global() argument 2923 test_npmsw_destsuffix(self) global() argument 2938 test_npmsw_no_network_no_tarball(self) global() argument 2955 test_npmsw_no_network_with_tarball(self) global() argument 2977 test_npmsw_npm_reusability(self) global() argument 2999 test_npmsw_bad_checksum(self) global() argument 3039 test_npmsw_premirrors(self) global() argument 3068 test_npmsw_mirrors(self) global() argument 3095 test_npmsw_bundled(self) global() argument 3117 setUp(self) global() argument 3124 test_shared_unpack(self) global() argument 3133 test_noshared_unpack(self) global() argument 3146 setUp(self) global() argument 3160 make_git_repo(self) global() argument 3168 git_new_commit(self) global() argument 3179 git_new_branch(self, name) global() argument 3187 test_mirror_multiple_fetches(self) global() argument 3205 test_mirror_commit_nonexistent(self) global() argument 3212 test_mirror_commit_exists(self) global() argument 3219 test_mirror_tarball_nonexistent(self) global() argument 3225 test_mirror_tarball_multiple_branches(self) global() argument 3247 test_mirror_tarball_multiple_branches_nobranch(self) global() argument 3261 test_mirror_tarball_multiple_branches_norev(self) global() argument 3280 setUp(self) global() argument 3292 make_git_repo(self) global() argument 3301 test_mirror_tarball_updated(self) global() argument 3309 test_mirror_tarball_outdated(self) global() argument 3327 setUp(self) global() argument 3337 fetch_and_create_tarball(self) global() argument 3353 test_premirror_mercurial(self) global() argument 3363 setUp(self) global() argument 3377 test_mirror_broken_download(self) global() argument 3389 test_gomod_url(self) global() argument 3406 test_gomod_url_go_mod_only(self) global() argument 3420 test_gomod_url_sha256sum_varflag(self) global() argument 3438 test_gomod_url_no_go_mod_in_module(self) global() argument 3455 test_gomod_url_host_only(self) global() argument 3474 test_gomodgit_url_repo(self) global() argument 3499 test_gomodgit_url_subdir(self) global() argument 3525 test_gomodgit_url_srcrev_var(self) global() argument 3547 test_gomodgit_url_no_go_mod_in_module(self) global() argument 3569 test_gomodgit_url_host_only(self) global() argument [all...] |
/openbmc/u-boot/tools/dtoc/ |
H A D | test_fdt | 2 # SPDX-License-Identifier: GPL-2.0+ 28 """Low-level function to get the property value based on its offset 65 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') [all …]
|
H A D | test_fdt.py | 2 # SPDX-License-Identifier: GPL-2.0+ 28 """Low-level function to get the property value based on its offset 65 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') [all …]
|
/openbmc/qemu/tests/functional/ |
H A D | test_ppc_74xx.py | 8 # later. See the COPYING file in the top-level directory. 17 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 [all …]
|
/openbmc/qemu/tests/functional/acpi-bits/bits-tests/ |
H A D | smbios.py2 | 4 # SPDX-License-Identifier: BSD-3-Clause 45 if sys.platform == "BITS-EFI": 69 def __init__(self): 70 super(SMBIOS, self).__init__() 71 u = unpack.Unpackable(self._header_memory) 72 self.add_field('header', Header(u)) 73 …self._structure_memory = bits.memory(self.header.structure_table_address, self.header.structure_ta… 74 u = unpack.Unpackable(self._structure_memory) 75 …self.add_field('structures', unpack.unpack_all(u, _smbios_structures, self), unpack.format_each("\… 77 def structure_type(self, num): [all …]
|
/openbmc/linux/tools/crypto/ccp/ |
H A D | test_dbc.py | 2 # SPDX-License-Identifier: GPL-2.0 25 def system_is_secured() -> bool: 34 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: [all …]
|
/openbmc/openbmc/poky/bitbake/lib/ |
H A D | codegen.py | 1 # -*- coding: utf-8 -*- 6 Extension to ast that allow ast -> python code generation. 20 Sub: '-', 49 USub: '-' 87 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 [all …]
|
/openbmc/openbmc/poky/bitbake/lib/layerindexlib/tests/ |
H A D | layerindexobj.py | 1 # Copyright (C) 2017-2018 Wind River Systems, Inc. 3 # SPDX-License-Identifier: GPL-2.0-only 10 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 = {} [all …]
|