Install QEMU Docker image. Returns: Exit code (0 for success, 1 for failure)
()
| 11 | |
| 12 | |
| 13 | def main() -> int: |
| 14 | """Install QEMU Docker image. |
| 15 | |
| 16 | Returns: |
| 17 | Exit code (0 for success, 1 for failure) |
| 18 | """ |
| 19 | print("FastLED QEMU Installation") |
| 20 | print("=" * 50) |
| 21 | print() |
| 22 | |
| 23 | integration = QEMUTestIntegration() |
| 24 | |
| 25 | if not integration.docker_available: |
| 26 | print("ERROR: Docker is not available!", file=sys.stderr) |
| 27 | print("Please install Docker first:", file=sys.stderr) |
| 28 | print(" - Windows/Mac: https://www.docker.com/products/docker-desktop") |
| 29 | print(" - Linux: https://docs.docker.com/engine/install/") |
| 30 | return 1 |
| 31 | |
| 32 | print("Docker is available, pulling QEMU image...") |
| 33 | success = integration.install_qemu() |
| 34 | |
| 35 | if success: |
| 36 | print() |
| 37 | print("✓ QEMU installation successful!") |
| 38 | print() |
| 39 | print("You can now run QEMU tests with:") |
| 40 | print(" uv run test.py --qemu esp32s3") |
| 41 | return 0 |
| 42 | else: |
| 43 | print() |
| 44 | print("✗ QEMU installation failed") |
| 45 | return 1 |
| 46 | |
| 47 | |
| 48 | if __name__ == "__main__": |
no test coverage detected