(
original_dname,
testdir,
model_name,
edit_format,
tries,
no_unit_tests,
no_aider,
verbose,
commit_hash,
replay,
editor_model,
editor_edit_format,
num_ctx=None,
sleep=0,
reasoning_effort: Optional[str] = None,
thinking_tokens: Optional[int] = None,
read_model_settings=None,
)
| 677 | |
| 678 | |
| 679 | def run_test_real( |
| 680 | original_dname, |
| 681 | testdir, |
| 682 | model_name, |
| 683 | edit_format, |
| 684 | tries, |
| 685 | no_unit_tests, |
| 686 | no_aider, |
| 687 | verbose, |
| 688 | commit_hash, |
| 689 | replay, |
| 690 | editor_model, |
| 691 | editor_edit_format, |
| 692 | num_ctx=None, |
| 693 | sleep=0, |
| 694 | reasoning_effort: Optional[str] = None, |
| 695 | thinking_tokens: Optional[int] = None, |
| 696 | read_model_settings=None, |
| 697 | ): |
| 698 | if not os.path.isdir(testdir): |
| 699 | print("Not a dir:", testdir) |
| 700 | return |
| 701 | |
| 702 | testdir = Path(testdir) |
| 703 | |
| 704 | history_fname = testdir / ".aider.chat.history.md" |
| 705 | |
| 706 | results_fname = testdir / ".aider.results.json" |
| 707 | if results_fname.exists(): |
| 708 | try: |
| 709 | res = json.loads(results_fname.read_text()) |
| 710 | # if res.get("test_timeouts", 0) > 0: |
| 711 | # print(f"{results_fname} test timeouts, redoing...") |
| 712 | # else: |
| 713 | return res |
| 714 | except JSONDecodeError: |
| 715 | print(f"{results_fname} failed to parse, redoing...") |
| 716 | |
| 717 | # Read solution and test files from config |
| 718 | fnames = [] |
| 719 | config_file = testdir / ".meta/config.json" |
| 720 | if not config_file.exists(): |
| 721 | raise ValueError(f"No config file found: {config_file}") |
| 722 | |
| 723 | with open(config_file) as f: |
| 724 | config = json.loads(f.read()) |
| 725 | |
| 726 | # Get file sets from config |
| 727 | test_files = config.get("files", {}).get("test", []) |
| 728 | example_files = config.get("files", {}).get("example", []) |
| 729 | solution_files = set(config.get("files", {}).get("solution", [])) |
| 730 | |
| 731 | # Forcibly ignore certain files not covered by test_files and example_files |
| 732 | ignore_files = set( |
| 733 | [ |
| 734 | "CMakeLists.txt", |
| 735 | "Cargo.toml", |
| 736 | ] |
no test coverage detected