Skip to content

Commit 2ad963b

Browse files
committed
add marker so that test doesn't crash
1 parent 72bd8e7 commit 2ad963b

4 files changed

Lines changed: 5 additions & 1 deletion

File tree

codeflash/benchmarking/pytest_new_process_trace_benchmarks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
],
3434
plugins=[codeflash_benchmark_plugin],
3535
) # Errors will be printed to stdout, not stderr
36+
3637
except Exception as e:
3738
print(f"Failed to collect tests: {e!s}", file=sys.stderr)
3839
exitcode = -1

codeflash/benchmarking/trace_benchmarks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def trace_benchmarks_pytest(
3232
env=benchmark_env,
3333
timeout=timeout,
3434
)
35-
print(result.stdout)
3635
if result.returncode != 0:
3736
if "ERROR collecting" in result.stdout:
3837
# Pattern matches "===== ERRORS =====" (any number of =) and captures everything after

codeflash/discovery/pytest_new_process_discovery.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ def pytest_collection_modifyitems(self, items) -> None:
2323
if "benchmark" in item.fixturenames:
2424
item.add_marker(skip_benchmark)
2525

26+
def pytest_configure(self, config) -> None:
27+
config.addinivalue_line("markers", "benchmark: placeholder")
28+
2629

2730
def parse_pytest_collection_results(pytest_tests: list[Any]) -> list[dict[str, str]]:
2831
test_results = []

codeflash/optimization/optimizer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def run_benchmarks(
6464
from codeflash.benchmarking.trace_benchmarks import trace_benchmarks_pytest
6565
from codeflash.benchmarking.utils import print_benchmark_table, validate_and_format_benchmark_table
6666

67+
console.rule()
6768
with progress_bar(
6869
f"Running benchmarks in {self.args.benchmarks_root}", transient=True, revert_to_print=bool(get_pr_number())
6970
):

0 commit comments

Comments
 (0)