all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: "Max R. Carrara" <m.carrara@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: applied: [PATCH proxmox-perl-rs v3] make: improve library path detection for tests
Date: Thu, 12 Nov 2026 17:23:58 +0100	[thread overview]
Message-ID: <kr7m3ysvsa2a3vlcj7of4a5j6pcbaghcczxjgwfga2e6jtjpmt@bkn7dx3vqnet> (raw)
In-Reply-To: <20260807090809.101155-1-m.carrara@proxmox.com>

Applied and added a follow-up.

On Fri, Aug 07, 2026 at 11:07:53AM +0200, Max R. Carrara wrote:
> Export LD_LIBRARY_PATH containing the absolute path to the current
> Rust target's directory in the top-level Makefile.
> 
> This allows the bootstrap machinery in Proxmox::Lib::PVE to find the
> compiled .so file when testing and building.
> 
> Since it's not needed anymore, remove the `sed` workaround in the
> `all` target.
> 
> Signed-off-by: Max R. Carrara <m.carrara@proxmox.com>
> ---
> Changes:
> 
> v2 --> v3:
>   * Incorporate Elias's feedback (thanks a lot!) and use $(CURDIR)
>     instead of ($shell pwd), as well as immediate assignment (`:=`)
>     instead of lazy assignment (`=`)
> 
> v1 --> v2:
>   * Use 'improve' instead of 'fix' in the commit message because 'fix'
>     implies that something was broken, which it wasn't
>   * Use LD_LIBRARY_PATH instead of PERL5LIB, as the latter didn't
>     actually work -- was a false positive on my side, as the .so file
>     installed on my workstation was used
> 
>  pve-rs/Makefile      | 7 +++----
>  pve-rs/test/Makefile | 2 +-
>  2 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/pve-rs/Makefile b/pve-rs/Makefile
> index bb1cd2d..a597589 100644
> --- a/pve-rs/Makefile
> +++ b/pve-rs/Makefile
> @@ -48,6 +48,9 @@ else
>  TARGET_DIR=debug
>  endif
> 
> +# Used to tell tests where the compiled .so file resides
> +export LD_LIBRARY_PATH := $(CURDIR)/target/$(TARGET_DIR)
> +
>  # better way to automate this without a massively annoying cargo-metatdata + jq
>  # chain that spits out errors?
>  PROXMOX_DOC_CRATES := \
> @@ -75,10 +78,6 @@ PROXMOX_DOC_URL_FLAGS = $(foreach crate,$(PROXMOX_DOC_CRATES),$(call make_rustdo
> 
>  all: PVE
>  	cargo build $(CARGO_BUILD_ARGS)
> -	mkdir -p test/Proxmox/Lib
> -	sed -r -e \
> -	  's@^sub libfile.*$$@sub libfile { "$(shell pwd)/target/$(TARGET_DIR)/libpve_rs.so"; }@' \
> -	  Proxmox/Lib/PVE.pm >test/Proxmox/Lib/PVE.pm
> 
>  Proxmox: Proxmox/Lib/PVE.pm
>  PVE: $(PERLMOD_PACKAGE_FILES)
> diff --git a/pve-rs/test/Makefile b/pve-rs/test/Makefile
> index 29dc955..2399b86 100644
> --- a/pve-rs/test/Makefile
> +++ b/pve-rs/test/Makefile
> @@ -1,5 +1,5 @@
>  .PHONY: test
> -test: Proxmox/Lib/PVE.pm
> +test:

The stub rule below it is now unused. I removed it.

>  	@echo "-- running pve-rs tests --"
>  	perl -I. -I.. -I../.. ./resource_scheduling.pl
> 
> --
> 2.47.3
> 
> 
> 
> 
> 

-- 




      parent reply	other threads:[~2026-11-12 16:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07  9:07 [PATCH proxmox-perl-rs v3] make: improve library path detection for tests Max R. Carrara
2026-08-10 12:01 ` Elias Huhsovitz
2026-11-12 16:25   ` Wolfgang Bumiller
2026-11-12 16:23 ` Wolfgang Bumiller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=kr7m3ysvsa2a3vlcj7of4a5j6pcbaghcczxjgwfga2e6jtjpmt@bkn7dx3vqnet \
    --to=w.bumiller@proxmox.com \
    --cc=m.carrara@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal