CLI entry point for Meson build system runner.
()
| 306 | |
| 307 | |
| 308 | def main() -> None: |
| 309 | """CLI entry point for Meson build system runner.""" |
| 310 | parser = argparse.ArgumentParser( |
| 311 | description="Meson build system runner for FastLED" |
| 312 | ) |
| 313 | parser.add_argument("--test", help="Specific test to build and run") |
| 314 | parser.add_argument("--clean", action="store_true", help="Clean build directory") |
| 315 | parser.add_argument("--verbose", "-v", action="store_true", help="Verbose output") |
| 316 | parser.add_argument( |
| 317 | "--debug", action="store_true", help="Enable debug mode with full symbols" |
| 318 | ) |
| 319 | parser.add_argument( |
| 320 | "--build-mode", |
| 321 | choices=["quick", "debug", "release", "profile"], |
| 322 | help="Build mode (quick, debug, release, profile)", |
| 323 | ) |
| 324 | parser.add_argument( |
| 325 | "--check", action="store_true", help="Enable IWYU static analysis" |
| 326 | ) |
| 327 | parser.add_argument("--build-dir", default=".build/meson", help="Build directory") |
| 328 | |
| 329 | args = parser.parse_args() |
| 330 | |
| 331 | source_dir = Path.cwd() |
| 332 | build_dir = Path(args.build_dir) |
| 333 | |
| 334 | result = run_meson_build_and_test( |
| 335 | source_dir=source_dir, |
| 336 | build_dir=build_dir, |
| 337 | test_name=args.test, |
| 338 | clean=args.clean, |
| 339 | verbose=args.verbose, |
| 340 | debug=args.debug, |
| 341 | build_mode=args.build_mode, |
| 342 | check=args.check, |
| 343 | ) |
| 344 | |
| 345 | sys.exit(0 if result.success else 1) |
| 346 | |
| 347 | |
| 348 | if __name__ == "__main__": |
no test coverage detected