mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-24 14:24:59 +08:00
Introduce a new test keyword `recursive' for tests that create a
modified `libtool' script and run the suite on this script. All tests with the keyword `libtool' are (by definition) suitable to be used here. * tests/cmdline_wrap.at: New test. * Makefile.am: Adjust. * tests/testsuite.at (LT_ESCAPE): New macro: clone of Autoconf AS_ESCAPE that does not escape `$'. (LT_AT_CHECK): New macro: print a command-to-be-run while expanding parameters but nothing else. * tests/stresstest.at: Use LT_AT_CHECK. Create some files to expose erroneous globbing errors with `-export-symbols-regex', similar to those reported by Charles Wilson. Use `eval' and adjusted quoting so the expansion doesn't already happen in the testsuite commands. * HACKING: Update.
This commit is contained in:
parent
baf8599e6f
commit
d1d4262854
20
ChangeLog
20
ChangeLog
@ -1,3 +1,23 @@
|
||||
2007-01-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
Introduce a new test keyword `recursive' for tests that create a
|
||||
modified `libtool' script and run the suite on this script. All
|
||||
tests with the keyword `libtool' are (by definition) suitable to
|
||||
be used here.
|
||||
|
||||
* tests/cmdline_wrap.at: New test.
|
||||
* Makefile.am: Adjust.
|
||||
* tests/testsuite.at (LT_ESCAPE): New macro: clone of Autoconf
|
||||
AS_ESCAPE that does not escape `$'.
|
||||
(LT_AT_CHECK): New macro: print a command-to-be-run while
|
||||
expanding parameters but nothing else.
|
||||
* tests/stresstest.at: Use LT_AT_CHECK. Create some files to
|
||||
expose erroneous globbing errors with `-export-symbols-regex',
|
||||
similar to those reported by Charles Wilson. Use `eval' and
|
||||
adjusted quoting so the expansion doesn't already happen in the
|
||||
testsuite commands.
|
||||
* HACKING: Update.
|
||||
|
||||
2007-01-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
Assume C89 for included headers, and throughout the testsuite.
|
||||
|
17
HACKING
17
HACKING
@ -57,13 +57,14 @@ and is not part of a release distribution.
|
||||
liberally, on as many platforms as you can. Use as many compilers and
|
||||
linkers you can.
|
||||
|
||||
* The new Autotest testsuite uses several keywords, to denote that the
|
||||
test
|
||||
- needs Autoconf autoconf
|
||||
- needs Automake automake
|
||||
- exercises the `libtool' script libtool
|
||||
- exercises the `libtoolize' script libtoolize
|
||||
- exercises a language other than C CXX F77 FC GCJ
|
||||
* The new Autotest testsuite uses keywords to denote test features:
|
||||
autoconf needs Autoconf
|
||||
automake needs Automake
|
||||
libtool exercises the `libtool' script
|
||||
libtoolize exercises the `libtoolize' script
|
||||
recursive runs the suite recursively, with a modified
|
||||
`libtool' script and with `-k libtool'
|
||||
CXX F77 FC GCJ exercises a language other than C
|
||||
|
||||
|
||||
4. Naming
|
||||
@ -613,7 +614,7 @@ output of any failed test groups, and the output from `./libtool --config.'
|
||||
|
||||
|
||||
--
|
||||
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
The canonical source of this file is maintained with the
|
||||
GNU Libtool package. Report bugs to bug-libtool@gnu.org.
|
||||
|
@ -418,7 +418,8 @@ TESTSUITE_AT = tests/testsuite.at \
|
||||
tests/template.at \
|
||||
tests/early-libtool.at \
|
||||
tests/deplibs-ident.at \
|
||||
tests/stresstest.at
|
||||
tests/stresstest.at \
|
||||
tests/cmdline_wrap.at
|
||||
|
||||
EXTRA_DIST += $(srcdir)/$(TESTSUITE) $(TESTSUITE_AT) $(srcdir)/tests/package.m4
|
||||
|
||||
|
37
tests/cmdline_wrap.at
Normal file
37
tests/cmdline_wrap.at
Normal file
@ -0,0 +1,37 @@
|
||||
# Hand crafted tests for GNU Libtool. -*- Autotest -*-
|
||||
# Copyright 2007 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# cmdline_wrap.test - make sure libtool works when it needs to wrap
|
||||
# command lines. We simulate this by setting max_cmd_len very low.
|
||||
|
||||
AT_SETUP([Run tests with low max_cmd_len])
|
||||
AT_KEYWORDS([recursive])
|
||||
AT_CAPTURE_FILE([testsuite.log])
|
||||
|
||||
sed 's,max_cmd_len=.*,max_cmd_len="24",' < $LIBTOOL > libtool
|
||||
chmod +x libtool
|
||||
LIBTOOL=`pwd`/libtool
|
||||
export LIBTOOL
|
||||
# run the suite in a subdirectory, otherwise the two suites will compete
|
||||
# for the output file `testsuite.log'.
|
||||
mkdir tests
|
||||
cd tests
|
||||
AT_CHECK([$CONFIG_SHELL $abs_srcdir/testsuite -k libtool $INNER_TESTSUITEFLAGS],
|
||||
[], [ignore], [ignore])
|
||||
|
||||
AT_CLEANUP
|
@ -1,5 +1,5 @@
|
||||
# Hand crafted tests for GNU Libtool. -*- Autotest -*-
|
||||
# Copyright 2005 Free Software Foundation, Inc.
|
||||
# Copyright 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -22,8 +22,8 @@
|
||||
# Note: This test is experimental, and might be too strict for some systems.
|
||||
|
||||
AT_BANNER([Libtool stress test.])
|
||||
AT_KEYWORDS([libtool])
|
||||
AT_SETUP([Link option thorough search test])
|
||||
AT_KEYWORDS([libtool])
|
||||
eval `$LIBTOOL --config | $EGREP '^(CC|objdir|allow_undefined_flag)='`
|
||||
|
||||
mkdir sub sub2 sub3 2>/dev/null
|
||||
@ -205,25 +205,28 @@ case $allow_undefined_flag in
|
||||
*) undef_opts='"" -no-undefined' ;;
|
||||
esac
|
||||
|
||||
# expose problems with the regex:
|
||||
touch vfoo v.bar
|
||||
|
||||
for l1 in $undef_opts
|
||||
do
|
||||
for l2 in '' '-export-symbols-regex v.*' '-export-symbols asyms'
|
||||
for l2 in '' '-export-symbols-regex "v.*"' '-export-symbols asyms'
|
||||
do
|
||||
for l3 in '' '-rpath /nonexistent'
|
||||
do
|
||||
linkargs="$l1 $l2 $l3"
|
||||
for rel in '' ./ `pwd`/
|
||||
do
|
||||
AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o "$rel"sub2/liba.la "$rel"sub/a.lo $linkargs],
|
||||
LT_AT_CHECK([eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o "$rel"sub2/liba.la "$rel"sub/a.lo' $linkargs],
|
||||
[0],[ignore],[ignore])
|
||||
for st in '' '-static'
|
||||
do
|
||||
AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main "$rel"main.lo "$rel"sub2/liba.la],
|
||||
LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main "$rel"main.lo "$rel"sub2/liba.la],
|
||||
[0],[ignore],[ignore])
|
||||
LT_AT_EXEC_CHECK([./main],[0])
|
||||
for l10 in '' '-export-symbols dlselfsyms'
|
||||
do
|
||||
AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"sub3/dlself "$rel"sub3/dlself.lo "$rel"sub2/liba.la sub/b.lo -dlopen self $l10],
|
||||
LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"sub3/dlself "$rel"sub3/dlself.lo "$rel"sub2/liba.la sub/b.lo -dlopen self $l10],
|
||||
[0],[ignore],[ignore])
|
||||
LT_AT_EXEC_CHECK([./sub3/dlself],[0])
|
||||
done
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Process with autom4te to create an -*- Autotest -*- test suite.
|
||||
|
||||
# Test suite for GNU Libtool.
|
||||
# Copyright 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# Copyright 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -139,6 +139,22 @@ m4_if([$7], [ignore], [], [LT_AT_MAKE([$7])])
|
||||
])
|
||||
|
||||
|
||||
# LT_ESCAPE(ARG)
|
||||
# --------------
|
||||
# Escape command for output (expand only parameters).
|
||||
m4_define([LT_ESCAPE],
|
||||
[m4_bpatsubst([$1],
|
||||
m4_dquote(m4_default([$2], [\"`])),
|
||||
[\\\&])])
|
||||
|
||||
|
||||
# LT_AT_CHECK
|
||||
# -----------
|
||||
# Wrapper around AT_CHECK that outputs the command first, with
|
||||
# parameters expanded.
|
||||
m4_define([LT_AT_CHECK],
|
||||
[echo "LT_ESCAPE([$1])"; AT_CHECK($@)])
|
||||
|
||||
# LT_AT_EXEC_CHECK(EXECUTABLE, [STATUS = 0], [STDOUT], [STDERR])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([LT_AT_EXEC_CHECK],
|
||||
|
Loading…
Reference in New Issue
Block a user