mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 18:54:59 +00:00
call build_docker
This commit is contained in:
parent
898d98fdb3
commit
5e2681ec9d
1 changed files with 9 additions and 14 deletions
|
@ -97,6 +97,9 @@ def main(
|
||||||
if num_tests > 0:
|
if num_tests > 0:
|
||||||
test_dnames = test_dnames[:num_tests]
|
test_dnames = test_dnames[:num_tests]
|
||||||
|
|
||||||
|
if not stats_only:
|
||||||
|
build_docker()
|
||||||
|
|
||||||
if threads == 1:
|
if threads == 1:
|
||||||
all_results = []
|
all_results = []
|
||||||
for testname in test_dnames:
|
for testname in test_dnames:
|
||||||
|
@ -107,13 +110,11 @@ def main(
|
||||||
retries,
|
retries,
|
||||||
no_unit_tests,
|
no_unit_tests,
|
||||||
verbose,
|
verbose,
|
||||||
stats_only,
|
|
||||||
commit_hash,
|
commit_hash,
|
||||||
)
|
)
|
||||||
|
|
||||||
all_results.append(results)
|
all_results.append(results)
|
||||||
if not stats_only:
|
summarize_results(dirname)
|
||||||
summarize_results(dirname)
|
|
||||||
else:
|
else:
|
||||||
run_test_threaded = lox.thread(threads)(run_test)
|
run_test_threaded = lox.thread(threads)(run_test)
|
||||||
for testname in test_dnames:
|
for testname in test_dnames:
|
||||||
|
@ -124,7 +125,6 @@ def main(
|
||||||
retries,
|
retries,
|
||||||
no_unit_tests,
|
no_unit_tests,
|
||||||
verbose,
|
verbose,
|
||||||
stats_only,
|
|
||||||
commit_hash,
|
commit_hash,
|
||||||
)
|
)
|
||||||
all_results = run_test_threaded.gather(tqdm=True)
|
all_results = run_test_threaded.gather(tqdm=True)
|
||||||
|
@ -219,12 +219,7 @@ def summarize_results(dirname):
|
||||||
console.rule()
|
console.rule()
|
||||||
|
|
||||||
|
|
||||||
def run_test(
|
def run_test(testdir, model_name, edit_format, retries, no_unit_tests, verbose, commit_hash):
|
||||||
testdir, model_name, edit_format, retries, no_unit_tests, verbose, stats_only, commit_hash
|
|
||||||
):
|
|
||||||
if not stats_only:
|
|
||||||
dump(testdir)
|
|
||||||
|
|
||||||
if not os.path.isdir(testdir):
|
if not os.path.isdir(testdir):
|
||||||
print("Not a dir:", testdir)
|
print("Not a dir:", testdir)
|
||||||
return
|
return
|
||||||
|
@ -242,9 +237,6 @@ def run_test(
|
||||||
print(f"{results_fname} failed to parse, skipping")
|
print(f"{results_fname} failed to parse, skipping")
|
||||||
return
|
return
|
||||||
|
|
||||||
if stats_only:
|
|
||||||
return
|
|
||||||
|
|
||||||
fnames = []
|
fnames = []
|
||||||
for fname in testdir.glob("*"):
|
for fname in testdir.glob("*"):
|
||||||
if "test" not in fname.name and fname.is_file() and fname.name[0] != ".":
|
if "test" not in fname.name and fname.is_file() and fname.name[0] != ".":
|
||||||
|
@ -397,9 +389,12 @@ def build_docker():
|
||||||
command = [
|
command = [
|
||||||
"docker",
|
"docker",
|
||||||
"build",
|
"build",
|
||||||
|
"--quiet",
|
||||||
"-t",
|
"-t",
|
||||||
"benchmark",
|
"benchmark",
|
||||||
"benchmark/",
|
"-f",
|
||||||
|
"benchmark/Dockerfile",
|
||||||
|
"/dev/null",
|
||||||
]
|
]
|
||||||
print(" ".join(command))
|
print(" ".join(command))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue