summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2014-10-30 13:13:21 +0000
committerGary V. Vaughan <gary@gnu.org>2014-10-30 14:58:30 +0000
commit55952a7cff888781551dd465b16550ccb4cf9cd8 (patch)
tree012fc7d22886a46963f58a8d3c31ed34bbc97b0a /tests
parente1584d0d4985e3581f414a264ea90e720d60e17c (diff)
downloadlibtool-55952a7cff888781551dd465b16550ccb4cf9cd8.tar.gz
tests: set bindir and libdir at configure time.
In particular, openSuSE on x86_64 uses CONFIG_SITE to set libdir to "${exec_prefix}/lib64", which confuses testcases that check the contents of "${prefix}/lib". In general, tests that expect to find installed files in specific directories should explicitly set those directories at configure time. * tests/testsuite.at (LT_AT_CONFIGURE): Make sure exec_prefix, bindir and libdir point to known subdirectories we can check the contents of later on in a test case. (prefixdir): Rename from this... (prefix): ...to this. All test cases that set or use the config prefix directory must now refer to `prefixdir` for the helper macros in this file to work in hostile build environments such as CONFIG_SITE setting openSuSE. * tests/demo.at, tests/depdemo.at, tests/mdemo.at, tests/tagdemo.at: Adjust accordingly. Reported by Peter Breitenlohner. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/demo.at8
-rw-r--r--tests/depdemo.at6
-rw-r--r--tests/mdemo.at28
-rw-r--r--tests/tagdemo.at2
-rw-r--r--tests/testsuite.at8
5 files changed, 26 insertions, 26 deletions
diff --git a/tests/demo.at b/tests/demo.at
index 681bc8bf..2222a83e 100644
--- a/tests/demo.at
+++ b/tests/demo.at
@@ -347,7 +347,7 @@ cos (0.0) = 1
** This is not GNU Hello. There is no built-in mail reader. **
]])
-prefixdir=`pwd`/_inst
+prefix=`pwd`/_inst
]) # _LT_DEMO_SETUP
@@ -367,11 +367,11 @@ AT_CHECK([./helldl$EXEEXT |
# Run the make install rule, and check that installed binaries work too.
m4_define([_LT_CHECK_INSTALL],
[# Windows hosts search for dlls in the command path.
-PATH=$prefixdir/lib:$PATH
+PATH=$prefix/lib:$PATH
LT_AT_CHECK_EXECUTE([install],
- [$prefixdir/bin/hell_static], [$prefixdir/bin/hell])
-AT_CHECK([$prefixdir/bin/helldl$EXEEXT |
+ [$prefix/bin/hell_static], [$prefix/bin/hell])
+AT_CHECK([$prefix/bin/helldl$EXEEXT |
$EGREP '(Welcome to .*GNU Hell|unsupported)'], 0, [ignore])
])
diff --git a/tests/depdemo.at b/tests/depdemo.at
index ae83277e..19729857 100644
--- a/tests/depdemo.at
+++ b/tests/depdemo.at
@@ -254,7 +254,7 @@ libm cos (0.0) = 1
var_l1(4) + var_l2(6) + var_l4(9) == 19
]])
-prefixdir=`pwd`/_inst
+prefix=`pwd`/_inst
]) # _LT_SETUP
@@ -272,9 +272,9 @@ m4_define([_LT_CHECK_EXECUTE],
# Run the make install rule, and check that installed binaries work too.
m4_define([_LT_CHECK_INSTALL],
[# Windows hosts search for dlls in the command path.
-PATH=$prefixdir/lib:$PATH
+PATH=$prefix/lib:$PATH
LT_AT_CHECK_EXECUTE([install],
- [$prefixdir/bin/depdemo_static], [$prefixdir/bin/depdemo])
+ [$prefix/bin/depdemo_static], [$prefix/bin/depdemo])
])
diff --git a/tests/mdemo.at b/tests/mdemo.at
index 6b3c1637..edcccc5d 100644
--- a/tests/mdemo.at
+++ b/tests/mdemo.at
@@ -583,7 +583,7 @@ cos (0.0) = 1
** This is not GNU Hello. There is no built-in mail reader. **
]])
-prefixdir=`pwd`/_inst
+prefix=`pwd`/_inst
]) # _LT_SETUP
@@ -609,12 +609,12 @@ m4_define([_LT_CHECK_INSTALL],
[LT_AT_MAKE([install])
# Windows hosts search for dlls in the command path.
-PATH=$prefixdir/lib:$PATH
+PATH=$prefix/lib:$PATH
-LT_AT_EXEC_CHECK([$prefixdir/bin/mdemo_static], 0, [ignore], [],
- [$prefixdir/lib/foo1.la $prefixdir/lib/libfoo2.la | $GREP '^try_iterate: '])
-LT_AT_EXEC_CHECK([$prefixdir/bin/mdemo], 0, [ignore], [],
- [$prefixdir/lib/foo1.la $prefixdir/lib/libfoo2.la | $GREP '^try_iterate: '])
+LT_AT_EXEC_CHECK([$prefix/bin/mdemo_static], 0, [ignore], [],
+ [$prefix/lib/foo1.la $prefix/lib/libfoo2.la | $GREP '^try_iterate: '])
+LT_AT_EXEC_CHECK([$prefix/bin/mdemo], 0, [ignore], [],
+ [$prefix/lib/foo1.la $prefix/lib/libfoo2.la | $GREP '^try_iterate: '])
])
@@ -733,18 +733,18 @@ AT_CHECK([cmp "$before" "$after"], 0, [ignore])
# Running $MAKE install
# Libtool does not create these directories
-$lt_INSTALL -d "$prefixdir/bin"
-$lt_INSTALL -d "$prefixdir/include"
-$lt_INSTALL -d "$prefixdir/lib"
+$lt_INSTALL -d "$prefix/bin"
+$lt_INSTALL -d "$prefix/include"
+$lt_INSTALL -d "$prefix/lib"
sleep 1 # for MSYS
ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$before"
-ls -lR "$prefixdir" | $EGREP -v '(^total|testsuite.log$)' >> "$before"
+ls -lR "$prefix" | $EGREP -v '(^total|testsuite.log$)' >> "$before"
force_dry_run=:
LT_AT_MAKE([install])
ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$after"
-ls -lR "$prefixdir" | $EGREP -v '(^total|testsuite.log$)' >> "$after"
+ls -lR "$prefix" | $EGREP -v '(^total|testsuite.log$)' >> "$after"
AT_CHECK([cmp "$before" "$after"], 0, [ignore])
# Now really install
@@ -753,15 +753,15 @@ LT_AT_MAKE([install])
# Running $MAKE uninstall
# Libtool does not uninstall the programs, remove them first
-rm -f "$prefixdir/bin/mdemo$EXEEXT" "$prefixdir/bin/mdemo_static$EXEEXT"
+rm -f "$prefix/bin/mdemo$EXEEXT" "$prefix/bin/mdemo_static$EXEEXT"
sleep 1 # for MSYS
ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$before"
-ls -lR "$prefixdir" | $EGREP -v '(^total|testsuite.log$)' >> "$before"
+ls -lR "$prefix" | $EGREP -v '(^total|testsuite.log$)' >> "$before"
force_dry_run=:
LT_AT_MAKE([uninstall])
ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$after"
-ls -lR "$prefixdir" | $EGREP -v '(^total|testsuite.log$)' >> "$after"
+ls -lR "$prefix" | $EGREP -v '(^total|testsuite.log$)' >> "$after"
AT_CHECK([cmp "$before" "$after"], 0, [ignore])
# Now really uninstall
diff --git a/tests/tagdemo.at b/tests/tagdemo.at
index ad2172b2..d3804cfc 100644
--- a/tests/tagdemo.at
+++ b/tests/tagdemo.at
@@ -327,7 +327,7 @@ barbaz::baz is ok!
convenience is ok!
]])
-prefixdir=`pwd`/_inst
+prefix=`pwd`/_inst
]) # _LT_SETUP
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 393be122..76ed722d 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -177,7 +177,8 @@ AT_KEYWORDS([autoconf automake])
# additional OPTIONS.
m4_define([LT_AT_CONFIGURE],
[AT_CHECK([: ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; ]dnl
- [$CONFIG_SHELL m4_default([$2], [./configure]) $configure_options $1],
+ [$CONFIG_SHELL m4_default([$2], [./configure]) $configure_options ]dnl
+ [--prefix="$prefix" --exec-prefix="$prefix" --bindir="$prefix/bin" --libdir="$prefix/lib" $1],
[0], [ignore], [ignore])
])
@@ -228,8 +229,7 @@ m4_define([LT_AT_CHECK],
# Bootstrap and configure the project, and check each GREP-EXPRESSION
# works on the resulting libtool script.
m4_define([LT_AT_CHECK_CONFIG],
-[LT_AT_BOOTSTRAP([], [-I m4], [], [--add-missing], [],
- [--prefix="$prefixdir" $1], [ignore])
+[LT_AT_BOOTSTRAP([], [-I m4], [], [--add-missing], [], [$1], [ignore])
m4_if([$#], 0, [],
[$#], 1, [], [$0_(m4_shift($@))])
])
@@ -259,7 +259,7 @@ m4_if([$#], 1, [], [$0(m4_shift($@))])
m4_define([LT_AT_CHECK_UNINSTALL],
[LT_AT_MAKE([uninstall])
-leftovers=`find $prefixdir ! -type d ! -name '.*' -print`
+leftovers=`find $prefix ! -type d ! -name '.*' -print`
AT_CHECK([test -z "$leftovers"])
])