Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add collector path for cond. comp. tests #4159

Merged
merged 1 commit into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/conditional_compilation/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ def pytest_addoption(parser):
type=Path,
help="Path to the benchmark_app tool",
)
parser.addoption(
"--collector_dir",
vurusovs marked this conversation as resolved.
Show resolved Hide resolved
required=True,
type=Path,
help="Path to a directory with a collector binary",
)
parser.addoption(
"-A",
"--artifacts",
Expand Down Expand Up @@ -89,6 +95,12 @@ def benchmark_app(request):
return request.config.getoption("benchmark_app")


@pytest.fixture(scope="session")
def collector_dir(request):
"""Fixture function for command-line option."""
return request.config.getoption("collector_dir")


@pytest.fixture(scope="session")
def artifacts(request):
"""Fixture function for command-line option."""
Expand Down
3 changes: 2 additions & 1 deletion tests/conditional_compilation/test_collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from proc_utils import cmd_exec # pylint: disable=import-error


def test_cc_collect(model, sea_runtool, benchmark_app, artifacts):
def test_cc_collect(model, sea_runtool, benchmark_app, collector_dir, artifacts):
""" Test conditional compilation statistics collection
"""
out = artifacts / model.parent / model.stem
Expand All @@ -26,6 +26,7 @@ def test_cc_collect(model, sea_runtool, benchmark_app, artifacts):
str(sea_runtool),
f"-o={out}",
"-f=stat",
f"--bindir={collector_dir}",
"!",
str(benchmark_app),
"-d=CPU",
Expand Down