Build one or all DPDK apps. Requires DPDK to be already built on the SUT node. When app_name is 'all', build all example apps. When app_name is any other string, tries to build that example app. Return the directory path of the built app. If building all apps, return
(self, app_name: str, **meson_dpdk_args: str | bool)
| 248 | ) |
| 249 | |
| 250 | def build_dpdk_app(self, app_name: str, **meson_dpdk_args: str | bool) -> PurePath: |
| 251 | """ |
| 252 | Build one or all DPDK apps. Requires DPDK to be already built on the SUT node. |
| 253 | When app_name is 'all', build all example apps. |
| 254 | When app_name is any other string, tries to build that example app. |
| 255 | Return the directory path of the built app. If building all apps, return |
| 256 | the path to the examples directory (where all apps reside). |
| 257 | The meson_dpdk_args are keyword arguments |
| 258 | found in meson_option.txt in root DPDK directory. Do not use -D with them, |
| 259 | for example: enable_kmods=True. |
| 260 | """ |
| 261 | self.main_session.build_dpdk( |
| 262 | self._env_vars, |
| 263 | MesonArgs(examples=app_name, **meson_dpdk_args), # type: ignore [arg-type] |
| 264 | # ^^ https://github.com/python/mypy/issues/11583 |
| 265 | self._remote_dpdk_dir, |
| 266 | self.remote_dpdk_build_dir, |
| 267 | rebuild=True, |
| 268 | timeout=self._app_compile_timeout, |
| 269 | ) |
| 270 | |
| 271 | if app_name == "all": |
| 272 | return self.main_session.join_remote_path(self.remote_dpdk_build_dir, "examples") |
| 273 | return self.main_session.join_remote_path( |
| 274 | self.remote_dpdk_build_dir, "examples", f"dpdk-{app_name}" |
| 275 | ) |
| 276 | |
| 277 | def kill_cleanup_dpdk_apps(self) -> None: |
| 278 | """ |