Lines Matching full:instance
72 def __init__(self, instance, type_str: str, options: argparse.Namespace, argument
85 self.name = instance.name
86 self.instance = instance
87 self.sourcedir = instance.testsuite.source_dir
88 self.build_dir = instance.build_dir
99 return math.ceil(self.instance.testsuite.timeout *
100 self.instance.platform.timeout_multiplier *
113 expected_suite_names = self.instance.testsuite.ztest_suite_names
135 self.instance.status = TwisterStatus.FAIL
136 self.instance.execution_time = handler_time
137 for tc in self.instance.testcases:
139 self.instance.reason = "Testsuite mismatch"
155 if self.instance.status == TwisterStatus.FAIL:
158 self.instance.status = TwisterStatus.FAIL
159 self.instance.execution_time = handler_time
160 self.instance.reason = "RunID mismatch"
161 for tc in self.instance.testcases:
164 self.instance.record(harness.recording)
167 if self.instance.sysbuild:
183 instance, argument
191 @param instance Test Instance
193 super().__init__(instance, type_str, options, generator_cmd, suite_name_check)
264 if isinstance(self.instance.platform, Platform):
266 path = os.path.join(Path(board_dir).parent, self.instance.platform.resc)
270 uart = self.instance.platform.uart
283 elif self.instance.testsuite.type == "unit":
321 self.instance.execution_time = handler_time
323 self.instance.status = TwisterStatus.FAIL
325 self.instance.reason = "Valgrind error"
329 self.instance.reason = f"Failed (rc={self.returncode})"
330 self.instance.add_missing_case_status(TwisterStatus.BLOCK)
332 self.instance.status = harness.status
334 self.instance.reason = f"Failed harness:'{harness.reason}'"
335 self.instance.add_missing_case_status(TwisterStatus.BLOCK)
337 self.instance.status = TwisterStatus.FAIL
338 self.instance.reason = "Timeout"
339 self.instance.add_missing_case_status(TwisterStatus.BLOCK, "Timeout")
358 stderr_log = f"{self.instance.build_dir}/handler_stderr.log"
372 self.instance.status = TwisterStatus.ERROR
373 self.instance.reason = f"BinaryHandler returned {proc.returncode}"
391 instance, argument
399 @param instance Test Instance
401 super().__init__(instance, type_str, options, generator_cmd, suite_name_check)
404 self.pid_fn = os.path.join(instance.build_dir, "renode.pid")
489 def device_is_available(self, instance): argument
490 device = instance.platform.name
491 fixture = instance.testsuite.harness_config.get("fixture")
523 if self.instance.status in [TwisterStatus.ERROR, TwisterStatus.FAIL]:
615 self.instance.execution_time = handler_time
617 self.instance.status = harness.status
619 self.instance.reason = f"Failed harness:'{harness.reason}'"
620 self.instance.add_missing_case_status(TwisterStatus.BLOCK, harness.status)
622 self.instance.status = TwisterStatus.FAIL
623 self.instance.reason = "Timeout"
625 if self.instance.status in [TwisterStatus.ERROR, TwisterStatus.FAIL]:
626 self.instance.add_missing_case_status(TwisterStatus.BLOCK, self.instance.reason)
658 self.instance.status = TwisterStatus.FAIL
659 self.instance.reason = "Serial Device Error"
662 self.instance.add_missing_case_status(TwisterStatus.BLOCK, "Serial Device Error")
672 hardware = self.device_is_available(self.instance)
678 logger.debug(f"Waiting for a DUT to run {self.instance.name}")
679 hardware = self.device_is_available(self.instance)
681 self.instance.status = TwisterStatus.FAIL
682 self.instance.reason = str(error)
683 logger.error(self.instance.reason)
713 self.instance.dut = hardware.id
764 d_log = f"{self.instance.build_dir}/device.log"
776 self.instance.status = TwisterStatus.ERROR
777 self.instance.reason = "Device issue (Flash error?)"
786 self.instance.status = TwisterStatus.ERROR
787 self.instance.reason = "Device issue (Timeout)"
795 self.instance.status = TwisterStatus.ERROR
796 self.instance.reason = "Device issue (Flash error)"
828 f"Timed out while monitoring serial output on {self.instance.platform.name}"
863 instance, argument
871 @param instance Test instance
874 super().__init__(instance, type_str, options, generator_cmd, suite_name_check)
875 self.fifo_fn = os.path.join(instance.build_dir, "qemu-fifo")
877 self.pid_fn = os.path.join(instance.build_dir, "qemu.pid")
879 self.stdout_fn = os.path.join(instance.build_dir, "qemu.stdout")
881 self.stderr_fn = os.path.join(instance.build_dir, "qemu.stderr")
883 if instance.testsuite.ignore_qemu_crash:
911 handler.instance.execution_time = handler_time
912 handler.instance.status = status
914 handler.instance.reason = reason
916 handler.instance.reason = "Unknown"
1051 self.fifo_fn = os.path.join(self.instance.build_dir, "qemu-fifo")
1069 self.instance.status = TwisterStatus.FAIL
1071 self.instance.reason = "Timeout"
1073 if not self.instance.reason:
1074 self.instance.reason = f"Exited with {self.returncode}"
1075 self.instance.add_missing_case_status(TwisterStatus.BLOCK)
1165 instance, argument
1173 @param instance Test instance
1176 super().__init__(instance, type_str, options, generator_cmd, suite_name_check)
1177 self.pid_fn = os.path.join(instance.build_dir, "qemu.pid")
1178 self.fifo_fn = os.path.join(instance.build_dir, "qemu-fifo")
1184 if instance.testsuite.ignore_qemu_crash:
1225 handler.instance.execution_time = handler_time
1226 handler.instance.status = status
1228 handler.instance.reason = reason
1230 handler.instance.reason = "Unknown"
1250 self.instance.status = TwisterStatus.FAIL
1252 self.instance.reason = "Timeout"
1254 if not self.instance.reason:
1255 self.instance.reason = f"Exited with {self.returncode}"
1256 self.instance.add_missing_case_status(TwisterStatus.BLOCK)