@@ -25,7 +25,6 @@ class TestConfig:
2525 expected_unit_tests : Optional [int ] = None
2626 min_improvement_x : float = 0.1
2727 trace_mode : bool = False
28- trace_load : str = "workload"
2928 coverage_expectations : list [CoverageExpectation ] = field (default_factory = list )
3029
3130
@@ -185,11 +184,7 @@ def run_trace_test(cwd: pathlib.Path, config: TestConfig, expected_improvement_p
185184 # First command: Run the tracer
186185 test_root = cwd / "tests" / (config .test_framework or "" )
187186 clear_directory (test_root )
188-
189- trace_script = "workload.py" if config .trace_load == "workload" else "testbench.py"
190- expected_traced_functions = 3 if config .trace_load == "workload" else 4
191-
192- command = ["python" , "-m" , "codeflash.tracer" , "-o" , "codeflash.trace" , trace_script ]
187+ command = ["python" , "-m" , "codeflash.tracer" , "-o" , "codeflash.trace" , "workload.py" ]
193188 process = subprocess .Popen (
194189 command , stdout = subprocess .PIPE , stderr = subprocess .STDOUT , text = True , cwd = str (cwd ), env = os .environ .copy ()
195190 )
@@ -207,8 +202,8 @@ def run_trace_test(cwd: pathlib.Path, config: TestConfig, expected_improvement_p
207202 return False
208203
209204 functions_traced = re .search (r"Traced (\d+) function calls successfully and replay test created at - (.*)$" , stdout )
210- if not functions_traced or int (functions_traced .group (1 )) != expected_traced_functions :
211- logging .error (f "Expected { expected_traced_functions } traced functions" )
205+ if not functions_traced or int (functions_traced .group (1 )) != 3 :
206+ logging .error ("Expected 3 traced functions" )
212207 return False
213208
214209 replay_test_path = pathlib .Path (functions_traced .group (2 ))
@@ -254,4 +249,4 @@ def run_with_retries(test_func, *args, **kwargs) -> bool:
254249 logging .error ("Test failed after all retries" )
255250 return 1
256251
257- return 1
252+ return 1
0 commit comments