MCPcopy Create free account
hub / github.com/FastLED/FastLED / create_unit_test_process

Function create_unit_test_process

ci/util/test_runner.py:531–582  ·  view source on GitHub ↗

Create a unit test process without starting it

(
    args: TestArgs, enable_stack_trace: bool
)

Source from the content-addressed store, hash-verified

529
530
531def create_unit_test_process(
532 args: TestArgs, enable_stack_trace: bool
533) -> RunningProcess:
534 """Create a unit test process without starting it"""
535 # First compile the tests
536 compile_cmd: list[str] = [
537 "uv",
538 "run",
539 "python",
540 "-m",
541 "ci.compiler.cpp_test_run",
542 "--compile-only",
543 ]
544 if args.test:
545 compile_cmd.extend(["--test", args.test])
546 if args.clean:
547 compile_cmd.append("--clean")
548 if args.verbose:
549 compile_cmd.append("--verbose")
550 if args.show_compile:
551 compile_cmd.append("--show-compile")
552 if args.show_link:
553 compile_cmd.append("--show-link")
554 if args.check:
555 compile_cmd.append("--check")
556
557 if args.clang:
558 compile_cmd.append("--clang")
559 if args.gcc:
560 compile_cmd.append("--gcc")
561 if args.no_pch:
562 compile_cmd.append("--no-pch")
563 if args.debug:
564 compile_cmd.append("--debug")
565
566 # subprocess.run(compile_cmd, check=True)
567
568 # Then run the tests using our new test runner
569 test_cmd = ["uv", "run", "python", "-m", "ci.run_tests"]
570 if args.test:
571 test_cmd.extend(["--test", str(args.test)])
572 if args.verbose:
573 test_cmd.append("--verbose")
574 if enable_stack_trace:
575 test_cmd.append("--stack-trace")
576
577 return RunningProcess(
578 test_cmd,
579 timeout=_TIMEOUT, # 2 minutes timeout
580 auto_run=True,
581 output_formatter=TimestampFormatter(),
582 )
583
584
585def create_examples_test_process(

Callers 2

get_cpp_test_processesFunction · 0.85
get_all_test_processesFunction · 0.85

Calls 2

TimestampFormatterClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected