Skip to content

Commit

Permalink
Skip testing external plugins on musl libc.
Browse files Browse the repository at this point in the history
  • Loading branch information
psobot committed Jul 15, 2023
1 parent 1217e16 commit 6dc9385
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_external_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@
f for f in AVAILABLE_INSTRUMENT_PLUGINS_IN_TEST_ENVIRONMENT if "component" not in f
]

IS_TESTING_MUSL_LIBC_ON_CI = "musl" in os.getenv("CIBW_BUILD", "")
if IS_TESTING_MUSL_LIBC_ON_CI:
# We can't load any external plugins at all on musl libc (unless they don't require glibc,
# but I don't know of any that fit that description)
AVAILABLE_EFFECT_PLUGINS_IN_TEST_ENVIRONMENT = []
AVAILABLE_INSTRUMENT_PLUGINS_IN_TEST_ENVIRONMENT = []

AVAILABLE_PLUGINS_IN_TEST_ENVIRONMENT = (
AVAILABLE_EFFECT_PLUGINS_IN_TEST_ENVIRONMENT + AVAILABLE_INSTRUMENT_PLUGINS_IN_TEST_ENVIRONMENT
)
Expand Down Expand Up @@ -207,6 +214,10 @@ def max_volume_of(x: np.ndarray) -> float:
return np.amax(np.abs(x))


@pytest.mark.skipif(
IS_TESTING_MUSL_LIBC_ON_CI,
reason="External plugins are not officially supported without glibc.",
)
def test_at_least_one_plugin_is_available_for_testing():
assert AVAILABLE_EFFECT_PLUGINS_IN_TEST_ENVIRONMENT

Expand Down

0 comments on commit 6dc9385

Please sign in to comment.