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 causes the test to be
correctly skipped in the case where Guix has been built using a foreign
distro's toolchain and libraries.
This commit is contained in:
Chris Marusich 2021-02-24 00:02:30 -08:00
parent a3d9af5eb1
commit e4b5a23841
No known key found for this signature in database
GPG Key ID: DD409A15D822469D

@ -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))