[v4,3/7] ci: allow use of DPDK tools when building examples
Checks
Commit Message
To allow use of the DPDK python scripts (installed in $(prefix)/bin)
from within the makefiles of our examples, we need to export the PATH
variable with the location of our installed scripts from within our CI
scripts. This matches what is already done for other paths e.g. the
PKG_CONFIG_PATH variable.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
.ci/linux-build.sh | 1 +
1 file changed, 1 insertion(+)
Comments
Bruce Richardson <bruce.richardson@intel.com> writes:
> To allow use of the DPDK python scripts (installed in $(prefix)/bin)
> from within the makefiles of our examples, we need to export the PATH
> variable with the location of our installed scripts from within our CI
> scripts. This matches what is already done for other paths e.g. the
> PKG_CONFIG_PATH variable.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
I guess this should work, but it's a bit strange that we need to key off
something like dpdk-devbind.py. Not a complaint, just an observation.
Maybe a future change would be to update the meson.build to set the
exec_prefix variable - but I guess for now that might be a much bigger
change. But it means we could get the path after setting the pkgconfig
path and then just run something like:
pkg-config libdpdk --variable=exec_prefix
and wouldn't need to search for the python utility.
As I wrote - it's a more involved change, and I don't think it should
hold up this patch. Just something to consider for the future (maybe
Michael or I could look at it)
> .ci/linux-build.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index e0b62bac90..3db9d9de6e 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -174,6 +174,7 @@ fi
> if [ "$BUILD_EXAMPLES" = "true" ]; then
> [ -d install ] || DESTDIR=$(pwd)/install meson install -C build
> export LD_LIBRARY_PATH=$(dirname $(find $(pwd)/install -name librte_eal.so)):$LD_LIBRARY_PATH
> + export PATH=$(dirname $(find $(pwd)/install -name dpdk-devbind.py)):$PATH
> export PKG_CONFIG_PATH=$(dirname $(find $(pwd)/install -name libdpdk.pc)):$PKG_CONFIG_PATH
> export PKGCONF="pkg-config --define-prefix"
> find build/examples -maxdepth 1 -type f -name "dpdk-*" |
On Tue, Oct 17, 2023 at 08:24:36AM -0400, Aaron Conole wrote:
> Bruce Richardson <bruce.richardson@intel.com> writes:
>
> > To allow use of the DPDK python scripts (installed in $(prefix)/bin)
> > from within the makefiles of our examples, we need to export the PATH
> > variable with the location of our installed scripts from within our CI
> > scripts. This matches what is already done for other paths e.g. the
> > PKG_CONFIG_PATH variable.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
>
> I guess this should work, but it's a bit strange that we need to key off
> something like dpdk-devbind.py. Not a complaint, just an observation.
>
Yes, I also find it a bit strange, but I decided to just copy the style
used for the other paths which also key off a "known-good" file. As you
say, it also works though, which is nice :-)
> Maybe a future change would be to update the meson.build to set the
> exec_prefix variable - but I guess for now that might be a much bigger
> change. But it means we could get the path after setting the pkgconfig
> path and then just run something like:
>
> pkg-config libdpdk --variable=exec_prefix
>
> and wouldn't need to search for the python utility.
>
> As I wrote - it's a more involved change, and I don't think it should
> hold up this patch. Just something to consider for the future (maybe
> Michael or I could look at it)
Thanks for the input.
/Bruce
@@ -174,6 +174,7 @@ fi
if [ "$BUILD_EXAMPLES" = "true" ]; then
[ -d install ] || DESTDIR=$(pwd)/install meson install -C build
export LD_LIBRARY_PATH=$(dirname $(find $(pwd)/install -name librte_eal.so)):$LD_LIBRARY_PATH
+ export PATH=$(dirname $(find $(pwd)/install -name dpdk-devbind.py)):$PATH
export PKG_CONFIG_PATH=$(dirname $(find $(pwd)/install -name libdpdk.pc)):$PKG_CONFIG_PATH
export PKGCONF="pkg-config --define-prefix"
find build/examples -maxdepth 1 -type f -name "dpdk-*" |