Lines Matching +full:map +full:- +full:queue +full:- +full:tc

4 # Copyright (c) 2018-2022 Intel Corporation
8 # SPDX-License-Identifier: Apache-2.0
25 from queue import Empty, Queue
39 print("Install pyserial python module with pip to use --device-testing option.")
45 pass # "--device-serial-pty" option is not supported on Windows OS
123 _d_suite = detected_suite_names[-len(expected_suite_names):]
137 for tc in self.instance.testcases:
138 tc.status = TwisterStatus.FAIL
161 for tc in self.instance.testcases:
162 tc.status = TwisterStatus.FAIL
219 this_timeout = timeout_time - time.time()
226 line_decoded = self.line.decode('utf-8', "replace")
229 stripped_line = stripped_line[:-len(suffix)].rstrip()
271 command = ["renode-test",
272 "--variable", "KEYWORDS:" + keywords,
273 "--variable", "ELF:@" + elf,
274 "--variable", "RESC:@" + resc,
275 "--variable", "UART:" + uart]
282 command = [self.generator_cmd, "-C", self.get_default_domain_build_dir(), target]
291 command = ["valgrind", "--error-exitcode=2",
292 "--leak-check=full",
293 "--suppressions=" + ZEPHYR_BASE + "/scripts/valgrind.supp",
294 "--log-file=" + self.build_dir + "/valgrind.log",
295 "--track-origins=yes",
300 command.append(f"--seed={self.seed}")
376 handler_time = time.time() - start_time
467 for sl in serial_line.decode('utf-8', 'ignore').splitlines(keepends=True):
468 log_out_fp.write(strip_ansi_sequences(sl).encode('utf-8'))
495 if fixture and fixture not in map(lambda f: f.split(sep=':')[0], d.fixtures):
549 command = ["west", "flash", "--skip-rebuild", "-d", self.build_dir]
553 # 1) bare: --west-flash
555 # 2) with a value: --west-flash="--board-id=42"
556 # This results in options.west_flash == "--board-id=42"
557 # 3) Multiple values: --west-flash="--board-id=42,--erase"
558 # This results in options.west_flash == "--board-id=42 --erase"
563 command.append("--runner")
571 command_extra_args.append("--dev-id")
574 command_extra_args.append("--esp-device")
580 and product == "STLINK-V3"
582 command_extra_args.append("--cmd-pre-init")
584 elif runner == "openocd" and product == "EDBG CMSIS-DAP":
585 command_extra_args.append("--cmd-pre-init")
587 elif runner == "openocd" and product == "LPC-LINK2 CMSIS-DAP":
588 command_extra_args.append("--cmd-pre-init")
591 command.append("--dev-id")
595 # --probe=#<number> select by probe index
596 # --probe=<serial number> select by probe serial number
597 command.append(f"--probe={board_id}")
599 command.append(f"--tool-opt=sn={board_id}")
607 command.append('--')
610 command = [self.generator_cmd, "-C", self.build_dir, "flash"]
629 logger.debug(f"Terminating serial-pty:'{ser_pty}'")
633 logger.debug(f"Terminated serial-pty:'{ser_pty}', stdout:'{stdout}', stderr:'{stderr}'")
635 logger.debug(f"Terminated serial-pty:'{ser_pty}'")
837 handler_time = time.time() - start_time
875 self.fifo_fn = os.path.join(instance.build_dir, "qemu-fifo")
956 this_timeout = int((timeout_time - time.time()) * 1000)
968 timeout_time = time.time() + (timeout - cpu_time)
987 c = in_fp.read(1).decode("utf-8")
1032 handler_time = time.time() - start_time
1040 # Oh well, as long as it's dead! User probably sent Ctrl-C
1051 self.fifo_fn = os.path.join(self.instance.build_dir, "qemu-fifo")
1062 command += ["-C", sysbuild_build_dir, "run"]
1117 # in that case kill -9 QEMU process directly and leave
1135 self.thread.join(max(thread_max_time - time.time(), 0))
1178 self.fifo_fn = os.path.join(instance.build_dir, "qemu-fifo")
1218 # Oh well, as long as it's dead! User probably sent Ctrl-C
1243 command += ["-C", sysbuild_build_dir, "run"]
1258 def _enqueue_char(self, queue): argument
1273 queue.put(c)
1277 queue, argument
1295 this_timeout = int((timeout_time - time.time()) * 1000)
1304 timeout_time = time.time() + (timeout - cpu_time)
1327 c = queue.get_nowait()
1331 c = c.decode("utf-8")
1378 handler_time = time.time() - start_time
1396 queue = Queue()
1402 self.thread = threading.Thread(target=self._enqueue_char, args=(queue,))
1408 self._monitor_output(queue, self.get_test_timeout(), self.log_fn, self.pid_fn, harness,
1411 if (thread_max_time - time.time()) < 0: