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>
This commit is contained in:
Ralf Wildenhues 2009-09-06 19:38:06 +02:00
parent 0805518173
commit 2eb8c3e51f
6 changed files with 106 additions and 2 deletions

View File

@ -1,5 +1,17 @@
2009-09-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
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.
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'

View File

@ -547,19 +547,38 @@ DISTCLEANFILES += tests/atconfig
CD_TESTDIR = abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests
testsuite_deps = tests/atconfig $(srcdir)/$(TESTSUITE)
testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la $(bin_SCRIPTS)
# Hook the test suite into the check rule
check-local: tests/atconfig $(srcdir)/$(TESTSUITE) libltdl/libltdlc.la $(bin_SCRIPTS)
check-local: $(testsuite_deps_uninstalled)
$(CD_TESTDIR); \
CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
$(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) $(TESTSUITEFLAGS)
# Run the test suite on the *installed* tree.
installcheck-local: tests/atconfig $(srcdir)/$(TESTSUITE)
installcheck-local: $(testsuite_deps)
$(CD_TESTDIR); \
CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
$(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \
AUTOTEST_PATH="$(exec_prefix)/bin"
# Run only noninteractive parts of the new testsuite.
check-noninteractive: $(testsuite_deps_uninstalled)
$(CD_TESTDIR); \
CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
$(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
-k !interactive INNER_TESTSUITEFLAGS=",!interactive" \
$(TESTSUITEFLAGS)
# Run only interactive parts of the new testsuite.
check-interactive: $(testsuite_deps_uninstalled)
$(CD_TESTDIR); \
CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
$(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
-k interactive -k recursive INNER_TESTSUITEFLAGS=",interactive" \
$(TESTSUITEFLAGS)
# We need to remove any file droppings left behind by testsuite
clean-local: clean-local-legacy
-$(CD_TESTDIR); \

3
NEWS
View File

@ -12,6 +12,9 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
- New libtool command line flag --no-verbose, which disables only
the extra "verbose" output messages and has no effect on the
default informational messages.
- New convenience make targets `check-noninteractive' to avoid long testsuite
runs on Windows with popup windows in the middle, and `check-interactive'
for the complement set of tests.
* Changes in supported systems or compilers:

View File

@ -5166,6 +5166,74 @@ directory, except that Fortran 90 is used in combination with the
@end table
The new, Autotest-based test suite uses keywords to classify certain
test groups:
@table @samp
@item CXX
@itemx F77
@itemx FC
@itemx GCJ
The test group exercises one of these @command{libtool} language tags.
@item autoconf
@itemx automake
These keywords denote that the respective external program is needed
by the test group. The tests are typically skipped if the program is
not installed. The @samp{automake} keyword may also denote use of the
@command{aclocal} program.
@item interactive
This test group may require user interaction on some systems. Typically,
this means closing a popup window about a DLL load error on Windows.
@item libltdl
Denote that the @file{libltdl} library is exercised by the test group.
@item libtool
@itemx libtoolize
Denote that the @command{libtool} or @command{libtoolize} scripts are
exercised by the test group, respectively.
@item recursive
Denote that this test group may recursively re-invoke the test suite
itself, with changed settings and maybe a changed @command{libtool}
script. You may use the @env{INNER_TESTSUITEFLAGS} variable to pass
additional settings to this recursive invocation. Typically, recursive
invocations delimit the set of tests with another keyword, for example
by passing @code{-k libtool} right before the expansion of the
@env{INNER_TESTSUITEFLAGS} variable (without an intervening space, so
you get the chance for further delimitation).
Test groups with the keyword @samp{recursive} should not be denoted with
keywords, in order to avoid infinite recursion. As a consequence,
recursive test groups themselves should never require user interaction,
while the test groups they invoke may do so.
@end table
For example, in order to avoid any interactive test groups, you could
use this:
@smallexample
make check-local \
TESTSUITEFLAGS='-k !interactive INNER_TESTSUITEFLAGS=",!interactive"'
@end smallexample
@noindent
while to run only those test groups, you would use this:
@smallexample
make check-local \
TESTSUITEFLAGS='-k interactive -k recursive INNER_TESTSUITEFLAGS=,interactive'
@end smallexample
@noindent
but the convenience targets @samp{check-interactive} and
@samp{check-noninteractive} avoid needing to remember these complex
commands, in addition to also disabling interactive tests in the old
test suite.
@node When tests fail
@subsection When tests fail
@cindex failed tests

View File

@ -45,6 +45,7 @@
AT_SETUP([Link order of deplibs])
AT_KEYWORDS([libtool])
AT_KEYWORDS([interactive])dnl running 'wrong' may cause a popup window.
eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|allow_undefined_flag)='`

View File

@ -67,6 +67,7 @@
AT_SETUP([static linking flags for programs])
AT_KEYWORDS([libtool])
AT_KEYWORDS([interactive])dnl Some of the exec_fail test cause popups with MinGW.
LDFLAGS="$LDFLAGS -no-undefined"
prefix=`pwd`/inst