(
self,
env_vars: dict,
meson_args: MesonArgs,
remote_dpdk_dir: str | PurePath,
remote_dpdk_build_dir: str | PurePath,
rebuild: bool = False,
timeout: float = SETTINGS.compile_timeout,
)
| 101 | self.send_command(f"ls {expected_dir}", verify=True) |
| 102 | |
| 103 | def build_dpdk( |
| 104 | self, |
| 105 | env_vars: dict, |
| 106 | meson_args: MesonArgs, |
| 107 | remote_dpdk_dir: str | PurePath, |
| 108 | remote_dpdk_build_dir: str | PurePath, |
| 109 | rebuild: bool = False, |
| 110 | timeout: float = SETTINGS.compile_timeout, |
| 111 | ) -> None: |
| 112 | try: |
| 113 | if rebuild: |
| 114 | # reconfigure, then build |
| 115 | self._logger.info("Reconfiguring DPDK build.") |
| 116 | self.send_command( |
| 117 | f"meson configure {meson_args} {remote_dpdk_build_dir}", |
| 118 | timeout, |
| 119 | verify=True, |
| 120 | env=env_vars, |
| 121 | ) |
| 122 | else: |
| 123 | # fresh build - remove target dir first, then build from scratch |
| 124 | self._logger.info("Configuring DPDK build from scratch.") |
| 125 | self.remove_remote_dir(remote_dpdk_build_dir) |
| 126 | self.send_command( |
| 127 | f"meson setup {meson_args} {remote_dpdk_dir} {remote_dpdk_build_dir}", |
| 128 | timeout, |
| 129 | verify=True, |
| 130 | env=env_vars, |
| 131 | ) |
| 132 | |
| 133 | self._logger.info("Building DPDK.") |
| 134 | self.send_command( |
| 135 | f"ninja -C {remote_dpdk_build_dir}", timeout, verify=True, env=env_vars |
| 136 | ) |
| 137 | except RemoteCommandExecutionError as e: |
| 138 | raise DPDKBuildError(f"DPDK build failed when doing '{e.command}'.") |
| 139 | |
| 140 | def get_dpdk_version(self, build_dir: str | PurePath) -> str: |
| 141 | out = self.send_command(f"cat {self.join_remote_path(build_dir, 'VERSION')}", verify=True) |
nothing calls this directly
no test coverage detected