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

Fix kernel tests on non-x86_64 #371

Merged
merged 1 commit into from
Jan 5, 2024
Merged
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
7 changes: 6 additions & 1 deletion tests/test_kernel_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pytest_container import container_from_pytest_param
from pytest_container import DerivedContainer
from pytest_container.container import ContainerData
from pytest_container.runtime import LOCALHOST

from bci_tester.data import KERNEL_MODULE_CONTAINER
from bci_tester.data import OS_VERSION
Expand Down Expand Up @@ -47,7 +48,7 @@ def create_kernel_test(containerfile: str) -> pytest.param:

RUN set -euxo pipefail; \
curl -Lsf -o - https://fast.dpdk.org/rel/dpdk-{_DPDK_VERSION}.tar.gz | tar xzf - ; cd dpdk-{_DPDK_VERSION}; \
meson --prefix=/usr --includedir=/usr/include/ -Ddefault_library=shared -Denable_docs=false -Db_lto=false -Dplatform="$(uname -m)" -Dcpu_instruction_set=generic -Denable_kmods=true -Dkernel_dir="/usr/src/linux-obj/$(uname -m)/default" build; \
meson --prefix=/usr --includedir=/usr/include/ -Ddefault_library=shared -Denable_docs=false -Db_lto=false -Dplatform="generic" -Dcpu_instruction_set=generic -Denable_kmods=true -Dkernel_dir="/usr/src/linux-obj/$(uname -m)/default" build; \
meson compile -C build
"""
)
Expand All @@ -61,6 +62,10 @@ def test_drbd_builds(container: ContainerData) -> None:
).exists


@pytest.mark.skipif(
LOCALHOST.system_info.arch not in ("x86_64", "aarch64", "ppc64le"),
reason="DPDK is not supported on this architecture",
)
@pytest.mark.parametrize("container", [DPDK_CONTAINER], indirect=True)
def test_dpdk_builds(container: ContainerData) -> None:
"""Test that the DPDK kernel module builds."""
Expand Down
Loading