Skip to content
Open
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
1 change: 0 additions & 1 deletion cibuildwheel/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,6 @@ def _compute_build_options(self, identifier: str | None) -> BuildOptions:

test_runtime_str = self.reader.get(
"test-runtime",
env_plat=False,
option_format=ShlexTableFormat(sep="; ", pair_sep=":", allow_merge=False),
)
if not test_runtime_str:
Expand Down
25 changes: 25 additions & 0 deletions unit_test/options_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,31 @@ def test_test_runtime_handling(
assert local.test_runtime.args == expected_args


@pytest.mark.parametrize(
("platform", "platform_envvar"),
[
("android", "CIBW_TEST_RUNTIME_ANDROID"),
("ios", "CIBW_TEST_RUNTIME_IOS"),
],
)
def test_test_runtime_platform_environment(
tmp_path: Path, platform: PlatformName, platform_envvar: str
) -> None:
args = CommandLineArguments.defaults()
args.package_dir = tmp_path

options = Options(
platform=platform,
command_line_arguments=args,
env={
"CIBW_TEST_RUNTIME": "args: --global",
platform_envvar: "args: --platform-specific",
},
)

assert options.build_options(None).test_runtime.args == ["--platform-specific"]


@pytest.mark.parametrize(
("definition", "expected"),
[
Expand Down
Loading