OK to apply this bunch of testsuite trivia (as one patch maybe)? Rationale, where applicable (and one question):
- tst_aclocaldir is used in addition to _lt_pkgdatadir, so we don't interfere with the setting for the libtoolize script. - The use of AC_LIBTOOL_DLOPEN is a workaround: without it, the tests fail on AIX (tested without -brtl). Fixing that is not too important, I guess; real-world would always use it. - The AIX linker barfs upon creation of a module without any exported symbols. Not very likely to happen in real-life. :) - I needed an AT_TESTED emulation that does not fail. This one XFAILs for the autotools used, rather than SKIPs -- should I change that? With this in place, and the aforementioned lt~obsolete.m4 workaround in place, for the automake-1.7 installed on an AIX system, and no -brtl, I get one failure (test 12; due to broken gcj installation) and three skips (subproject tests, due to newer automake needed). No changes in the old testsuite (mdemo-exec failures for non-brtl but not for brtl). There are probably more bits coming later.. Cheers, Ralf * tests/deplibs-ident.at [ aix ]: No unexpected failure here. * Makefile.am (BUILDCHECK_ENVIRONMENT, INSTALLCHECK_ENVIRONMENT) Pass tst_aclocaldir for installcheck. * tests/libtoolize.at: Use it. * tests/libtoolize.at: Fix for distcheck (readonly sources). * tests/nonrecursive.at: Set foo_la_SOURCES, for automake-1.7. * tests/nonrecursive.at, tests/recursive.at, tests/subproject.at (foo.c): Actually export a symbol, for AIX. * tests/old-m4-iface.at: Use AC_LIBTOOL_DLOPEN, for AIX. * tests/subproject.at: Require automake-1.9, we use indirect subdirs. * tests/testsuite.at (LT_AT_AUTOMAKE): Skip if we detect failure due to old version. (PREPARE_TESTS): Set autotool variables to `no' if not present. (LT_AT_ACLOCAL, LT_AT_AUTOCONF, LT_AT_AUTOMAKE) (LT_AT_AUTOHEADER, LT_AT_AUTORECONF): Use to XFAIL tests. Reported by Tim Rice <[EMAIL PROTECTED]>. (LT_AT_MAKE): Do not use `make -e'. (_LTDL_PROJECT_FILES): Adjust sub-make call. Reported by Charles Wilson <[EMAIL PROTECTED]>. Index: tests/deplibs-ident.at =================================================================== RCS file: /cvsroot/libtool/libtool/tests/deplibs-ident.at,v retrieving revision 1.1 diff -u -r1.1 deplibs-ident.at --- tests/deplibs-ident.at 30 Sep 2005 16:00:23 -0000 1.1 +++ tests/deplibs-ident.at 8 Nov 2005 22:03:48 -0000 @@ -58,7 +58,8 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere], [0],[stdout],[ignore]) AT_CHECK([$EGREP 'cee.*cee' stdout], 1, [ignore], [ignore]) - AT_XFAIL_IF(:) dnl This is currently broken in libtool + AT_XFAIL_IF([case $host_os in aix*) false;; *):;; esac]) + dnl This is currently broken in libtool ) AT_CLEANUP Index: Makefile.am =================================================================== RCS file: /cvsroot/libtool/libtool/Makefile.am,v retrieving revision 1.177 diff -u -r1.177 Makefile.am --- Makefile.am 7 Nov 2005 14:16:14 -0000 1.177 +++ Makefile.am 8 Nov 2005 22:03:43 -0000 @@ -387,11 +387,14 @@ FC="$(FC)" FCFLAGS="$(FCFLAGS)" \ GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)" -BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \ +BUILDCHECK_ENVIRONMENT = \ + _lt_pkgdatadir="$(abs_top_srcdir)" \ + tst_aclocaldir="$(abs_top_srcdir)/$(m4dir)" \ LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \ LIBTOOL="$(abs_top_builddir)/libtool" INSTALLCHECK_ENVIRONMENT = \ + tst_aclocaldir="$(aclocaldir)" \ LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \ LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" Index: tests/libtoolize.at =================================================================== RCS file: /cvsroot/libtool/libtool/tests/libtoolize.at,v retrieving revision 1.5 diff -u -r1.5 libtoolize.at --- tests/libtoolize.at 1 Nov 2005 14:28:20 -0000 1.5 +++ tests/libtoolize.at 8 Nov 2005 22:03:48 -0000 @@ -38,6 +38,8 @@ test -d m4 || { rm -f m4 && mkdir m4; } +rm -f m4/libtool.m4 m4/ltoptions.m4 config/ltmain.sh + # This file should be upgraded. AT_DATA([m4/libtool.m4], [[ # serial 25 LT_INIT @@ -369,10 +371,10 @@ libtoolize: putting files in AC_CONFIG_AUX_DIR, \`config'. libtoolize: copying file \`config/ltmain.sh' libtoolize: You should add the contents of the following files to \`aclocal.m4': -libtoolize: \`$_lt_pkgdatadir/libltdl/m4/libtool.m4' -libtoolize: \`$_lt_pkgdatadir/libltdl/m4/ltoptions.m4' -libtoolize: \`$_lt_pkgdatadir/libltdl/m4/ltversion.m4' -libtoolize: \`$_lt_pkgdatadir/libltdl/m4/ltsugar.m4' +libtoolize: \`$tst_aclocaldir/libtool.m4' +libtoolize: \`$tst_aclocaldir/ltoptions.m4' +libtoolize: \`$tst_aclocaldir/ltversion.m4' +libtoolize: \`$tst_aclocaldir/ltsugar.m4' EOF] LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout) @@ -425,6 +427,8 @@ ## ------------------------------------------- ## LT_AT_ACLOCAL([-I m4]) + +rm -f m4/libtool.m4 m4/ltoptions.m4 # This file should be upgraded. AT_DATA([m4/libtool.m4], [[ Index: tests/nonrecursive.at =================================================================== RCS file: /cvsroot/libtool/libtool/tests/nonrecursive.at,v retrieving revision 1.1 diff -u -r1.1 nonrecursive.at --- tests/nonrecursive.at 2 Nov 2005 17:45:59 -0000 1.1 +++ tests/nonrecursive.at 8 Nov 2005 22:03:48 -0000 @@ -55,9 +55,10 @@ include libltdl/Makefile.inc foo_la_LDFLAGS = -module -avoid-version +foo_la_SOURCES = foo.c ]]) -echo 'static int dummy = 0;' > foo.c +echo 'int dummy = 0;' > foo.c ])# _LTDL_SETUP ## ------------------------ ## Index: tests/old-m4-iface.at =================================================================== RCS file: /cvsroot/libtool/libtool/tests/old-m4-iface.at,v retrieving revision 1.6 diff -u -r1.6 old-m4-iface.at --- tests/old-m4-iface.at 7 Nov 2005 15:37:11 -0000 1.6 +++ tests/old-m4-iface.at 8 Nov 2005 22:03:48 -0000 @@ -96,6 +96,7 @@ AT_DATA([configure.in], [[AC_INIT([main.c]) AC_PROG_MAKE_SET +AC_LIBTOOL_DLOPEN AM_PROG_LIBTOOL AC_WITH_LTDL AC_OUTPUT(Makefile) Index: tests/recursive.at =================================================================== RCS file: /cvsroot/libtool/libtool/tests/recursive.at,v retrieving revision 1.1 diff -u -r1.1 recursive.at --- tests/recursive.at 7 Nov 2005 14:16:15 -0000 1.1 +++ tests/recursive.at 8 Nov 2005 22:03:48 -0000 @@ -39,9 +39,10 @@ SUBDIRS = ltdl lib_LTLIBRARIES = foo.la foo_la_LDFLAGS = -module -avoid-version +foo_la_SOURCES = foo.c ]]) -echo 'static int dummy = 0;' > foo.c +echo 'int dummy = 0;' > foo.c ])# _LTDL_SETUP ## ------------------------ ## Index: tests/subproject.at =================================================================== RCS file: /cvsroot/libtool/libtool/tests/subproject.at,v retrieving revision 1.8 diff -u -r1.8 subproject.at --- tests/subproject.at 7 Nov 2005 15:37:11 -0000 1.8 +++ tests/subproject.at 8 Nov 2005 22:03:48 -0000 @@ -36,12 +36,13 @@ AT_DATA([Makefile.am], [[ACLOCAL_AMFLAGS = -I sub/ltdl/m4 +AUTOMAKE_OPTIONS = 1.9 SUBDIRS = sub/ltdl lib_LTLIBRARIES = foo.la foo_la_LDFLAGS = -module -avoid-version ]]) -echo 'static int dummy = 0;' > foo.c +echo 'int dummy = 0;' > foo.c ])# _LTDL_SETUP ## ------------------------ ## Index: tests/testsuite.at =================================================================== RCS file: /cvsroot/libtool/libtool/tests/testsuite.at,v retrieving revision 1.29 diff -u -r1.29 testsuite.at --- tests/testsuite.at 7 Nov 2005 15:37:11 -0000 1.29 +++ tests/testsuite.at 8 Nov 2005 22:42:38 -0000 @@ -24,6 +24,9 @@ : ${AUTOCONF=autoconf} : ${AUTOMAKE=automake} : ${AUTORECONF=autoreconf} +for tool in ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF; do + if eval \$$tool --version >/dev/null 2>&1; then :; else eval $tool=no; fi +done export ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF macrodir="$abs_top_srcdir/libltdl/m4" eval `$LIBTOOL --config | grep ^EGREP=` @@ -59,6 +62,7 @@ # -------------------------- m4_define([LT_AT_ACLOCAL], [AT_CHECK([$ACLOCAL $1], [0], [ignore], [ignore]) +AT_XFAIL_IF([test "$ACLOCAL" = no]) ]) @@ -66,13 +70,16 @@ # -------------------------- m4_define([LT_AT_AUTOCONF], [AT_CHECK([$AUTOCONF $1], [0], [ignore], [ignore]) +AT_XFAIL_IF([test "$AUTOCONF" = no]) ]) # LT_AT_AUTOMAKE([OPTIONS]) # -------------------------- m4_define([LT_AT_AUTOMAKE], -[AT_CHECK([$AUTOMAKE $1], [0], [ignore], [ignore]) +[AT_CHECK([$AUTOMAKE $1], [0], [ignore], [stderr], +[AT_CHECK([grep 'require Automake.*but have' stderr && (exit 77)], [1])]) +AT_XFAIL_IF([test "$AUTOMAKE" = no]) ]) @@ -80,6 +87,7 @@ # --------------------------- m4_define([LT_AT_AUTOHEADER], [AT_CHECK([$AUTOHEADER $1], [0], [ignore], [ignore]) +AT_XFAIL_IF([test "$AUTOHEADER" = no]) ]) @@ -87,6 +95,7 @@ # -------------------------- m4_define([LT_AT_AUTORECONF], [AT_CHECK([$AUTORECONF $1], [0], [ignore], [ignore]) +AT_XFAIL_IF([test "$AUTORECONF" = no]) ]) @@ -101,7 +110,7 @@ # -------------------------- m4_define([LT_AT_MAKE], [( $unset LIBTOOL LIBTOOLIZE - AT_CHECK([$2 $MAKE -e $1], [0], [ignore], [ignore]) ) + AT_CHECK([$MAKE $1 $2], [0], [ignore], [ignore]) ) ]) @@ -210,7 +219,9 @@ all: $(TARGETS) $(LIBTOOL) ]_ARG_DIR[/libltdlc.la: ]_ARG_DIR[/Makefile - cd ]_ARG_DIR[ && $(MAKE) + cd ]_ARG_DIR[ && $(MAKE) CC="$(CC)" LIBTOOLFLAGS="$(LIBTOOLFLAGS)" \ + CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ + CONFIGURE_OPTIONS="$(CONFIGURE_OPTIONS)" ]_ARG_DIR[/Makefile: cd ]_ARG_DIR[ && ./configure $(CONFIGURE_OPTIONS)