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

DPDK: install path fixes for meson and Ubuntu 24.04 #3598

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
DPDK: Add needs_reboot option to installer
  • Loading branch information
mcgov committed Feb 5, 2025
commit 08bf094f19d859017f14287d07b6b7b03fa510aa
6 changes: 6 additions & 0 deletions microsoft/testsuites/dpdk/common.py
Original file line number Diff line number Diff line change
@@ -39,10 +39,12 @@ def __init__(
matcher: Callable[[Posix], bool],
packages: Optional[Sequence[Union[str, Tool, Type[Tool]]]] = None,
stop_on_match: bool = False,
requires_reboot: bool = False,
) -> None:
self.matcher = matcher
self.packages = packages
self.stop_on_match = stop_on_match
self.requires_reboot = requires_reboot


class DependencyInstaller:
@@ -65,6 +67,10 @@ def install_required_packages(
for requirement in self.requirements:
if requirement.matcher(os) and requirement.packages:
packages += requirement.packages
if requirement.requires_reboot:
os.install_packages(packages=packages, extra_args=extra_args)
packages = []
node.reboot()
if requirement.stop_on_match:
break
os.install_packages(packages=packages, extra_args=extra_args)
4 changes: 3 additions & 1 deletion microsoft/testsuites/dpdk/dpdktestpmd.py
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@
and bool(x.get_kernel_information().version >= "5.15.0")
and x.is_package_in_repo("linux-modules-extra-azure"),
packages=["linux-modules-extra-azure"],
requires_reboot=True,
),
OsPackageDependencies(
matcher=lambda x: isinstance(x, Debian),
@@ -226,7 +227,8 @@ def _setup_node(self) -> None:
# which breaks when another tool checks for it's existence before building...
# like cmake, meson, make, autoconf, etc.
self._node.tools[Ninja].install()
self._node.tools[Pip].install_packages("pyelftools")
if not isinstance(self._os, Debian):
self._node.tools[Pip].install_packages("pyelftools")

def _uninstall(self) -> None:
# undo source installation (thanks ninja)