summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Marusich <cmmarusich@gmail.com>2021-02-24 00:02:30 -0800
committerChris Marusich <cmmarusich@gmail.com>2021-03-10 23:02:02 -0800
commit78faf0f608a62b893139d46c17d5f822c315cbc5 (patch)
tree56c9e9853e021e5f1cbed74d48f4ec1e7285afb0
parent4d63ba31c9dd8ac42140e82f70cc60fba9271f97 (diff)
tests: gremlin: Skip file-needed/recursive if DT_NEEDED is empty.
* tests/gremlin.scm (file-needed/recursive): Skip the test when (file-runpath %guile-executable) evaluates to the empty list. This fixes the test, which previously failed incorrectly in the case where Guix has been built using a foreign distro's toolchain and libraries.
-rw-r--r--tests/gremlin.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/gremlin.scm b/tests/gremlin.scm
index 9ddac14265..79abdaf956 100644
--- a/tests/gremlin.scm
+++ b/tests/gremlin.scm
@@ -61,7 +61,11 @@
(elf-dynamic-info-needed dyninfo))))))
(unless (and %guile-executable (not (getenv "LD_LIBRARY_PATH"))
- (file-needed %guile-executable)) ;statically linked?
+ (file-needed %guile-executable) ;statically linked?
+ ;; When Guix has been built on a foreign distro, using a
+ ;; toolchain and libraries from that foreign distro, it is not
+ ;; unusual for the runpath to be empty.
+ (pair? (file-runpath %guile-executable)))
(test-skip 1))
(test-assert "file-needed/recursive"
(let* ((needed (file-needed/recursive %guile-executable))