summaryrefslogtreecommitdiff
path: root/tests/gremlin.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gremlin.scm')
-rw-r--r--tests/gremlin.scm18
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/gremlin.scm b/tests/gremlin.scm
index 44237e2ad37..280b1d88192 100644
--- a/tests/gremlin.scm
+++ b/tests/gremlin.scm
@@ -23,7 +23,6 @@
#:use-module (guix tests)
#:use-module ((guix utils) #:select (call-with-temporary-directory
target-aarch64?))
- #:use-module (guix build io)
#:use-module (guix build utils)
#:use-module (guix build gremlin)
#:use-module (gnu packages bootstrap)
@@ -45,6 +44,9 @@
(_
#f)))
+(define read-elf
+ (compose parse-elf get-bytevector-all))
+
(define c-compiler
(or (which "gcc") (which "cc") (which "g++")))
@@ -53,7 +55,8 @@
(unless %guile-executable (test-skip 1))
(test-assert "elf-dynamic-info-needed, executable"
- (let ((dyninfo (file-dynamic-info %guile-executable)))
+ (let* ((elf (call-with-input-file %guile-executable read-elf))
+ (dyninfo (elf-dynamic-info elf)))
(or (not dyninfo) ;static executable
(lset<= string=?
(list (string-append "libguile-" (effective-version))
@@ -137,7 +140,9 @@
(display "int main () { puts(\"hello\"); }" port)))
(invoke c-compiler "t.c"
"-Wl,--enable-new-dtags" "-Wl,-rpath=/foo" "-Wl,-rpath=/bar")
- (let* ((dyninfo (file-dynamic-info "a.out"))
+ (let* ((dyninfo (elf-dynamic-info
+ (parse-elf (call-with-input-file "a.out"
+ get-bytevector-all))))
(old (elf-dynamic-info-runpath dyninfo))
(new (strip-runpath "a.out"))
(new* (strip-runpath "a.out")))
@@ -191,7 +196,10 @@
(display "// empty file" port)))
(invoke c-compiler "t.c"
"-shared" "-Wl,-soname,libfoo.so.2")
- (let ((dyninfo (file-dynamic-info "a.out")))
- (elf-dynamic-info-soname dyninfo))))))
+ (let* ((dyninfo (elf-dynamic-info
+ (parse-elf (call-with-input-file "a.out"
+ get-bytevector-all))))
+ (soname (elf-dynamic-info-soname dyninfo)))
+ soname)))))
(test-end "gremlin")