diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-04-23 15:51:25 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-04-23 15:51:25 +0200 |
commit | f357bed82aed91aa3eef5e157df4814c7fc26028 (patch) | |
tree | 83ac18b7edea9e1a8c75c0427db1ae300741b4b3 | |
parent | 509b231118fff35e8f5dbfa797218265e8bc6acc (diff) | |
download | automake-f357bed82aed91aa3eef5e157df4814c7fc26028.tar.gz |
tests: cater to systems installing libs in /lib64
See automake bug#11302.
On at least OpenSUSE 12.1, "make install" will install libraries in
the '${prefix}/lib64' directory by default. This is due to the
$CONFIG_SITE set by /etc/profile.d/site.sh, which sets a libdir
that ends in '/lib64' rather than '/lib' if it finds that the compiler
is generating 64-bit code. This behaviour was causing some spurious
failures in our testsuite. Fix them.
* t/posixsubst-libraries.sh: Assume the libraries are installed in
'$(libdir)' rather than in '$(prefix)/lib'.
* t/posixsubst-ltlibraries.sh: Likewise.
* t/posixsubst-scripts.sh: Similarly, don't assume that '$(bindir)',
'$(sbindir)' and '$(libexedir)' always defaults to respectively
'$(prefix)/bin', '$(prefix)/sbin' and '$(prefix)/libexec'.
* t/transform3.test: Likewise.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
-rwxr-xr-x | t/posixsubst-libraries.sh | 8 | ||||
-rwxr-xr-x | t/posixsubst-ltlibraries.sh | 8 | ||||
-rwxr-xr-x | t/posixsubst-scripts.sh | 22 | ||||
-rwxr-xr-x | t/transform3.sh | 41 |
4 files changed, 42 insertions, 37 deletions
diff --git a/t/posixsubst-libraries.sh b/t/posixsubst-libraries.sh index 8e6b26521..f437571b9 100755 --- a/t/posixsubst-libraries.sh +++ b/t/posixsubst-libraries.sh @@ -41,10 +41,10 @@ libbar.c: CLEANFILES = libbar.c # For FreeBSD make. installcheck-local: - ls -l $(prefix)/lib - test -f $(prefix)/lib/libfoo1.a - test -f $(prefix)/lib/libfoo2.a - test -f $(prefix)/lib/libbar.a + ls -l $(libdir) + test -f $(libdir)/libfoo1.a + test -f $(libdir)/libfoo2.a + test -f $(libdir)/libbar.a END echo 'int bar1(void) { return 0; }' > libfoo1.c diff --git a/t/posixsubst-ltlibraries.sh b/t/posixsubst-ltlibraries.sh index 6a4cbd551..b4b2a925d 100755 --- a/t/posixsubst-ltlibraries.sh +++ b/t/posixsubst-ltlibraries.sh @@ -41,10 +41,10 @@ libbar.c: CLEANFILES = libbar.c # For FreeBSD make. installcheck-local: - ls -l $(prefix)/lib - test -f $(prefix)/lib/libfoo1.la - test -f $(prefix)/lib/libfoo2.la - test -f $(prefix)/lib/libbar.la + ls -l $(libdir) + test -f $(libdir)/libfoo1.la + test -f $(libdir)/libfoo2.la + test -f $(libdir)/libbar.la END echo 'int bar1(void) { return 0; }' > libfoo1.c diff --git a/t/posixsubst-scripts.sh b/t/posixsubst-scripts.sh index 934b82eb4..cda515fb5 100755 --- a/t/posixsubst-scripts.sh +++ b/t/posixsubst-scripts.sh @@ -65,17 +65,17 @@ test2: distdir test ! -r $(distdir)/quux.pl installcheck-local: - ls -l $(prefix)/libexec $(prefix)/bin $(prefix)/sbin - test -f $(prefix)/sbin/foo1.sh - test -x $(prefix)/sbin/foo1.sh - test -f $(prefix)/sbin/foo2.sh - test -x $(prefix)/sbin/foo2.sh - test -f $(prefix)/libexec/bar1 - test -x $(prefix)/libexec/bar1 - test -f $(prefix)/libexec/bar2 - test -x $(prefix)/libexec/bar2 - test -f $(prefix)/bin/quux.pl - test -x $(prefix)/bin/quux.pl + ls -l $(libexecdir) $(bindir) $(sbindir) + test -f $(sbindir)/foo1.sh + test -x $(sbindir)/foo1.sh + test -f $(sbindir)/foo2.sh + test -x $(sbindir)/foo2.sh + test -f $(libexecdir)/bar1 + test -x $(libexecdir)/bar1 + test -f $(libexecdir)/bar2 + test -x $(libexecdir)/bar2 + test -f $(bindir)/quux.pl + test -x $(bindir)/quux.pl END cat > foo1.sh <<'END' diff --git a/t/transform3.sh b/t/transform3.sh index aaa69cb8e..6f1b81179 100755 --- a/t/transform3.sh +++ b/t/transform3.sh @@ -35,6 +35,27 @@ bin_SCRIPTS = foo pkgdata_DATA = bar.txt pkglib_LIBRARIES = libzap.a pkglibexec_SCRIPTS = mu + +test-install: install + find $(prefix) ;: For debugging. + test -f $(bindir)/gnu-foo + test -x $(bindir)/gnu-foo + test -f $(datadir)/foo/bar.txt + test ! -d $(datadir)/gnu-foo + test -f $(libdir)/foo/libzap.a + test ! -d $(libdir)/gnu-foo + test -f $(libexecdir)/foo/gnu-mu + test -x $(libexecdir)/foo/gnu-mu + test ! -d $(libexecdir)/gnu-foo + +test-installdirs: installdirs + find $(prefix) ;: For debugging. + test -d $(datadir)/foo + test ! -d $(datadir)/gnu-foo + test -d $(libdir)/foo + test ! -d $(libdir)/gnu-foo + test -d $(libexecdir)/foo + test ! -d $(libexecdir)/gnu-foo END cat > libzap.c <<'END' @@ -59,29 +80,13 @@ $AUTOMAKE -a ./configure --program-prefix=gnu- --prefix "`pwd`/inst" -$MAKE install -find inst # For debugging. -test -f inst/bin/gnu-foo -test -x inst/bin/gnu-foo -test -f inst/share/foo/bar.txt -test ! -d inst/share/gnu-foo -test -f inst/lib/foo/libzap.a -test ! -d inst/lib/gnu-foo -test -f inst/libexec/foo/gnu-mu -test -x inst/libexec/foo/gnu-mu -test ! -d inst/libexec/gnu-foo +$MAKE test-install $MAKE uninstall test `find inst -type f -print | wc -l` = 0 # Opportunistically test for installdirs. rm -rf inst -$MAKE installdirs -test -d inst/share/foo -test ! -d inst/share/gnu-foo -test -d inst/lib/foo -test ! -d inst/lib/gnu-foo -test -d inst/libexec/foo -test ! -d inst/libexec/gnu-foo +$MAKE test-installdirs : |