On Mon, Feb 13, 2023 at 04:28:39PM +0100, Juraj Linkeš wrote:
> Add the ability to build DPDK and apps on the SUT, using a configured
> target.
> 
> Signed-off-by: Juraj Linkeš <juraj.lin...@pantheon.tech>
> ---
>  dts/framework/config/__init__.py              |   2 +
>  dts/framework/exception.py                    |  17 ++
>  dts/framework/remote_session/os_session.py    |  90 +++++++++-
>  dts/framework/remote_session/posix_session.py | 126 ++++++++++++++
>  .../remote_session/remote/remote_session.py   |  38 ++++-
>  .../remote_session/remote/ssh_session.py      |  68 +++++++-
>  dts/framework/settings.py                     |  44 ++++-
>  dts/framework/testbed_model/__init__.py       |   1 +
>  dts/framework/testbed_model/dpdk.py           |  33 ++++
>  dts/framework/testbed_model/sut_node.py       | 158 ++++++++++++++++++
>  dts/framework/utils.py                        |  19 ++-
>  11 files changed, 580 insertions(+), 16 deletions(-)
>  create mode 100644 dts/framework/testbed_model/dpdk.py
> 

<snip>

> +
> +    def build_dpdk(
> +        self,
> +        env_vars: EnvVarsDict,
> +        meson_args: MesonArgs,
> +        remote_dpdk_dir: str | PurePath,
> +        remote_dpdk_build_dir: str | PurePath,
> +        rebuild: bool = False,
> +        timeout: float = SETTINGS.compile_timeout,
> +    ) -> None:
> +        try:
> +            if rebuild:
> +                # reconfigure, then build
> +                self._logger.info("Reconfiguring DPDK build.")
> +                self.remote_session.send_command(
> +                    f"meson configure {meson_args} {remote_dpdk_build_dir}",
> +                    timeout,
> +                    verify=True,
> +                    env=env_vars,
> +                )
> +            else:
> +                # fresh build - remove target dir first, then build from 
> scratch
> +                self._logger.info("Configuring DPDK build from scratch.")
> +                self.remove_remote_dir(remote_dpdk_build_dir)
> +                self.remote_session.send_command(
> +                    f"meson {meson_args} {remote_dpdk_dir} 
> {remote_dpdk_build_dir}",

Minor nit - this should be "meson setup" rather than just "meson". Latest
versions of meson complain about omitting the "setup" operation.

/Bruce

Reply via email to