Skip to content
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
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

module(
name = "score_test_scenarios",
version = "0.3.1",
version = "0.3.2",
compatibility_level = 0,
)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "testing-utils"
version = "0.3.1"
version = "0.3.2"
dependencies = ["pytest>=8.3.5", "pytest-html>=4.1.1", "pytest-repeat>=0.9.4"]
requires-python = ">=3.12"
authors = [
Expand Down
4 changes: 2 additions & 2 deletions testing_utils/build_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def find_target_path(self, target_name: str, *, expect_exists: bool = True) -> P

return target_path

def build(self, target_name: str) -> Path:
def build(self, target_name: str, *options) -> Path:
"""
Run build for selected target.

Expand All @@ -345,7 +345,7 @@ def build(self, target_name: str) -> Path:
Name of the target to build.
"""
# Run build.
command = ["bazel", "build", target_name]
command = ["bazel", "build", target_name, *options]
with Popen(command, text=True) as p:
_, _ = p.communicate(timeout=self.build_timeout)
if p.returncode != 0:
Expand Down
9 changes: 9 additions & 0 deletions tests/test_build_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,4 +472,13 @@ def expected_target_path(self, tmp_project: tuple[str, Path]) -> Path:
target_name, project_path = tmp_project
return project_path / "bazel-out" / "k8-fastbuild" / "bin" / target_name

def test_build_additional_params(self, tools_type: type[BuildTools], tmp_project: tuple[str, Path]) -> None:
target_name, path = tmp_project
with cwd(path):
tools = tools_type()
target_path = tools.build(target_name, "--verbose_failures", "--action_env=TEST_VAR=TEST_VALUE")

# Check executable exists.
assert target_path.exists()

# TODO: add query tests. # noqa: FIX002
Loading