about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-01-11T16·58+0000
committerLudovic Courtès <ludo@gnu.org>2012-01-11T16·58+0000
commit6245f0d5298f613c39f999fd68bf21aee8d72945 (patch)
tree73eef81ffd3a801fa333e15dac227885b9745a16
parentc5d9ccd810e3d4c791a912767c4463f4bb44d52e (diff)
tests: Run `download-using-manifests' via libtool so that dlopening works.
-rw-r--r--substitute.mk2
-rw-r--r--tests/common.sh.in3
-rw-r--r--tests/init.sh4
3 files changed, 8 insertions, 1 deletions
diff --git a/substitute.mk b/substitute.mk
index ede3470073f8..96fc16bf5bdc 100644
--- a/substitute.mk
+++ b/substitute.mk
@@ -1,5 +1,7 @@
 %: %.in Makefile
 	sed \
+	 -e "s^@abs_top_srcdir\@^$(abs_top_srcdir)^g" \
+	 -e "s^@abs_top_builddir\@^$(abs_top_builddir)^g" \
 	 -e "s^@extra1\@^$(extra1)^g" \
 	 -e "s^@prefix\@^$(prefix)^g" \
 	 -e "s^@bindir\@^$(bindir)^g" \
diff --git a/tests/common.sh.in b/tests/common.sh.in
index 7504dc059e56..5619580a72f0 100644
--- a/tests/common.sh.in
+++ b/tests/common.sh.in
@@ -1,5 +1,8 @@
 set -e
 
+export top_srcdir="@abs_top_srcdir@"
+export top_builddir="@abs_top_builddir@"
+
 export TOP=$(pwd)/..
 
 export TEST_ROOT=$(pwd)/test-tmp
diff --git a/tests/init.sh b/tests/init.sh
index 9ce7985d709e..4296f43b6108 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -47,7 +47,9 @@ EOF
 cat > $NIX_BIN_DIR/nix/substituters/download-using-manifests.pl <<EOF
 #! $SHELL -e
 export DYLD_LIBRARY_PATH=
-exec $TOP/scripts/download-using-manifests.pl "\$@"
+exec "$top_builddir/libtool" --mode=execute			\
+  -dlopen "$top_builddir/perl/libNixStore.la"			\
+  "$top_builddir/scripts/download-using-manifests.pl" "\$@"
 EOF
 chmod +x $NIX_BIN_DIR/nix/substituters/download-using-manifests.pl