Home
last modified time | relevance | path

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

12345678910

/Zephyr-Core-3.4.0/scripts/west_commands/zspdx/
Dcmakefileapi.py9 def __init__(self): argument
10 super(Codemodel, self).__init__()
12 self.paths_source = ""
13 self.paths_build = ""
14 self.configurations = []
16 def __repr__(self): argument
17 return f"Codemodel: source {self.paths_source}, build {self.paths_build}"
22 def __init__(self): argument
23 super(Config, self).__init__()
25 self.name = ""
[all …]
/Zephyr-Core-3.4.0/scripts/pylib/pytest-twister-harness/src/twister_harness/device/
Dfifo_handler.py19 def __init__(self, fifo: str | Path): argument
23 self._fifo_in = str(fifo) + '.in'
24 self._fifo_out = str(fifo) + '.out'
25 self.file_in: io.BytesIO | None = None
26 self.file_out: io.BytesIO | None = None
27 self._threads: list[threading.Thread] = []
37 def is_open(self) -> bool: argument
40 self.file_in is not None and self.file_out is not None
41 and self.file_in.fileno() and self.file_out.fileno()
46 def connect(self): argument
[all …]
Dhardware_adapter.py30 def __init__(self, device_config: DeviceConfig, **kwargs) -> None: argument
32 self.connection: serial.Serial | None = None
33 self.command: list[str] = []
34 self.process_kwargs: dict = {
37 'env': self.env,
39 self.serial_pty_proc: subprocess.Popen | None = None
41 def connect(self, timeout: float = 1) -> None: argument
47 if self.connection:
51 if self.device_config.pre_script:
52 self.run_custom_script(self.device_config.pre_script, 30)
[all …]
Dsimulator_adapter.py38 def wrapper(self, *args, **kwargs): argument
40 return func(self, *args, **kwargs)
55 def __init__(self, device_config: DeviceConfig, **kwargs) -> None: argument
60 self._process: asyncio.subprocess.Process | None = None
61 self._process_ended_with_timeout: bool = False
62 self.queue: Queue = Queue()
63 self._stop_job: bool = False
64self._exc: Exception | None = None #: store any exception which appeared running this thread
65 self._thread: threading.Thread | None = None
66 self.command: list[str] = []
[all …]
Dqemu_adapter.py35 def __init__(self, device_config: DeviceConfig, **kwargs) -> None: argument
37 self._process: subprocess.Popen | None = None
38 self._process_ended_with_timeout: bool = False
39self._exc: Exception | None = None #: store any exception which appeared running this thread
40 self._thread: threading.Thread | None = None
41 self._emulation_was_finished: bool = False
42self.connection = FifoHandler(Path(self.device_config.build_dir).joinpath(QEMU_FIFO_FILE_NAME))
43 self.command: list[str] = []
44 self.timeout: float = 60 # running timeout in seconds
45 self.booting_timeout_in_ms: int = 10_000 #: wait time for booting Qemu in milliseconds
[all …]
/Zephyr-Core-3.4.0/scripts/pylib/twister/twisterlib/
Dharness.py45 def __init__(self): argument
46 self.state = None
47 self.type = None
48 self.regex = []
49 self.matches = OrderedDict()
50 self.ordered = True
51 self.repeat = 1
52 self.testcases = []
53 self.id = None
54 self.fail_on_fault = True
[all …]
Drunner.py51 def __init__(self, total=0): argument
63 self._done = Value('i', 0)
66 self._iteration = Value('i', 0)
70 self._passed = Value('i', 0)
74 self._skipped_configs = Value('i', 0)
78 self._skipped_runtime = Value('i', 0)
82 self._skipped_filter = Value('i', 0)
85 self._skipped_cases = Value('i', 0)
88 self._error = Value('i', 0)
89 self._failed = Value('i', 0)
[all …]
Dplatform.py20 def __init__(self): argument
25 self.name = ""
26 self.twister = True
28 self.ram = 128
30 self.timeout_multiplier = 1.0
31 self.ignore_tags = []
32 self.only_tags = []
33 self.default = False
35 self.flash = 512
36 self.supported = set()
[all …]
Dtestinstance.py34 def __init__(self, testsuite, platform, outdir): argument
36 self.testsuite = testsuite
37 self.platform = platform
39 self.status = None
40 self.reason = "Unknown"
41 self.metrics = dict()
42 self.handler = None
43 self.outdir = outdir
44 self.execution_time = 0
45 self.retries = 0
[all …]
Dhardwaremap.py37 def __init__(self, argument
53 self.serial = serial
54 self.baud = serial_baud or 115200
55 self.platform = platform
56 self.serial_pty = serial_pty
57 self._counter = Value("i", 0)
58 self._available = Value("i", 1)
59 self.connected = connected
60 self.pre_script = pre_script
61 self.id = id
[all …]
/Zephyr-Core-3.4.0/scripts/west_commands/runners/
Dpyocd.py19 def __init__(self, cfg, target, argument
30 self.pyocd_config = default
32 self.pyocd_config = None
35 self.target_args = ['-t', target]
36 self.pyocd = pyocd
37 self.flash_addr_args = ['-a', hex(flash_addr)] if flash_addr else []
38 self.erase = erase
39 self.gdb_cmd = [cfg.gdb] if cfg.gdb is not None else None
40 self.gdb_port = gdb_port
41 self.telnet_port = telnet_port
[all …]
Dopenocd.py29 def __init__(self, cfg, pre_init=None, reset_halt_cmd=DEFAULT_OPENOCD_RESET_HALT_CMD, argument
47 self.openocd_config = config
54 if self.openocd_config is not None:
55 for i in self.openocd_config:
63 self.openocd_cmd = [cfg.openocd or 'openocd'] + search_args
66 self.elf_name = Path(cfg.elf_file).as_posix()
67 self.pre_init = pre_init or []
68 self.reset_halt_cmd = reset_halt_cmd
69 self.pre_load = pre_load or []
70 self.load_cmd = load_cmd
[all …]
Dezflashcli.py13 def __init__(self, cfg, tool, sn, erase=False): argument
15 self.bin_ = cfg.bin_file
17 self.tool = tool
18 self.sn_arg = ['-j', f'{sn}'] if sn is not None else []
19 self.erase = bool(erase)
42 def needs_product_header(self): argument
47 is_mcuboot = self.build_conf.getboolean('CONFIG_MCUBOOT')
48 uses_code_partition = self.build_conf.getboolean('CONFIG_USE_DT_CODE_PARTITION')
52 def program_bin(self): argument
54 if self.erase:
[all …]
Dcanopen_program.py52 def __call__(self, parser, namespace, values, option_string=None): argument
53 setattr(namespace, self.dest, not option_string.startswith('--no-'))
57 def __init__(self, cfg, dev_id, can_context=DEFAULT_CAN_CONTEXT, argument
68 self.dev_id = dev_id # Only use for error checking in do_run()
69 self.bin_file = cfg.bin_file
70 self.confirm = confirm
71 self.confirm_only = confirm_only
72 self.timeout = timeout
73 self.downloader = CANopenProgramDownloader(logger=self.logger,
133 def do_run(self, command, **kwargs): argument
[all …]
Djlink.py30 def __call__(self, parser, args, ignored, option): argument
31 setattr(args, self.dest, not option.startswith('--no-'))
36 def __init__(self, cfg, device, dev_id=None, argument
46 self.file = cfg.file
47 self.file_type = cfg.file_type
48 self.hex_name = cfg.hex_file
49 self.bin_name = cfg.bin_file
50 self.elf_name = cfg.elf_file
51 self.gdb_cmd = [cfg.gdb] if cfg.gdb else None
52 self.device = device
[all …]
Dintel_adsp.py26 def __init__(self, argument
39 self.remote_host = remote_host
40 self.rimage_tool = rimage_tool
41 self.config_dir = config_dir
42 self.bin_fw = os.path.join(cfg.build_dir, 'zephyr', 'zephyr.ri')
44 self.cavstool = os.path.join(ZEPHYR_BASE, DEFAULT_CAVSTOOL)
45 self.platform = os.path.basename(cfg.board_dir)
46 self.pty = pty
49 self.key = key
51 self.key = os.path.join(DEFAULT_KEY_DIR, default_key)
[all …]
Dsilabs_commander.py21 def __init__(self, cfg, device, dev_id, commander, dt_flash, erase, speed, tool_opt): argument
23 self.file = cfg.file
24 self.file_type = cfg.file_type
25 self.hex_name = cfg.hex_file
26 self.bin_name = cfg.bin_file
27 self.elf_name = cfg.elf_file
28 self.device = device
29 self.dev_id = dev_id
30 self.commander = commander
31 self.dt_flash = dt_flash
[all …]
Dnrf_common.py30 def __init__(self, cfg, family, softreset, dev_id, erase=False, argument
33 self.hex_ = cfg.hex_file
36 self.family = family
37 self.softreset = softreset
38 self.dev_id = dev_id
39 self.erase = bool(erase)
40 self.force = force
41 self.recover = bool(recover)
43 self.tool_opt = []
45 self.tool_opt += opts
[all …]
Dintel_cyclonev.py29 def __init__(self, cfg, pre_init=None, reset_halt_cmd=DEFAULT_OPENOCD_RESET_HALT_CMD, argument
52 self.openocd_config = config
53 self.gdb_cmds = gdb_commands
54 self.gdb_cmds2 = gdb_commands2
55 self.gdb_cmds_deb = gdb_commands_deb
62 if self.openocd_config is not None:
63 for i in self.openocd_config:
71 self.openocd_cmd = [cfg.openocd or 'openocd'] + search_args
74 self.elf_name = Path(cfg.elf_file).as_posix()
75 self.pre_init = pre_init or []
[all …]
/Zephyr-Core-3.4.0/samples/modules/tflite-micro/magic_wand/train/
Ddata_load_test.py32 def setUp(self): # pylint: disable=g-missing-super-call argument
33 self.loader = DataLoader(
36 def test_get_data(self): argument
37 self.assertIsInstance(self.loader.train_data, list)
38 self.assertIsInstance(self.loader.train_label, list)
39 self.assertIsInstance(self.loader.valid_data, list)
40 self.assertIsInstance(self.loader.valid_label, list)
41 self.assertIsInstance(self.loader.test_data, list)
42 self.assertIsInstance(self.loader.test_label, list)
43 self.assertEqual(self.loader.train_len, len(self.loader.train_data))
[all …]
Ddata_split_test.py31 def setUp(self): # pylint: disable=g-missing-super-call argument
32 self.data = read_data("./data/complete_data")
33 self.num_dic = {"wing": 0, "ring": 0, "slope": 0, "negative": 0}
36 self.num = len(lines)
38 def test_read_data(self): argument
39 self.assertEqual(len(self.data), self.num)
40 self.assertIsInstance(self.data, list)
41 self.assertIsInstance(self.data[0], dict)
42 self.assertEqual(
43 set(list(self.data[-1])), set(["gesture", "accel_ms2_xyz", "name"]))
[all …]
/Zephyr-Core-3.4.0/scripts/dts/python-devicetree/src/devicetree/
Dgrutils.py21 def __init__(self, root=None): argument
22 self.__roots = None
24 self.__roots = {root}
25 self.__edge_map = collections.defaultdict(set)
26 self.__reverse_map = collections.defaultdict(set)
27 self.__nodes = set()
29 def add_edge(self, source, target): argument
35 self.__edge_map[source].add(target)
37 self.__reverse_map[target].add(source)
38 self.__nodes.add(source)
[all …]
/Zephyr-Core-3.4.0/scripts/build/
Delf_parser.py22 def __init__(self, elf, sym): argument
23 self.elf = elf
24 self.sym = sym
25 self.data = self.elf.symbol_data(sym)
27 def _data_native_read(self, offset): argument
28 (format, size) = self.elf.native_struct_format
29 return struct.unpack(format, self.data[offset:offset + size])[0]
40 def __init__(self, elf, sym): argument
42 self.flags = self._data_native_read(self.elf.ld_consts['_PM_DEVICE_STRUCT_FLAGS_OFFSET'])
45 def is_power_domain(self): argument
[all …]
/Zephyr-Core-3.4.0/scripts/pylib/pytest-twister-harness/tests/device/data/
Dfifo_mock.py38 def __init__(self, filename, mode): argument
39 self.filename = filename
40 self.mode = mode
41 self.thread = None
42 self.file = None
43 self.logger = logging.getLogger(__name__)
45 def _open(self): argument
46 self.logger.info(f'Creating fifo file: {self.filename}')
48 while not os.path.exists(self.filename):
51 self.logger.error(f'Did not able create fifo file: {self.filename}')
[all …]
/Zephyr-Core-3.4.0/scripts/coredump/gdbstubs/arch/
Darm_cortex_m.py45 def __init__(self, logfile, elffile): argument
47 self.registers = None
48 self.gdb_signal = self.GDB_SIGNAL_DEFAULT
50 self.parse_arch_data_block()
52 def parse_arch_data_block(self): argument
53 arch_data_blk = self.logfile.get_arch_data()['data']
54 arch_data_ver = self.logfile.get_arch_data()['hdr_ver']
57 tu = struct.unpack(self.ARCH_DATA_BLK_STRUCT, arch_data_blk)
59 tu = struct.unpack(self.ARCH_DATA_BLK_STRUCT_V2, arch_data_blk)
61 self.registers = dict()
[all …]

12345678910