Skip to content

Commit 5a425c3

Browse files
committed
Update test_runner.py
1 parent 51ceda7 commit 5a425c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

codeflash/verification/test_runner.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def run_behavioral_tests(
3737
pytest_timeout: int | None = None,
3838
pytest_cmd: str = "pytest",
3939
verbose: bool = False,
40+
pytest_target_runtime_seconds: int = TOTAL_LOOPING_TIME_EFFECTIVE,
4041
enable_coverage: bool = False,
4142
) -> tuple[Path, subprocess.CompletedProcess, Path | None, Path | None]:
4243
if test_framework == "pytest":
@@ -65,6 +66,7 @@ def run_behavioral_tests(
6566
"--codeflash_loops_scope=session",
6667
"--codeflash_min_loops=1",
6768
"--codeflash_max_loops=1",
69+
f"--codeflash_seconds={pytest_target_runtime_seconds}"
6870
]
6971

7072
result_file_path = get_run_tmp_file(Path("pytest_results.xml"))
@@ -149,6 +151,7 @@ def run_line_profile_tests(
149151
cwd: Path,
150152
test_framework: str,
151153
*,
154+
pytest_target_runtime_seconds: float = TOTAL_LOOPING_TIME_EFFECTIVE,
152155
verbose: bool = False,
153156
pytest_timeout: int | None = None,
154157
pytest_min_loops: int = 5, # noqa: ARG001
@@ -183,6 +186,7 @@ def run_line_profile_tests(
183186
"--codeflash_loops_scope=session",
184187
"--codeflash_min_loops=1",
185188
"--codeflash_max_loops=1",
189+
f"--codeflash_seconds={pytest_target_runtime_seconds}",
186190
]
187191
result_file_path = get_run_tmp_file(Path("pytest_results.xml"))
188192
result_args = [f"--junitxml={result_file_path.as_posix()}", "-o", "junit_logging=all"]

0 commit comments

Comments
 (0)