()
| 149 | |
| 150 | |
| 151 | def main() -> int: |
| 152 | interceptor = CrashPatternInterceptor(sys.stdout) |
| 153 | sys.stdout = interceptor # type: ignore[assignment] |
| 154 | try: |
| 155 | rc = asyncio.run(run()) |
| 156 | if rc == 0 and interceptor.crash_detected: |
| 157 | print() |
| 158 | print( |
| 159 | f"{Fore.RED}\U0001f6a8 CRASH DETECTED in device output:{Style.RESET_ALL}" |
| 160 | ) |
| 161 | for line in interceptor.crash_lines: |
| 162 | print(f" {line}") |
| 163 | return 1 |
| 164 | return rc |
| 165 | finally: |
| 166 | sys.stdout = interceptor._inner |
no test coverage detected