From 6b97415996583b15a97dad8254f610275353e913 Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Sat, 18 May 2019 12:08:49 +0200 Subject: gremlin: Adjust tests for foreign distros. Fixes . * tests/gremlin.scm ("elf-dynamic-info-needed, executable"): Expect only libguile and libc among NEEDED. ("strip-runpath"): Pass '--enable-new-dtags' to get RUNPATH, not RPATH. --- tests/gremlin.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/gremlin.scm b/tests/gremlin.scm index 77a5dc1998..b0bb7a8e49 100644 --- a/tests/gremlin.scm +++ b/tests/gremlin.scm @@ -52,7 +52,7 @@ (define c-compiler (or (not dyninfo) ;static executable (lset<= string=? (list (string-append "libguile-" (effective-version)) - "libgc" "libunistring" "libffi") + "libc") (map (lambda (lib) (string-take lib (string-contains lib ".so"))) (elf-dynamic-info-needed dyninfo)))))) @@ -79,7 +79,7 @@ (define c-compiler (lambda (port) (display "int main () { puts(\"hello\"); }" port))) (invoke c-compiler "t.c" - "-Wl,-rpath=/foo" "-Wl,-rpath=/bar") + "-Wl,--enable-new-dtags" "-Wl,-rpath=/foo" "-Wl,-rpath=/bar") (let* ((dyninfo (elf-dynamic-info (parse-elf (call-with-input-file "a.out" get-bytevector-all)))) -- cgit v1.2.3 From baab87ac49e3f0f873e17eb16db9781189b1f2d1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 18 May 2019 12:21:34 +0200 Subject: pack: '--localstatedir' and '-R' tests gracefully handle missing /gnu/store. Fixes . Reported by Ting-Wei Lan . * tests/guix-pack-localstatedir.sh: Set 'storedir' before 'NIX_STORE_DIR'. * tests/guix-pack-relocatable.sh: Likewise. --- tests/guix-pack-localstatedir.sh | 5 +++-- tests/guix-pack-relocatable.sh | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/guix-pack-localstatedir.sh b/tests/guix-pack-localstatedir.sh index b734b0f7e3..042887ea9b 100644 --- a/tests/guix-pack-localstatedir.sh +++ b/tests/guix-pack-localstatedir.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2018 Ludovic Courtès +# Copyright © 2018, 2019 Ludovic Courtès # # This file is part of GNU Guix. # @@ -27,8 +27,9 @@ guix pack --version # the test in the user's global store if possible, on the grounds that # binaries may already be there or can be built or downloaded inexpensively. -NIX_STORE_DIR="`guile -c '(use-modules (guix config))(display %storedir)'`" +storedir="`guile -c '(use-modules (guix config))(display %storedir)'`" localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`" +NIX_STORE_DIR="$storedir" GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket" export NIX_STORE_DIR GUIX_DAEMON_SOCKET diff --git a/tests/guix-pack-relocatable.sh b/tests/guix-pack-relocatable.sh index c45a679bb1..ebada62c01 100644 --- a/tests/guix-pack-relocatable.sh +++ b/tests/guix-pack-relocatable.sh @@ -27,8 +27,9 @@ guix pack --version # run it on the user's global store if possible, on the grounds that binaries # may already be there or can be built or downloaded inexpensively. -NIX_STORE_DIR="`guile -c '(use-modules (guix config))(display %storedir)'`" +storedir="`guile -c '(use-modules (guix config))(display %storedir)'`" localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`" +NIX_STORE_DIR="$storedir" GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket" export NIX_STORE_DIR GUIX_DAEMON_SOCKET -- cgit v1.2.3