Create an examples test process using Meson build system
(
args: TestArgs, enable_stack_trace: bool
)
| 583 | |
| 584 | |
| 585 | def create_examples_test_process( |
| 586 | args: TestArgs, enable_stack_trace: bool |
| 587 | ) -> RunningProcess: |
| 588 | """Create an examples test process using Meson build system""" |
| 589 | # Use Meson-based example compilation instead of Python compiler |
| 590 | cmd = ["uv", "run", "python", "-u", "ci/util/meson_example_runner.py"] |
| 591 | |
| 592 | # Add example names if specified |
| 593 | if args.examples is not None: |
| 594 | cmd.extend(args.examples) |
| 595 | |
| 596 | # Map command-line arguments to meson_example_runner.py |
| 597 | if args.clean: |
| 598 | cmd.append("--clean") |
| 599 | if args.no_pch: |
| 600 | cmd.append("--no-pch") # Ignored by Meson (PCH always enabled) |
| 601 | if args.no_parallel: |
| 602 | cmd.append("--no-parallel") |
| 603 | if args.verbose: |
| 604 | cmd.append("--verbose") |
| 605 | if args.debug: |
| 606 | cmd.append("--debug") |
| 607 | if args.build_mode: |
| 608 | cmd.extend(["--build-mode", args.build_mode]) |
| 609 | |
| 610 | # Auto-enable full mode for examples to include execution |
| 611 | if args.full or args.examples is not None: |
| 612 | cmd.append("--full") |
| 613 | if args.log_failures is not None: |
| 614 | cmd.extend(["--log-failures", str(args.log_failures)]) |
| 615 | |
| 616 | # Use longer timeout for no-parallel mode since sequential compilation takes much longer |
| 617 | timeout = ( |
| 618 | 1800 if args.no_parallel else 600 |
| 619 | ) # 30 minutes for sequential, 10 minutes for parallel |
| 620 | |
| 621 | return RunningProcess( |
| 622 | cmd, auto_run=False, timeout=timeout, output_formatter=TimestampFormatter() |
| 623 | ) |
| 624 | |
| 625 | |
| 626 | def create_python_test_process( |
no test coverage detected