Commit Graph

524 Commits

Author SHA1 Message Date
Peter O'Gorman
3580cddcea Only use preopen loader to load preopened archives
* libltdl/ltdl.c: Limit checking of .a to preopen loader.
* tests/lt_dlopen_a.at: Add test.
* Makefile.am: Add test.
2009-11-15 20:49:55 -06:00
Dave Korn
6858ed03d8 Control where win32 DLLs get installed.
* libltdl/config/general.m4sh (func_normal_abspath): New function.
(func_relative_path): Likewise.
* libltdl/config/ltmain.m4sh (func_mode_help): Document "-bindir".
(func_mode_link): Accept new "-bindir" option and use it, if
supplied, to place Windows DLLs.
* tests/bindir.at: New file for install tests using "-bindir".
* Makefile.am (TESTSUITE_AT): Add bindir.at.
* doc/libtool.texi (Link Mode): Update documentation.
* NEWS, THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-12 08:23:03 +02:00
Ralf Wildenhues
1e4e1984b0 Fix and split recent testsuite addition for compile/link flags.
* tests/flags.at (passing flags through libtool): Split into ...
(passing CC flags through libtool)
(passing CXX flags through libtool)
(passing F77 flags through libtool)
(passing FC flags through libtool)
(passing GCJ flags through libtool): ... these five tests,
factorized with m4_foreach.  Fix F77 and FC compile and link
commands; add GCJ tag.  Use LT_AT_TAG to correctly skip tags
for which no compiler exists.  Use $EXEEXT where appropriate.
Drop unneeded use of reload_cmds.
Reports by Peter Rosin and Peter O'Gorman.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-08 20:02:57 +02:00
Peter O'Gorman
91697c2092 Fix redirect in test case.
tests/darwin.at: Fix stderr redirect.
2009-09-07 15:17:03 -05:00
Peter O'Gorman
4ad8b63bd1 Use darwin's -force_load flag if available for whole_archive_flag_spec
* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check for
-force_load and use it if there.
* tests/darwin.at: Add a simple test.
2009-09-07 00:41:58 -05:00
Ralf Wildenhues
2eb8c3e51f Testsuite keyword 'interactive' and check-* rules.
* Makefile.am (testsuite_deps, testsuite_deps_uninstalled):
New variables.
(check-local, installcheck-local): Use them.
(check-interactive, check-noninteractive): New rules.
* tests/link-order2.at (Link order of deplibs),
tests/static.at (static linking flags for programs): Add keyword
`interactive'.
* doc/libtool.texi (Test descriptions): Document all keywords
used in the Libtool test suite.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-06 19:38:06 +02:00
Ralf Wildenhues
0805518173 Fix failure test in the presence of --with-pic or -prefer-pic.
* tests/fail.at (Failure tests): Run non-PIC failure test only
if pic_mode is 'default' or 'no', rather than 'default' or 'yes'
and also -prefer-pic has not been passed in $CFLAGS.
* THANKS: Update.
Report by Donn Washburn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-06 12:42:34 +02:00
Ralf Wildenhues
8c35d79757 Add testsuite exposure for passing of compiler and linker flags.
* tests/flags.at (passing flags through libtool): New file, new
test, for bug fixed in previous commit.
* Makefile.am (TESTSUITE_AT): Add tests/flags.at.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-06 09:57:55 +02:00
Roumen Petrov
04329d8355 Fixup 'execute mode' test for w32.
* tests/execute-mode.at (execute mode): Add missing $EXEEXT.
(LDFLAGS): Add -no-undefined.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-07-25 11:32:26 +02:00
Ralf Wildenhues
2772d14559 Add versioning tests.
* tests/versioning.at (versioning): New file, new test.
* Makefile.am (TESTSUITE_AT): Adjust.
Prompted by bug report from Mike Gorchak.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-14 12:03:31 +02:00
Ralf Wildenhues
8a08afac5d Avoid spurious localization testsuite failure on HP-UX/ia64.
* tests/localization.at (localized compiler messages): Skip test
if the compiler warning output contains `locale', for HP-UX.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-14 11:35:59 +02:00
Ralf Wildenhues
b04fe8e6da Fix concurrent extraction of convenience libraries on Darwin.
* libltdl/m4/libtool.m4 (_LT_CMD_OLD_ARCHIVE): New libtool
variable `lock_old_archive_extraction', set to `yes' on darwin.
* doc/libtool.texi (libtool script contents): Document it.
* libltdl/config/ltmain.m4sh (func_extract_an_archive): Lock
`ar x' invocation if `lock_old_archive_extraction' is yes.
* tests/darwin.at (darwin concurrent library extraction): New
test.
* NEWS: Update.
Report by Akim Demaille.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-10 19:47:33 +02:00
Ralf Wildenhues
efe1cfec71 Fix testsuite failure of lt_dlopenadvise test on FreeMiNT.
* tests/lt_dladvise.at (lt_dlopenadvise library loading): Do not
build moddepend for systems without shared libraries.
Report by Alan Hourihane.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-07 16:35:45 +02:00
Ralf Wildenhues
f578833bb8 testsuite: avoid failures due to old Automake.
* tests/configure-iface.at (installable libltdl)
(--with-ltdl-include/lib, --with-included-ltdl):
Speficy libmodule_la_SOURCES in Makefile.am as the default
source file naming scheme changed in Automake 1.8.
* tests/nonrecursive.at (_LT_AT_LTDL_SETUP): Require Automake
1.9.6.
* THANKS: Update.
Report by Robert Garron.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-07 12:01:56 +02:00
Ralf Wildenhues
d812c6326b testsuite: add missing @LIBS@ in a link command line.
* tests/old-m4-iface.at (AC_WITH_LTDL): Use @LIBS@ when linking.
Report by Patrice Fromy.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-07 11:58:59 +02:00
Ralf Wildenhues
740565c4fd testsuite: cope when some installed libltdl.la has been removed.
* tests/old-m4-iface.at (AC_WITH_LTDL): Pass --with-included-ltdl
to configure, to ensure we do not accidentally link against a
previously installed libltdl.so where the corresponding .la
file has been removed, thus we do not add a run path, and the
runtime linker then fails to find libltdl.so.7.
* tests/configure-iface.at (--with-ltdl-include/lib): Remove -L
flags from LDFLAGS to avoid picking up an installed libltdl
outside of the default locations.
* THANKS: Update.
Prompted by report from Patrice Fromy.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-07 11:42:17 +02:00
Ralf Wildenhues
848215b440 Skip localization test when setlocale is not functional.
* tests/localization.at (localized compiler messages): Skip
test when there is a warning about `LC_ALL'.
* THANKS: Update.
Report by Maciej Helminiak.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-02 10:55:23 +02:00
Peter Rosin
b3072b0b37 LT_OUTPUT should always create the libtool script.
* libltdl/m4/libtool.m4 (LT_OUTPUT): Make LT_OUTPUT ignore the
--no-create configure option, and assume that the user wants
to use an up-to-date libtool script if the LT_OUTPUT macro is
present.
* tests/early-libtool.at: Make sure we do not regress.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-03-20 16:42:55 +01:00
Ralf Wildenhues
c1cd198697 Document INNER_TESTSUITEFLAGS, drop leading space.
* README: Document INNER_TESTSUITEFLAGS.
* tests/cmdline_wrap.at (Run tests with low max_cmd_len):
When using INNER_TESTSUITEFLAGS on the testsuite invocation,
drop leading space after "-k libtool", so that the user may
further limit the set of tests to be run.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-03-03 19:53:46 +01:00
Ralf Wildenhues
9e9ba5e0e2 Do not pass $INSTALL via TESTS_ENVIRONMENT.
* Makefile.am (TESTS_ENVIRONMENT): Set lt_INSTALL, not INSTALL,
so that a bogus relative path to the install-sh script in the
source tree is not propagated to the configure scripts of the
old test suite.
* tests/testsuite.at: Adjust.
* tests/install.at (Install tests): Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-02-16 21:59:34 +01:00
Ralf Wildenhues
77e1149984 New test for lt_dlopenext error message.
* tests/lt_dlopenext.at (lt_dlopenext error messages): New file,
with new test, with sources taken from the Autobook example.
* Makefile.am: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-02-03 08:15:36 +01:00
Ralf Wildenhues
5f24ee188d Fix sed script in install.at.
* tests/install.at (Install tests): Fix typo in sed script,
fixes test failure on HP-UX.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-02-01 15:42:44 +01:00
Ralf Wildenhues
6d08820f7c Fix $INSTALL in testsuite with relative path to install-sh.
* tests/testsuite.at: If `$INSTALL' points to in-tree
install-sh, override a possibly-relative path to it with an
absolute one.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-02-01 15:41:52 +01:00
Jeff Squyres
af91ea10b4 New test for bogus lt_dlopen error message.
* tests/lt_dlopen.at (lt_dlopen error messages): New file, new
test, marked as XFAIL for now.
* Makefile.am: Adjust.
Report and reproducible test case by Jeff Squyres.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-31 16:07:50 +01:00
Ralf Wildenhues
92a785fd7e execute mode: do not transform *.lo or *.la arguments.
* libltdl/config/ltmain.m4sh (func_mode_execute): Do not check
arguments matching *.lo or *.la for script wrappers.
* tests/execute-mode.at (execute mode): Add tests.
* NEWS, THANKS: Update.
Report by Paul Biggar.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-31 15:00:10 +01:00
Ralf Wildenhues
a8bb7bd817 Nonexistent `main' does not guarantee link failure.
* tests/fail.at (Failure tests): Use an unresolved symbol,
rather than non-presence of `main', to provoke a link failure
also on QNX.  Only check for failure of the libtool script if
the link without libtool would have failed, too.
Report by Mike Gorchak.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-31 11:40:42 +01:00
Ralf Wildenhues
5e43c14cc9 Use AT_CHECK more liberally in duplicate members test.
* tests/duplicate_members.at (duplicate members in archive
tests): Wrap link commands in AT_CHECK, they might fail, as seen
on QNX.
* THANKS: Update.
Report by Mike Gorchak.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-31 11:27:11 +01:00
Akim Demaille
13ef1b34b7 Fix func_exec_init.
* tests/defs.m4sh (func_exec_init): Instead of using the undefined
	my_dir, call func_dirname_and_basename and use its result.
	(func_make): For consistency, don't use the useless local variable
	my_dir.
2009-01-29 20:37:13 +01:00
Ralf Wildenhues
b93a3db892 Document --mode short-hands better, and test them.
* doc/libtool.texi (Invoking libtool): Give examples for using
the `--mode=MODE' short-hand `MODE', or abbreviations thereof.
* libltdl/config/ltmain.m4sh: Mention the short-hand for MODE
in the --help output.
* tests/help.at (mode short-hands): New test group.
Suggestion by Bruno Haible.
2009-01-29 19:55:19 +01:00
Ralf Wildenhues
18c603141e func_version copes with multi-line copyright headers.
* libltdl/config/getopt.m4sh (func_version): Slurp in copyright
lines until a period is found.
* libltdl/config/ltmain.m4sh: Multi-line copyright is ok to use
now.
* tests/help.at (standard command line options): New file, new
tests.  Make this test group the first one for libtool tests,
moving the banner ...
* tests/duplicate_members.at: ... from here.
* Makefile.am (TESTSUITE_AT): Add tests/help.at.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-29 18:53:13 +01:00
Akim Demaille
3e0beef8eb Normalize compiler output due to compiler wrappers.
* tests/testsuite.at (LT_AT_NORMALIZE_COMPILER_OUTPUT): New
macro, to normalize ccache and distcc output.
* tests/localization.at (localized compiler messages): Use it.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-29 18:39:58 +01:00
Peter Rosin
d356bfc32f Make modified libtool script in cwrapper test executable
* tests/cwrapper.at: Make modified libtool script executable.
Report by Roumen Petrov.
2009-01-29 08:55:08 +01:00
Charles Wilson
eaba16eb3a Add -Wall to cwrapper tests.
* tests/cwrapper.at: Add -Wall existing tests. Add additional
round of tests with -Wall alone.
2009-01-24 12:10:18 -05:00
Peter Rosin
0aef3579d2 Expand exit status test in LT_AT_NOINST_EXEC_CHECK correctly
* tests/testsuite.at (LT_AT_NOINST_EXEC_CHECK): STATUS is
argument $3, not $2.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-24 11:18:15 +01:00
Charles Wilson
a4e69ccbed Add tests for cwrapper with -std=c89 and -std=c99
* tests/cwrapper.at: New file.
* Makefile.am: Add tests/cwrapper.at.
2009-01-23 08:33:48 -05:00
Peter Rosin
3cf5eb63a6 Merge branch 'pr-tests-newline-fixes' 2009-01-22 23:42:18 +01:00
Peter Rosin
f9adc3ec9c Unify line endings in localization test.
* tests/testsuite.at: Update copyright year.
(LT_AT_UNIFY_NL): Add macro that unifies line endings on
platforms that suffer from such confusion.
* tests/localization.at: Use it. Update copyright year. Fixes
the test on MSYS/MSVC.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-22 23:41:06 +01:00
Ralf Wildenhues
72cefc2f63 Avoid failure due to Cygwin path detection bug.
* tests/execute-mode.at (execute mode): Ignore noise on stderr;
Cygwin might consider `d\"e' to be a DOS-style path and warn.
Report by Charles Wilson.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-19 23:55:07 +01:00
Ralf Wildenhues
5e4f908446 Another LT_AT_EXEC_CHECK fixup.
* tests/shlibpath.at (shlibpath_overrides_runpath): Use
LT_AT_EXEC_CHECK instead of AT_CHECK.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-19 21:54:52 +01:00
Roumen Petrov
0c0c502b96 Add missing $EXEEXT to java test.
* tests/convenience.at (Java convenience archives): Add $EXEEXT.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-19 21:50:39 +01:00
Peter Rosin
a2939b133b Fix flakey mdemo-dryrun test on MSYS (again!)
* tests/mdemo-dryrun.test: ls -l in MSYS sometimes shows year,
not time, for really fresh files. Add sleep 1 call at yet another
strategic position. Makes the test pass reliably for MSYS/MinGW.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-01-14 09:04:40 +01:00
Ralf Wildenhues
b7dbec6b9d Add cache variables to link tests.
* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
(_LT_LINKER_SHLIBS): Add cache variables to tests that
require the linker to work.  For shlibpath_overrides_runpath,
this also changes the semantics to let the result from the C
compiler take precedence.
* tests/no-executables.at (AC_NO_EXECUTABLES): New file.
* Makefile.am: Update.
* NEWS: Update.
Report of shlibpath_overrides_runpath issue by Mike Frysinger,
report of GCC issue by Andreas Schwab.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-12-17 20:42:45 +01:00
Ralf Wildenhues
aa68328616 Fix func_infer_tag $ECHO usage; some testsuite exposure.
* libltdl/config/ltmain.m4sh (func_infer_tag): Use func_echo_all
rather than $ECHO for possibly multiple arguments.
* tests/infer-tag.at (inferred tag, CXX inferred tag)
(F77 inferred tag, FC inferred tag, GCJ inferred tag): New file,
new tests.
* Makefile.am: Adjust.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-24 21:49:23 +01:00
Ralf Wildenhues
3c4d63b15c Another missing $EXEEXT in the new testsuite.
* tests/runpath-in-lalib.at (Runpath in libtool library files):
Add $EXEEXT overlooked in patch yesterday.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-24 07:36:29 +01:00
Ralf Wildenhues
535175c0c8 Fix expout and experr line ending issues.
* tests/testsuite.at (LT_AT_HOST_DATA): Renamed from..
(_LT_AT_TRANSLATE_TEXT_OUTPUT): ..this.
(LT_AT_EXEC_CHECK, LT_AT_NOINST_EXEC_CHECK): Do not use
_LT_AT_TRANSLATE_TEXT_OUTPUT any more.
* tests/configure-iface.at: Use LT_AT_HOST_DATA instead of
AT_DATA for `expout' files.
* tests/lt_dladvise.at (lt_dlopenadvise library loading):
Likewise.
* tests/need_lib_prefix.at (enforced lib prefix): Likewise.
Report by Roumen Petrov.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-23 22:58:06 +01:00
Ralf Wildenhues
9abc9628e0 Relax link-order2 test for systems with partial wrong order.
* tests/link-order2.at (Link order of deplibs.): On w32 (and
others, e.g., AIX), the wrongly linked executable picks up only
one instance of the bad function instead of two; relax the test
to accept this; we still require the right link order with the
correctly linked executable.
Reported by Roumen Petrov and others.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-23 22:54:59 +01:00
Roumen Petrov
df2960ac0b Add $EXEEXT to all linked programs in the new testsuite.
* tests/convenience.at, tests/ctor.at, tests/darwin.at,
tests/deplibs-ident.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/export.at, tests/fail.at, tests/indirect_deps.at,
tests/inherited_flags.at, tests/link-order.at,
tests/link-order2.at, tests/lt_dladvise.at, tests/lt_dlexit.at,
tests/need_lib_prefix.at, tests/runpath-in-lalib.at,
tests/search-path.at, tests/shlibpath.at, tests/static.at,
tests/stresstest.at, tests/template.at, tests/testsuite.at:
Use $EXEEXT throughout, except in Makefile.am snippets where
automake takes care of it, and in testsuite macros that take
care of the extension.
Reports by Roumen Petrov and Alon Bar-Lev.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-23 22:42:59 +01:00
Ralf Wildenhues
2258787e02 Adjust executable run tests to cwrapper changes.
* tests/testsuite.at (LT_AT_EXEC_CHECK): Accept fifth argument
ARGS-OR-STATUS-ADJUST, for command-line arguments and/or exit
status flattening.  Rewrite to prefer the executable with the
`.exe' prefix over one without.  Test exit status against
expected exit status, not against zero, when determining whether
this may be a cross-compilation-induced result.
(LT_AT_NOINST_EXEC_CHECK): Likewise.
* tests/static.at (static linking flags for programs): Adjust
calls.
Report by Roumen Petrov.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-23 22:35:58 +01:00
Ralf Wildenhues
c6d628415d No trailing period in Autotest test group names.
* tests/link-order.at (Link order test): Drop trailing period
from test name.
* tests/link-order2.at (Link order of deplibs): Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-23 21:10:23 +01:00
Ralf Wildenhues
90dff3e4da Avoid newlines in some AT_CHECK commands.
* tests/standalone.at (linking libltdl without autotools): Wrap
lines with dnl, to avoid turning off tracing of AT_CHECK.
* tests/subproject.at (linking libltdl without autotools):
Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-23 15:17:34 +01:00