|
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 |
@@ -87,16 +89,18 @@ def run_behavioral_tests( |
87 | 89 | else: |
88 | 90 | coverage_cmd.extend(shlex.split(pytest_cmd, posix=IS_POSIX)[1:]) |
89 | 91 |
|
| 92 | + blocklist_args = [f"-p no:{plugin}" for plugin in BEHAVIORAL_BLOCKLISTED_PLUGINS if plugin != "cov"] |
90 | 93 | results = execute_test_subprocess( |
91 | | - coverage_cmd + common_pytest_args + result_args + test_files, cwd=cwd, env=pytest_test_env, timeout=600 |
| 94 | + coverage_cmd + common_pytest_args + blocklist_args + result_args + test_files, cwd=cwd, env=pytest_test_env, timeout=600 |
92 | 95 | ) |
93 | 96 | logger.debug( |
94 | 97 | f"Result return code: {results.returncode}, " |
95 | 98 | f"{'Result stderr:' + str(results.stderr) if results.stderr else ''}" |
96 | 99 | ) |
97 | 100 | else: |
| 101 | + blocklist_args = [f"-p no:{plugin}" for plugin in BEHAVIORAL_BLOCKLISTED_PLUGINS] |
98 | 102 | results = execute_test_subprocess( |
99 | | - pytest_cmd_list + common_pytest_args + result_args + test_files, |
| 103 | + pytest_cmd_list + common_pytest_args + blocklist_args + result_args + test_files, |
100 | 104 | cwd=cwd, |
101 | 105 | env=pytest_test_env, |
102 | 106 | timeout=600, # TODO: Make this dynamic |
@@ -170,8 +174,10 @@ def run_benchmarking_tests( |
170 | 174 | result_args = [f"--junitxml={result_file_path.as_posix()}", "-o", "junit_logging=all"] |
171 | 175 | pytest_test_env = test_env.copy() |
172 | 176 | pytest_test_env["PYTEST_PLUGINS"] = "codeflash.verification.pytest_plugin" |
| 177 | + blocklist_args = [f"-p no:{plugin}" for plugin in BENCHMARKING_BLOCKLISTED_PLUGINS] |
| 178 | + |
173 | 179 | results = execute_test_subprocess( |
174 | | - pytest_cmd_list + pytest_args + result_args + test_files, |
| 180 | + pytest_cmd_list + pytest_args + blocklist_args + result_args + test_files, |
175 | 181 | cwd=cwd, |
176 | 182 | env=pytest_test_env, |
177 | 183 | timeout=600, # TODO: Make this dynamic |
|
0 commit comments