|
16 | 16 | if TYPE_CHECKING: |
17 | 17 | from codeflash.models.models import TestFiles |
18 | 18 |
|
| 19 | +BEHAVIORAL_BLOCKLISTED_PLUGINS = ["benchmark"] |
| 20 | +BENCHMARKING_BLOCKLISTED_PLUGINS = ["cov", "benchmark", "profiling"] |
19 | 21 |
|
20 | 22 | def execute_test_subprocess( |
21 | 23 | cmd_list: list[str], cwd: Path, env: dict[str, str] | None, timeout: int = 600 |
@@ -90,16 +92,18 @@ def run_behavioral_tests( |
90 | 92 | else: |
91 | 93 | coverage_cmd.extend(shlex.split(pytest_cmd, posix=IS_POSIX)[1:]) |
92 | 94 |
|
| 95 | + blocklist_args = [f"-p no:{plugin}" for plugin in BEHAVIORAL_BLOCKLISTED_PLUGINS if plugin != "cov"] |
93 | 96 | results = execute_test_subprocess( |
94 | | - coverage_cmd + common_pytest_args + result_args + test_files, cwd=cwd, env=pytest_test_env, timeout=600 |
| 97 | + coverage_cmd + common_pytest_args + blocklist_args + result_args + test_files, cwd=cwd, env=pytest_test_env, timeout=600 |
95 | 98 | ) |
96 | 99 | logger.debug( |
97 | 100 | f"Result return code: {results.returncode}, " |
98 | 101 | f"{'Result stderr:' + str(results.stderr) if results.stderr else ''}" |
99 | 102 | ) |
100 | 103 | else: |
| 104 | + blocklist_args = [f"-p no:{plugin}" for plugin in BEHAVIORAL_BLOCKLISTED_PLUGINS] |
101 | 105 | results = execute_test_subprocess( |
102 | | - pytest_cmd_list + common_pytest_args + result_args + test_files, |
| 106 | + pytest_cmd_list + common_pytest_args + blocklist_args + result_args + test_files, |
103 | 107 | cwd=cwd, |
104 | 108 | env=pytest_test_env, |
105 | 109 | timeout=600, # TODO: Make this dynamic |
@@ -174,8 +178,10 @@ def run_benchmarking_tests( |
174 | 178 | result_args = [f"--junitxml={result_file_path.as_posix()}", "-o", "junit_logging=all"] |
175 | 179 | pytest_test_env = test_env.copy() |
176 | 180 | pytest_test_env["PYTEST_PLUGINS"] = "codeflash.verification.pytest_plugin" |
| 181 | + blocklist_args = [f"-p no:{plugin}" for plugin in BENCHMARKING_BLOCKLISTED_PLUGINS] |
| 182 | + |
177 | 183 | results = execute_test_subprocess( |
178 | | - pytest_cmd_list + pytest_args + result_args + test_files, |
| 184 | + pytest_cmd_list + pytest_args + blocklist_args + result_args + test_files, |
179 | 185 | cwd=cwd, |
180 | 186 | env=pytest_test_env, |
181 | 187 | timeout=600, # TODO: Make this dynamic |
|
0 commit comments