| 49 | |
| 50 | |
| 51 | def run_bloat(skip_build: bool) -> None: |
| 52 | cmd: list[str] = ["bash", "bloat", "esp32s3"] |
| 53 | if not skip_build: |
| 54 | cmd.append("--build") |
| 55 | cmd += ["--no-summary"] |
| 56 | print(f"esp32s3-bloat-regression: invoking `{' '.join(cmd)}` ...", flush=True) |
| 57 | result = subprocess.run(cmd, cwd=PROJECT_ROOT) |
| 58 | if result.returncode != 0: |
| 59 | print( |
| 60 | f"esp32s3-bloat-regression: `bash bloat esp32s3` exited " |
| 61 | f"{result.returncode} — cannot enforce regression gate.", |
| 62 | file=sys.stderr, |
| 63 | ) |
| 64 | sys.exit(2) |
| 65 | |
| 66 | |
| 67 | def main() -> int: |