diff --git a/tests/guix-pack-relocatable.sh b/tests/guix-pack-relocatable.sh index 5ac8cdc718..0255075fb1 100644 --- a/tests/guix-pack-relocatable.sh +++ b/tests/guix-pack-relocatable.sh @@ -145,7 +145,7 @@ guix pack -RR python-numpy python-scipy --no-grafts -n # Check that packages that mix executable and support files (e.g. git) in the # "binary" directories still work after wrapped. cat >"$test_directory/manifest.scm" <<'EOF' -(use-modules (guix) (guix profiles) +(use-modules (guix) (guix profiles) (guix search-paths) (gnu packages bootstrap)) (manifest (list (manifest-entry @@ -154,12 +154,22 @@ cat >"$test_directory/manifest.scm" <<'EOF' `(("bin/hello" ,(program-file "hello" - #~(begin (display (load "../libexec/msg"))(newline)) + #~(begin + (add-to-load-path (getenv "HELLO_EXEC_PATH")) + (display (load-from-path "msg"))(newline)) #:guile %bootstrap-guile)) - ("libexec/msg" - ,(plain-file "msg" "42")))))))) + ("libexec/hello/msg" + ,(plain-file "msg" "42"))))) + (search-paths + (list (search-path-specification + (variable "HELLO_EXEC_PATH") + (files '("libexec/hello")) + (separator #f))))))) EOF tarball="`guix pack -RR -S /opt= -m $test_directory/manifest.scm`" (cd "$test_directory"; tar xvf "$tarball") -run_without_store "$test_directory/opt/bin/hello" > "$test_directory/output" +( export GUIX_PROFILE=$test_directory/opt + . $GUIX_PROFILE/etc/profile + run_without_store "$test_directory/opt/bin/hello" > "$test_directory/output" ) +cat "$test_directory/output" test "`cat $test_directory/output`" = "42"