Skip to content

Commit 36ef581

Browse files
committed
Update end_to_end_test_tracer_replay.py
1 parent 23fde2e commit 36ef581

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

tests/scripts/end_to_end_test_tracer_replay.py

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,22 @@
33

44
from end_to_end_test_utilities import CoverageExpectation, TestConfig, run_codeflash_command, run_with_retries
55

6-
# def run_test(expected_improvement_pct: int) -> bool:
7-
# config = TestConfig(
8-
# trace_mode=True,
9-
# min_improvement_x=0.1,
10-
# expected_unit_tests=1,
11-
# coverage_expectations=[
12-
# CoverageExpectation(function_name="funcA", expected_coverage=100.0, expected_lines=[2, 3, 4, 6, 9])
13-
# ],
14-
# )
15-
# cwd = (
16-
# pathlib.Path(__file__).parent.parent.parent / "code_to_optimize" / "code_directories" / "simple_tracer_e2e"
17-
# ).resolve()
18-
# return run_codeflash_command(cwd, config, expected_improvement_pct)
196

20-
21-
def run_testbenchtest(expected_improvement_pct: int) -> bool:
7+
def run_test(expected_improvement_pct: int) -> bool:
228
config = TestConfig(
239
trace_mode=True,
2410
min_improvement_x=0.1,
11+
expected_unit_tests=1,
2512
coverage_expectations=[
26-
CoverageExpectation(function_name="add_numbers", expected_coverage=100.0, expected_lines=[2, 3, 4, 6, 9])
13+
CoverageExpectation(function_name="funcA", expected_coverage=100.0, expected_lines=[2, 3, 4, 6, 9]),
14+
CoverageExpectation(function_name="add_numbers", expected_coverage=100.0, expected_lines=[2, 3, 4, 6, 9]),
2715
],
2816
)
2917
cwd = (
30-
pathlib.Path(__file__).parent.parent.parent / "code_to_optimize" / "code_directories" / "testbench.py"
18+
pathlib.Path(__file__).parent.parent.parent / "code_to_optimize" / "code_directories" / "simple_tracer_e2e"
3119
).resolve()
3220
return run_codeflash_command(cwd, config, expected_improvement_pct)
3321

3422

3523
if __name__ == "__main__":
36-
# tests = [run_test, run_testbenchtest]
37-
tests = [run_testbenchtest]
38-
for test in tests:
39-
res = run_with_retries(test, int(os.getenv("EXPECTED_IMPROVEMENT_PCT", 10)))
40-
exit(0 if res else 1)
24+
exit(run_with_retries(run_test, int(os.getenv("EXPECTED_IMPROVEMENT_PCT", 10))))

0 commit comments

Comments
 (0)