Lines Matching +full:max +full:- +full:erase +full:- +full:time +full:- +full:ms

4 # Copyright (c) 2018-2022 Intel Corporation
8 # SPDX-License-Identifier: Apache-2.0
22 import time
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
68 time.sleep(0.5)
124 _d_suite = detected_suite_names[-len(expected_suite_names):]
218 timeout_time = time.time() + self.get_test_timeout()
220 this_timeout = timeout_time - time.time()
227 line_decoded = self.line.decode('utf-8', "replace")
230 stripped_line = stripped_line[:-len(suffix)].rstrip()
242 timeout_time = time.time() + 30
244 timeout_time = time.time() + 2
250 # so let's give it up to 100ms to do so
272 command = ["renode-test",
273 "--variable", "KEYWORDS:" + keywords,
274 "--variable", "ELF:@" + elf,
275 "--variable", "RESC:@" + resc,
276 "--variable", "UART:" + uart]
283 command = [self.generator_cmd, "-C", self.get_default_domain_build_dir(), target]
292 command = ["valgrind", "--error-exitcode=2",
293 "--leak-check=full",
294 "--suppressions=" + ZEPHYR_BASE + "/scripts/valgrind.supp",
295 "--log-file=" + self.build_dir + "/valgrind.log",
296 "--track-origins=yes",
301 command.append(f"--seed={self.seed}")
351 start_time = time.time()
377 handler_time = time.time() - start_time
428 time.sleep(0.1)
444 time.sleep(0.001)
448 # wait for more time
450 time.sleep(0.001)
468 for sl in serial_line.decode('utf-8', 'ignore').splitlines(keepends=True):
469 log_out_fp.write(strip_ansi_sequences(sl).encode('utf-8'))
550 command = ["west", "flash", "--skip-rebuild", "-d", self.build_dir]
554 # 1) bare: --west-flash
556 # 2) with a value: --west-flash="--board-id=42"
557 # This results in options.west_flash == "--board-id=42"
558 # 3) Multiple values: --west-flash="--board-id=42,--erase"
559 # This results in options.west_flash == "--board-id=42 --erase"
564 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}")
598 elif runner == "stm32cubeprogrammer" and product != "BOOT-SERIAL":
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}'")
648 timeout=max(flash_timeout, self.get_test_timeout())
675 time.sleep(1)
761 start_time = time.time()
837 handler_time = time.time() - start_time
875 self.fifo_fn = os.path.join(instance.build_dir, "qemu-fifo")
892 """get process CPU time.
894 The guest virtual time in QEMU icount mode isn't host time and
896 process execution time to mostly simulate the time of guest OS.
940 start_time = time.time()
956 this_timeout = int((timeout_time - time.time()) * 1000)
964 # of not enough CPU time scheduled by host for
968 timeout_time = time.time() + (timeout - cpu_time)
987 c = in_fp.read(1).decode("utf-8")
1023 # take some time.
1027 timeout_time = time.time() + 30
1029 timeout_time = time.time() + 2
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"]
1095 thread_max_time = time.time() + self.get_test_timeout()
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")
1193 """get process CPU time.
1195 The guest virtual time in QEMU icount mode isn't host time and
1197 process execution time to mostly simulate the time of guest OS.
1218 # Oh well, as long as it's dead! User probably sent Ctrl-C
1243 command += ["-C", sysbuild_build_dir, "run"]
1266 time.sleep(1)
1284 start_time = time.time()
1295 this_timeout = int((timeout_time - time.time()) * 1000)
1300 # of not enough CPU time scheduled by host for
1304 timeout_time = time.time() + (timeout - cpu_time)
1331 c = c.decode("utf-8")
1367 # take some time.
1371 timeout_time = time.time() + 30
1373 timeout_time = time.time() + 2
1378 handler_time = time.time() - start_time
1406 thread_max_time = time.time() + self.get_test_timeout()
1411 if (thread_max_time - time.time()) < 0:
1415 time.sleep(0.5)