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: Add 32bit test #3489

Open
wants to merge 6 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
DpdkInstall: move constant args to private variables
Allowing extension of the class for the 32bit build
  • Loading branch information
mcgov committed Jan 22, 2025
commit 0601e6fb9be9dc31025a05dcb332b356b781f2c4
21 changes: 12 additions & 9 deletions microsoft/testsuites/dpdk/dpdktestpmd.py
Original file line number Diff line number Diff line change
@@ -199,6 +199,12 @@ class DpdkSourceInstall(Installer):
"multi_process/client_server_mp/mp_server",
"multi_process/client_server_mp/mp_client",
]
_library_bashrc_lines = [
"export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib64/pkgconfig/",
"export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib64/",
]
_meson_arguments: List[str] = []
_build_dir: str = "build"

def _check_if_installed(self) -> bool:
try:
@@ -258,14 +264,15 @@ def get_installed_version(self) -> VersionInfo:
def _install(self) -> None:
super()._install()
if self._sample_applications:
sample_apps = f"-Dexamples={','.join(self._sample_applications)}"
else:
sample_apps = ""
self._meson_arguments += f"-Dexamples={','.join(self._sample_applications)}"

node = self._node
# save the pythonpath for later
python_path = node.tools[Python].get_python_path()
self.dpdk_build_path = node.tools[Meson].setup(
args=sample_apps, build_dir="build", cwd=self.asset_path
args=" ".join(self._meson_arguments),
build_dir=self._build_dir,
cwd=self.asset_path,
)
node.tools[Ninja].run(
cwd=self.dpdk_build_path,
@@ -300,12 +307,8 @@ def _install(self) -> None:
expected_exit_code=0,
expected_exit_code_failure_message="ldconfig failed, check for error spew.",
)
library_bashrc_lines = [
"export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib64/pkgconfig/",
"export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib64/",
]
node.tools[Echo].write_to_file(
";".join(library_bashrc_lines),
";".join(self._library_bashrc_lines),
node.get_pure_path("$HOME/.bashrc"),
append=True,
)