From cd91504df27aa0f311735c61f3b7b7ee3fee861a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 23 Apr 2015 11:23:14 +0200 Subject: gremlin: Add support for the expansion of $ORIGIN in RUNPATH. * guix/build/gremlin.scm (expand-variable, expand-origin): New procedures. (validate-needed-in-runpath): Map 'expand-origin' to the RUNPATH field of DYNINFO. * tests/gremlin.scm ("expand-origin"): New test. --- tests/gremlin.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/gremlin.scm b/tests/gremlin.scm index 225a72ff9f..dc9f78c21a 100644 --- a/tests/gremlin.scm +++ b/tests/gremlin.scm @@ -21,6 +21,7 @@ #:use-module (guix build utils) #:use-module (guix build gremlin) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:use-module (srfi srfi-64) #:use-module (rnrs io ports) #:use-module (ice-9 match)) @@ -51,6 +52,17 @@ (string-take lib (string-contains lib ".so"))) (elf-dynamic-info-needed dyninfo)))))) +(test-equal "expand-origin" + '("OOO/../lib" + "OOO" + "../OOO/bar/OOO/baz" + "ORIGIN/foo") + (map (cut expand-origin <> "OOO") + '("$ORIGIN/../lib" + "${ORIGIN}" + "../${ORIGIN}/bar/$ORIGIN/baz" + "ORIGIN/foo"))) + (test-end "gremlin") -- cgit 1.4.1