[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HEAD: cross-compile test new testsuite
From: |
Ralf Wildenhues |
Subject: |
Re: HEAD: cross-compile test new testsuite |
Date: |
Sun, 2 Oct 2005 11:46:55 +0200 |
User-agent: |
Mutt/1.5.9i |
* Ralf Wildenhues wrote on Mon, Sep 26, 2005 at 09:18:08PM CEST:
>
> OK to apply to HEAD?
OK, that patch was alright, but here's a larger testsuite update
instead, to fix some of the outstanding glitches:
- `command || exit 1' fixed
- `test -f $some_output || $make_that_output` is unnecessary:
all the test dirs are clean before use, so just run the commands
unconditionally.
- cross-compilation fixed
- installcheck should not use _lt_pkgdatadir (which would use the
uninstalled macros and libltdl files)
All in all, the patch below is large but pretty trivial.
Outstanding:
- LT_AT_MAKE isn't completely portable yet, but I'd like to test on
broken make's before fixing that (and maybe parameterizing it on
broken `make'). At least we need to fix it in one place only now.
- Much less changes needed once I've written a decent
[LT_]AT_EXPAND_CHECK which will output its shell-expanded command
line.
- Should we change TESTSUITE_FLAGS to be TESTSUITEFLAGS in accordance
with the Autoconf manual?
OK to apply to HEAD as a whole?
Gary, FYI, one of the bugs in your proposed test for my observed
failures was that `autoreconf' wasn't getting _lt_pkgdatadir set
correctly (not the only buglet though).
Cheers,
Ralf
* Makefile.am (BUILDCHECK_ENVIRONMENT)
(INSTALLCHECK_ENVIRONMENT): New macros.
(check-local, installcheck-local): Use them.
* tests/testsuite.at (PREPARE_TESTS): Extract host_alias, ECHO.
Set configure_options appropriately.
(LT_AT_CONFIGURE, LT_AT_AUTORECONF, LT_AT_MAKE): New macros.
(LT_AT_BOOTSTRAP): Use them.
* tests/am-subdir.at, tests/early-libtool.at,
tests/old-m4-iface.at, tests/standalone.at: Likewise.
* tests/link-order.test: Do not extract ECHO any more.
Index: Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/Makefile.am,v
retrieving revision 1.168
diff -u -r1.168 Makefile.am
--- Makefile.am 30 Sep 2005 16:00:21 -0000 1.168
+++ Makefile.am 2 Oct 2005 09:19:02 -0000
@@ -492,6 +492,9 @@
FC="$(FC)" FCFLAGS="$(FCFLAGS)" \
GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)"
+BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)"
+INSTALLCHECK_ENVIRONMENT =
+
check-recursive: $(srcdir)/$(TESTSUITE)
# Use `$(srcdir)' for the benefit of non-GNU makes: this is
@@ -520,12 +523,12 @@
# Hook the test suite into the check rule
check-local: tests/atconfig $(srcdir)/$(TESTSUITE)
$(CD_TESTDIR); \
- $(TESTS_ENVIRONMENT) $(SHELL) $$abs_srcdir/$(TESTSUITE)
$(TESTSUITE_FLAGS)
+ $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) $(SHELL)
$$abs_srcdir/$(TESTSUITE) $(TESTSUITE_FLAGS)
# Run the test suite on the *installed* tree.
installcheck-local:
$(CD_TESTDIR); \
- $(TESTS_ENVIRONMENT) $(SHELL) $$abs_srcdir/$(TESTSUITE)
$(TESTSUITE_FLAGS) AUTOTEST_PATH=$(exec_prefix)/bin
+ $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(SHELL)
$$abs_srcdir/$(TESTSUITE) $(TESTSUITE_FLAGS) AUTOTEST_PATH=$(exec_prefix)/bin
# We need to remove any file droppings left behind by testsuite
clean-local: clean-local-legacy
Index: tests/testsuite.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/testsuite.at,v
retrieving revision 1.22
diff -u -r1.22 testsuite.at
--- tests/testsuite.at 30 Sep 2005 16:00:23 -0000 1.22
+++ tests/testsuite.at 2 Oct 2005 09:32:08 -0000
@@ -24,17 +24,23 @@
: ${ACLOCAL=aclocal}
: ${AUTOHEADER=autoheader}
: ${AUTOCONF=autoconf}
+: ${AUTOMAKE=automake}
: ${AUTORECONF=autoreconf}
-export LIBTOOLIZE LIBTOOL ACLOCAL AUTOHEADER AUTOCONF AUTORECONF
+export LIBTOOLIZE LIBTOOL ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF
macrodir="$abs_top_srcdir/libltdl/m4"
eval `$LIBTOOL --config | grep ^EGREP=`
-eval `$LIBTOOL --config | $EGREP '^(host|host_os|build)='`
+eval `$LIBTOOL --config | $EGREP '^(host|host_os|host_alias|build|ECHO)='`
+configure_options=
+if test -n "$host_alias"; then
+ configure_options="--host $host_alias"
+fi
m4_divert_pop([PREPARE_TESTS])dnl
+
# LT_AT_LIBTOOLIZE([ARGS])
# ------------------------
m4_define([LT_AT_LIBTOOLIZE],
-[_lt_pkgdatadir="$abs_top_srcdir" "$LIBTOOLIZE" $1
+[$LIBTOOLIZE $1
])
@@ -46,14 +52,47 @@
])
+# LT_AT_ACLOCAL([OPTIONS])
+# --------------------------
+m4_define([LT_AT_ACLOCAL],
+[AT_CHECK([$ACLOCAL $1], [0], [ignore], [ignore])
+])
+
+
+# LT_AT_AUTOCONF([OPTIONS])
+# --------------------------
+m4_define([LT_AT_AUTOCONF],
+[AT_CHECK([$AUTOCONF $1], [0], [ignore], [ignore])
+])
+
+
+# LT_AT_AUTORECONF([OPTIONS])
+# --------------------------
+m4_define([LT_AT_AUTORECONF],
+[AT_CHECK([$AUTORECONF $1], [0], [ignore], [ignore])
+])
+
+
+# LT_AT_CONFIGURE([OPTIONS])
+# --------------------------
+m4_define([LT_AT_CONFIGURE],
+[AT_CHECK([./configure $configure_options $1], [0], [ignore], [ignore])
+])
+
+
+# LT_AT_MAKE([TGTS], [VARS])
+# --------------------------
+m4_define([LT_AT_MAKE],
+[AT_CHECK([$2 $MAKE $1], [0], [ignore], [ignore])
+])
+
+
# LT_AT_BOOTSTRAP
# ---------------
m4_define([LT_AT_BOOTSTRAP],
-[
-test -f ./ltmain.sh || LT_AT_LIBTOOLIZE([--copy])
-test -f ./configure || _lt_pkgdatadir="$abs_top_srcdir" ${AUTORECONF} --force
--verbose --install || exit 1
-test -f ./configure || exit 1
-./configure
+[LT_AT_LIBTOOLIZE([--copy])
+LT_AT_AUTORECONF([--force --verbose --install])
+LT_AT_CONFIGURE
])
Index: tests/am-subdir.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/am-subdir.at,v
retrieving revision 1.6
diff -u -r1.6 am-subdir.at
--- tests/am-subdir.at 12 Sep 2005 16:24:38 -0000 1.6
+++ tests/am-subdir.at 2 Oct 2005 09:19:08 -0000
@@ -74,7 +74,7 @@
]])
LT_AT_BOOTSTRAP
-"${MAKE-make}"
+LT_AT_MAKE
LT_AT_EXEC_CHECK([subdir/subdemo], 0, expout)
AT_CLEANUP
@@ -149,7 +149,7 @@
]])
LT_AT_BOOTSTRAP
-"${MAKE-make}"
+LT_AT_MAKE
LT_AT_EXEC_CHECK([subdir/subdemo], 0)
AT_CLEANUP
Index: tests/early-libtool.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/early-libtool.at,v
retrieving revision 1.5
diff -u -r1.5 early-libtool.at
--- tests/early-libtool.at 29 Sep 2005 18:00:06 -0000 1.5
+++ tests/early-libtool.at 2 Oct 2005 09:19:08 -0000
@@ -102,11 +102,11 @@
_EOF
chmod a+x missing
-test -f ltmain.sh || LT_AT_LIBTOOLIZE([--copy --verbose --install])
-test -f aclocal.m4 || $ACLOCAL -I m4 || exit 1
-test -f configure || $AUTOCONF --force || exit 1
-test -f Makefile || ./configure || exit 1
-${MAKE-make}
+LT_AT_LIBTOOLIZE([--copy --verbose --install])
+LT_AT_ACLOCAL([-I m4])
+LT_AT_AUTOCONF([--force])
+LT_AT_CONFIGURE
+LT_AT_MAKE
LT_AT_EXEC_CHECK([./hell], [0], [expout])
@@ -206,11 +206,11 @@
_EOF
chmod a+x missing
-test -f ltmain.sh || LT_AT_LIBTOOLIZE([--copy --verbose --install])
-test -f aclocal.m4 || $ACLOCAL -I m4 || exit 1
-test -f configure || $AUTOCONF --force || exit 1
-test -f Makefile || ./configure || exit 1
-${MAKE-make}
+LT_AT_LIBTOOLIZE([--copy --verbose --install])
+LT_AT_ACLOCAL([-I m4])
+LT_AT_AUTOCONF([--force])
+LT_AT_CONFIGURE
+LT_AT_MAKE
LT_AT_EXEC_CHECK([./hell], [0], [expout])
Index: tests/link-order.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/link-order.at,v
retrieving revision 1.6
diff -u -r1.6 link-order.at
--- tests/link-order.at 23 Sep 2005 16:48:14 -0000 1.6
+++ tests/link-order.at 2 Oct 2005 09:19:08 -0000
@@ -19,7 +19,6 @@
# link-order.test - make sure that library linking order matches
AT_SETUP([Link order test.])
-eval `$LIBTOOL --config | grep ECHO=`
LDFLAGS="$LDFLAGS -no-undefined"
prefix_old=`pwd`/old
Index: tests/old-m4-iface.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/old-m4-iface.at,v
retrieving revision 1.3
diff -u -r1.3 old-m4-iface.at
--- tests/old-m4-iface.at 2 Oct 2005 08:54:03 -0000 1.3
+++ tests/old-m4-iface.at 2 Oct 2005 09:19:08 -0000
@@ -67,7 +67,7 @@
}
]])
-test -f ltmain.sh || LT_AT_LIBTOOLIZE([--install])
+LT_AT_LIBTOOLIZE([--install])
# This is slightly bogus, since only libtool.m4 was required in aclocal.m4
# with libtool-1.5x...
@@ -76,9 +76,9 @@
"$macrodir/ltsugar.m4" "$macrodir/ltversion.m4" > aclocal.m4 \
|| exit 1
-test -f configure || $AUTOCONF --force || exit 1
-test -f Makefile || ./configure || exit 1
-${MAKE-make}
+LT_AT_AUTOCONF([--force])
+LT_AT_CONFIGURE
+LT_AT_MAKE
LT_AT_EXEC_CHECK([./old], 0, [Hello, World!])
@@ -183,11 +183,11 @@
]])
touch config.h.in # bug in current ltdl.m4
-test -f ltmain.sh || LT_AT_LIBTOOLIZE([--ltdl --install])
-test -f aclocal.m4 || $ACLOCAL -I libltdl/m4 || exit 1
-test -f configure || $AUTOCONF --force || exit 1
-test -f Makefile || ./configure || exit 1
-${MAKE-make}
+LT_AT_LIBTOOLIZE([--ltdl --install])
+LT_AT_ACLOCAL([-I libltdl/m4])
+LT_AT_AUTOCONF([--force])
+LT_AT_CONFIGURE
+LT_AT_MAKE
LT_AT_EXEC_CHECK([./old], 0, [bar])
Index: tests/standalone.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/standalone.at,v
retrieving revision 1.3
diff -u -r1.3 standalone.at
--- tests/standalone.at 26 Aug 2005 10:00:18 -0000 1.3
+++ tests/standalone.at 2 Oct 2005 09:19:08 -0000
@@ -26,8 +26,8 @@
AT_SETUP([compiling softlinked libltdl])
LT_AT_LIBTOOLIZE([--ltdl=.])
-./configure
-${MAKE-make}
+LT_AT_CONFIGURE
+LT_AT_MAKE
AT_CHECK([test -f libltdlc.la])
@@ -41,8 +41,8 @@
AT_SETUP([compiling copied libltdl])
LT_AT_LIBTOOLIZE([--copy --ltdl=.])
-./configure
-${MAKE-make}
+LT_AT_CONFIGURE
+LT_AT_MAKE
AT_CHECK([test -f libltdlc.la])
@@ -58,8 +58,8 @@
prefix=`pwd`/_inst
LT_AT_LIBTOOLIZE([--copy --ltdl=.])
-./configure --enable-ltdl-install --prefix=$prefix
-${MAKE-make} all install
+LT_AT_CONFIGURE([--enable-ltdl-install --prefix=$prefix])
+LT_AT_MAKE([all install])
AT_CHECK([test -f $prefix/lib/libltdl.la])
AT_CHECK([test -f $prefix/include/ltdl.h])
@@ -135,7 +135,7 @@
all: $(TARGETS)
$(LIBTOOL) libltdl/libltdlc.la:
- cd libltdl && ./configure && $(MAKE)
+ cd libltdl && ./configure $(CONFIGURE_OPTIONS) && $(MAKE)
ltdldemo$(EXEEXT): $(LIBTOOL) module.la libltdl/libltdlc.la main.lo
$(LTLINK) -o ltdldemo main.lo -dlopen module.la ./libltdl/libltdlc.la
@@ -151,8 +151,9 @@
]])
LT_AT_LIBTOOLIZE([--copy --ltdl])
-${MAKE-make} CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" \
- CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
+LT_AT_MAKE([], [CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" \
+ CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
+ CONFIGURE_OPTIONS="$configure_options"])
LT_AT_EXEC_CHECK([./ltdldemo], 0, [ignore])
- Re: HEAD: cross-compile test new testsuite,
Ralf Wildenhues <=
- Re: HEAD: cross-compile test new testsuite, Ralf Wildenhues, 2005/10/05
- Re: HEAD: cross-compile test new testsuite, Gary V. Vaughan, 2005/10/05
- Re: HEAD: cross-compile test new testsuite, Ralf Wildenhues, 2005/10/05
- Re: HEAD: cross-compile test new testsuite, Gary V. Vaughan, 2005/10/05
- Re: HEAD: cross-compile test new testsuite, Gary V. Vaughan, 2005/10/05
- more useful installcheck (was: HEAD: cross-compile test new testsuite), Ralf Wildenhues, 2005/10/06
- Re: more useful installcheck, Gary V. Vaughan, 2005/10/07
- Re: more useful installcheck, Ralf Wildenhues, 2005/10/07
- Re: HEAD: cross-compile test new testsuite, Ralf Wildenhues, 2005/10/05
- Re: HEAD: cross-compile test new testsuite, Gary V. Vaughan, 2005/10/05