Skip to content

Commit

Permalink
Prefer static copy of devname
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgov committed Feb 4, 2025
1 parent 1b9ffe4 commit c667775
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions microsoft/testsuites/dpdk/dpdktestpmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class DpdkSourceInstall(Installer):
"multi_process/client_server_mp/mp_server",
"multi_process/client_server_mp/mp_client",
"multi_process/symmetric_mp",
"devname",
]

def _check_if_installed(self) -> bool:
Expand Down Expand Up @@ -256,14 +257,21 @@ def get_installed_version(self) -> VersionInfo:
"libdpdk", update_cached=True
)

__devname_files = ["main.c", "Makefile", "meson.build"]

def _install(self) -> None:
super()._install()
_ = self._node.tools[Git].clone(
url="https://github.com/mcgov/devname.git",
cwd=self.asset_path.joinpath("examples"),
dir_name="devname",
# copy devname application into the examples directory
devname_local_folder = PurePath(__file__).parent.joinpath("devname")
self._node.shell.mkdir(
self.asset_path.joinpath("examples/devname"), parents=False, exist_ok=False
)
self._sample_applications += ["devname"]
for file in self.__devname_files:
self._node.shell.copy(
devname_local_folder.joinpath(file),
self.asset_path.joinpath(f"examples/devname/{file}"),
)
# stringify the example app list
if self._sample_applications:
sample_apps = f"-Dexamples={','.join(self._sample_applications)}"
else:
Expand Down

0 comments on commit c667775

Please sign in to comment.