From: Ralf Wildenhues Date: Sun, 6 Sep 2009 17:38:06 +0000 (+0200) Subject: Testsuite keyword 'interactive' and check-* rules. X-Git-Tag: v2.2.7b~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2eb8c3e51fde5f3a220eaad5c9e31a215aab330d;p=thirdparty%2Flibtool.git 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 --- diff --git a/ChangeLog b/ChangeLog index 60bf37375..f87485259 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2009-09-06 Ralf Wildenhues + 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' diff --git a/Makefile.am b/Makefile.am index e22fcc24d..bdfad2ed6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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); \ diff --git a/NEWS b/NEWS index d6a35aa54..c7d3016cc 100644 --- a/NEWS +++ b/NEWS @@ -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: diff --git a/doc/libtool.texi b/doc/libtool.texi index a7872c666..18b9a97aa 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -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 diff --git a/tests/link-order2.at b/tests/link-order2.at index 57ff4a03a..a6eea0e9d 100644 --- a/tests/link-order2.at +++ b/tests/link-order2.at @@ -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)='` diff --git a/tests/static.at b/tests/static.at index 575c227dc..f59b12425 100644 --- a/tests/static.at +++ b/tests/static.at @@ -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