aboutsummaryrefslogtreecommitdiff
path: root/tests/gremlin.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-04-23 11:23:14 +0200
committerLudovic Courtès <ludo@gnu.org>2015-04-23 18:52:40 +0200
commitcd91504df27aa0f311735c61f3b7b7ee3fee861a (patch)
tree19136da033dd673077989ad0c6e02f89d3d2a043 /tests/gremlin.scm
parenta635ed5ccb78c8010e0368d1e82ad1f7ca1af5be (diff)
downloadpatches-cd91504df27aa0f311735c61f3b7b7ee3fee861a.tar
patches-cd91504df27aa0f311735c61f3b7b7ee3fee861a.tar.gz
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.
Diffstat (limited to 'tests/gremlin.scm')
-rw-r--r--tests/gremlin.scm12
1 files changed, 12 insertions, 0 deletions
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")