automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Overhauled and modularized tests in `instspc.test'.


From: Stefano Lattarini
Subject: Re: [PATCH] Overhauled and modularized tests in `instspc.test'.
Date: Tue, 7 Sep 2010 19:20:15 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

Hello automakers.

I've again rebased the patch against latest master.

Also, I've improved/fixed it in various ways:
 1. a potential bug fix for a portability problem for bash 3.2
    and earlier -- see the Autoconf manual, "11.12 Limitations of
    Shell Builtins", "{ ... }":
     
<http://www.gnu.org/software/autoconf/manual/html_node/Limitations-of-Builtins.html>
 2. A workaround for a ridicolous bug of Solaris 10 /bin/ksh:
      $ /bin/ksh -c 'test -z ")"; echo $?'
      0
    For more info see:
      <http://lists.gnu.org/archive/html/autoconf/2010-09/msg00025.html>
 3. A workaround for "classical" sed implementations, that require text
    input (in particular, with a trailing newline)
 4. A bugfix where command substitutions could have uncorrectly
    stripped away significant leading white spaces.
 5. Other minor improvements/fixings.

The new patch has been tested on:

 t1. Debian GNU/Linux with system (GNU) utilities, autoconf 2.67,
     bash 4.1, and GNU make 3.81
 t2. Debian GNU/Linux with system (GNU) utilities, autoconf 2.67,
     pdksh "@(#)PD KSH v5.2.14 99/07/13.2", and FreeBSD make 8.1,
 t3. Debian GNU/Linux with autoconf 2.67, Heirlooom sh, Heirloom
     tools and Heirlooom make
 t4. Solaris 10 with autoconf 2.67, bash 3.0, GNU make 3.82 and
     mixed system and GNU tools
 t5. Solaris 10 with autoconf 2.62, /usr/xpg4/bin/make, /bin/ksh,
     and basic system utilities (those in /usr/bin alone).
 t6. Solaris 10 with autoconf 2.62, /usr/ccs/bin/make, /bin/sh,
     basic system utilities (those in /usr/bin alone).

No test was skipped, all the non-xfailing tests succeeded.

OK for master?

Regards,
   Stefano
From bc70edd3627fc20785211ad06c9fe386ebecccff Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Sun, 6 Jun 2010 18:38:27 +0200
Subject: [PATCH] Overhauled and modularized tests in `instspc.test'.

The test `instspc.test' was way too big and fragile.  Its running
time was very long.  It also produced a log that was nearly
unreadable due to its lenght, making it very difficult to find
out the reason of failures.
Also, it was too much monolithic, with a single (maybe spurious)
failure in a corner case causing the whole test to fail (even if
everything worked as expected in the other 99% of cases).
The present change should solve these problems, by separating
`instspc.test' into many smaller, self-contained, auto-generated
tests.

* tests/gen-instspc-tests: New file, generates a distributed
Makefile.am snippet `tests/instspc-tests.am'.  This contains
rules to generate a host of new tests `instspc*.test', which
will take over the older `instspc.test'.
* tests/instspc.test: Moved to ...
* tests/instspc.sh: ... this, and modified (quite heavily) to
adapt to the new circumstances (it will be included by all the
newly generated `instspc*.test').
* tests/Makefile.am ($(srcdir)/instspc-tests.am): Include this
snippet, which (among the other things) defines ...
(instspc_tests): ... this new macro, containing the list of the
newly generated `instspc*.test' tests, and ...
(instspc_xfail_tests): ... this new macro, containing the list
of the `instspc*.test' tests expected to fail.
($(instspc_tests:.test=.log)): New rule, registers the dependency
of all `instspc*.test' tests from the `instspc.sh' script.
(TESTS): Add `$(instspc_tests)', remove `instspc.test'.
(XFAIL_TESTS): Add `$(xfail_instspc_tests)'.
(EXTRA_DIST): Distribute gen-instspc-tests and instspc.sh.
(MAINTAINERCLEANFILES): Added $(instspc_tests).
Other minor cosmetic changes.
* bootstrap: Generate instspc-tests.am.
* tests/.gitignore: Updated.
---
 ChangeLog               |   37 +++
 bootstrap               |    3 +-
 tests/.gitignore        |    5 +-
 tests/Makefile.am       |   28 ++-
 tests/Makefile.in       |  712 ++++++++++++++++++++++++++++++++++++++++++++++-
 tests/gen-instspc-tests |  101 +++++++
 tests/instspc.sh        |  228 +++++++++++++++
 tests/instspc.test      |  187 -------------
 8 files changed, 1095 insertions(+), 206 deletions(-)
 create mode 100755 tests/gen-instspc-tests
 create mode 100644 tests/instspc.sh
 delete mode 100755 tests/instspc.test

diff --git a/ChangeLog b/ChangeLog
index f38f8b6..71d90dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+2010-09-07  Stefano Lattarini  <address@hidden>
+
+       Overhauled and modularized tests in `instspc.test'.
+       The test `instspc.test' was way too big and fragile.  Its running
+       time was very long.  It also produced a log that was nearly
+       unreadable due to its lenght, making it very difficult to find
+       out the reason of failures.
+       Also, it was too much monolithic, with a single (maybe spurious)
+       failure in a corner case causing the whole test to fail (even if
+       everything worked as expected in the other 99% of cases).
+       The present change should solve these problems, by separating
+       `instspc.test' into many smaller, self-contained, auto-generated
+       tests.
+       * tests/gen-instspc-tests: New file, generates a distributed
+       Makefile.am snippet `tests/instspc-tests.am'.  This contains
+       rules to generate a host of new tests `instspc*.test', which
+       will take over the older `instspc.test'.
+       * tests/instspc.test: Moved to ...
+       * tests/instspc.sh: ... this, and modified (quite heavily) to
+       adapt to the new circumstances (it will be included by all the
+       newly generated `instspc*.test').
+       * tests/Makefile.am ($(srcdir)/instspc-tests.am): Include this
+       snippet, which (among the other things) defines ...
+       (instspc_tests): ... this new macro, containing the list of the
+       newly generated `instspc*.test' tests, and ...
+       (instspc_xfail_tests): ... this new macro, containing the list
+       of the `instspc*.test' tests expected to fail.
+       ($(instspc_tests:.test=.log)): New rule, registers the dependency
+       of all `instspc*.test' tests from the `instspc.sh' script.
+       (TESTS): Add `$(instspc_tests)', remove `instspc.test'.
+       (XFAIL_TESTS): Add `$(xfail_instspc_tests)'.
+       (EXTRA_DIST): Distribute gen-instspc-tests and instspc.sh.
+       (MAINTAINERCLEANFILES): Added $(instspc_tests).
+       Other minor cosmetic changes.
+       * bootstrap: Generate instspc-tests.am.
+       * tests/.gitignore: Updated.
+
 2010-09-07  Ralf Wildenhues  <address@hidden>
 
        parallel-tests: avoid command-line length limit issue.
diff --git a/bootstrap b/bootstrap
index 9f1a8d8..9f92f4c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -103,9 +103,10 @@ dosubst m4/amversion.in m4/amversion.m4
 # Create temporary replacement for automake.
 dosubst automake.in automake.tmp
 
-# Create tests/parallel-tests.am.
+# Create required makefile snippets.
 cd tests
 $BOOTSTRAP_SHELL ./gen-parallel-tests > parallel-tests.am
+$BOOTSTRAP_SHELL ./gen-instspc-tests > instspc-tests.am
 cd ..
 
 # Run the autotools.
diff --git a/tests/.gitignore b/tests/.gitignore
index 61b0783..3791060 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1,9 +1,12 @@
 aclocal-*
 automake-*
 defs
+instspc-tests.am
 parallel-tests.am
 *.dir
 *.log
 *.log-t
 *-p.test
-*-p.test-t
+instspc[0-9]*-build.test
+instspc[0-9]*-install.test
+*.test-t
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d86b03b..f092514 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -16,6 +16,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+MAINTAINERCLEANFILES =         ## updated later
+EXTRA_DIST = ChangeLog-old     ## likewise
+
 XFAIL_TESTS =                                  \
 all.test                                       \
 auxdir2.test                                   \
@@ -23,6 +26,7 @@ cond17.test                                   \
 gcj6.test                                      \
 txinfo5.test
 
+
 include $(srcdir)/parallel-tests.am
 
 $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
@@ -51,7 +55,22 @@ $(parallel_tests): Makefile.am
        } > address@hidden
        $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
 
-MAINTAINERCLEANFILES = $(parallel_tests)
+MAINTAINERCLEANFILES += $(parallel_tests) $(instspc_tests)
+EXTRA_DIST += gen-parallel-tests
+
+
+include $(srcdir)/instspc-tests.am
+
+$(srcdir)/instspc-tests.am: gen-instspc-tests Makefile.am
+       $(AM_V_GEN)(cd $(srcdir) && $(SHELL) ./gen-instspc-tests) >$@
+
+# All instspc*.test tests work by sourcing the instspc.sh script.
+$(instspc_tests:.test=.log): $(srcdir)/instspc.sh
+
+MAINTAINERCLEANFILES += $(parallel_tests) $(instspc_tests)
+EXTRA_DIST += gen-instspc-tests instspc.sh
+XFAIL_TESTS += $(instspc_xfail_tests)
+
 
 TESTS = \
 aclibobj.test \
@@ -411,7 +430,6 @@ instman2.test \
 instmany.test \
 instmany-mans.test \
 instmany-python.test \
-instspc.test \
 interp.test \
 interp2.test \
 java.test \
@@ -813,9 +831,11 @@ yaccpp.test \
 yaccvpath.test \
 yflags.test \
 yflags2.test \
-$(parallel_tests)
+$(parallel_tests) \
+$(instspc_tests)
+
+EXTRA_DIST += $(TESTS)
 
-EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
 
 # Each test case depends on defs, aclocal, and automake.
 $(TEST_LOGS): defs aclocal-$(APIVERSION) automake-$(APIVERSION)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index e6c1063..c3178a7 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -50,7 +50,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
        $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs.in \
-       $(srcdir)/parallel-tests.am
+       $(srcdir)/instspc-tests.am $(srcdir)/parallel-tests.am
 subdir = tests
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
@@ -250,20 +250,71 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-XFAIL_TESTS = \
-all.test                                       \
-auxdir2.test                                   \
-cond17.test                                    \
-gcj6.test                                      \
-txinfo5.test
-
+MAINTAINERCLEANFILES = $(parallel_tests) $(instspc_tests) \
+       $(parallel_tests) $(instspc_tests)
+EXTRA_DIST = ChangeLog-old gen-parallel-tests gen-instspc-tests \
+       instspc.sh $(TESTS)
+XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test txinfo5.test \
+       $(instspc_xfail_tests)
 parallel_tests = check-p.test check10-p.test check11-p.test \
        check2-p.test check3-p.test check4-p.test check5-p.test \
        check6-p.test check7-p.test check8-p.test check9-p.test \
        color-p.test color2-p.test comment9-p.test dejagnu-p.test \
        exeext4-p.test maken3-p.test maken4-p.test pr401-p.test \
        pr401b-p.test pr401c-p.test
-MAINTAINERCLEANFILES = $(parallel_tests)
+instspc_tests = instspc1-build.test instspc1-install.test \
+       instspc2-build.test instspc2-install.test instspc3-build.test \
+       instspc3-install.test instspc4-build.test \
+       instspc4-install.test instspc5-build.test \
+       instspc5-install.test instspc6-build.test \
+       instspc6-install.test instspc7-build.test \
+       instspc7-install.test instspc8-build.test \
+       instspc8-install.test instspc9-build.test \
+       instspc9-install.test instspc10-build.test \
+       instspc10-install.test instspc11-build.test \
+       instspc11-install.test instspc12-build.test \
+       instspc12-install.test instspc13-build.test \
+       instspc13-install.test instspc14-build.test \
+       instspc14-install.test instspc15-build.test \
+       instspc15-install.test instspc16-build.test \
+       instspc16-install.test instspc17-build.test \
+       instspc17-install.test instspc18-build.test \
+       instspc18-install.test instspc19-build.test \
+       instspc19-install.test instspc20-build.test \
+       instspc20-install.test instspc21-build.test \
+       instspc21-install.test instspc22-build.test \
+       instspc22-install.test instspc23-build.test \
+       instspc23-install.test instspc24-build.test \
+       instspc24-install.test instspc25-build.test \
+       instspc25-install.test instspc26-build.test \
+       instspc26-install.test instspc27-build.test \
+       instspc27-install.test instspc28-build.test \
+       instspc28-install.test instspc29-build.test \
+       instspc29-install.test instspc30-build.test \
+       instspc30-install.test instspc31-build.test \
+       instspc31-install.test instspc32-build.test \
+       instspc32-install.test instspc33-build.test \
+       instspc33-install.test instspc34-build.test \
+       instspc34-install.test instspc35-build.test \
+       instspc35-install.test instspc36-build.test \
+       instspc36-install.test instspc37-build.test \
+       instspc37-install.test instspc38-build.test \
+       instspc38-install.test instspc39-build.test \
+       instspc39-install.test instspc40-build.test \
+       instspc40-install.test instspc41-build.test \
+       instspc41-install.test instspc42-build.test \
+       instspc42-install.test instspc43-build.test \
+       instspc43-install.test instspc44-build.test \
+       instspc44-install.test instspc45-build.test \
+       instspc45-install.test
+instspc_xfail_tests = instspc2-build.test instspc2-install.test \
+       instspc3-build.test instspc3-install.test instspc4-build.test \
+       instspc4-install.test instspc6-build.test instspc7-build.test \
+       instspc7-install.test instspc22-build.test \
+       instspc25-build.test instspc25-install.test \
+       instspc34-build.test instspc34-install.test \
+       instspc40-build.test instspc43-build.test \
+       instspc43-install.test
 TESTS = \
 aclibobj.test \
 aclocal.test \
@@ -622,7 +673,6 @@ instman2.test \
 instmany.test \
 instmany-mans.test \
 instmany-python.test \
-instspc.test \
 interp.test \
 interp2.test \
 java.test \
@@ -1024,14 +1074,14 @@ yaccpp.test \
 yaccvpath.test \
 yflags.test \
 yflags2.test \
-$(parallel_tests)
+$(parallel_tests) \
+$(instspc_tests)
 
-EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
 all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .html .log .test
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/parallel-tests.am 
$(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/parallel-tests.am 
$(srcdir)/instspc-tests.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -1425,6 +1475,642 @@ $(parallel_tests): Makefile.am
        } > address@hidden
        $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
 
+instspc1-build.test instspc1-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''!'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc2-build.test instspc2-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''"'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc3-build.test instspc3-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''$${sh}'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc4-build.test instspc4-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''$${dl}'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc5-build.test instspc5-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''%'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc6-build.test instspc6-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''&'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc7-build.test instspc7-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''$${sq}'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc8-build.test instspc8-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''('\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc9-build.test instspc9-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\'')'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc10-build.test instspc10-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''*'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc11-build.test instspc11-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''+'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc12-build.test instspc12-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\'','\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc13-build.test instspc13-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''-'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc14-build.test instspc14-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\'':'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc15-build.test instspc15-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\'';'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc16-build.test instspc16-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''<'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc17-build.test instspc17-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''='\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc18-build.test instspc18-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''>'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc19-build.test instspc19-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''?'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc20-build.test instspc20-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''@'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc21-build.test instspc21-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''['\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc22-build.test instspc22-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''\'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc23-build.test instspc23-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\'']'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc24-build.test instspc24-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''^'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc25-build.test instspc25-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''`'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc26-build.test instspc26-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''{'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc27-build.test instspc27-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''|'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc28-build.test instspc28-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''}'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc29-build.test instspc29-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''~'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc30-build.test instspc30-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''$${bs}'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc31-build.test instspc31-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''$${cr}'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc32-build.test instspc32-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''$${ff}'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc33-build.test instspc33-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''$${ht}'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc34-build.test instspc34-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''$${lf}'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc35-build.test instspc35-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''$${sp}'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc36-build.test instspc36-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''@<:@'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc37-build.test instspc37-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''@:>@'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc38-build.test instspc38-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''@S|@'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc39-build.test instspc39-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''@%:@'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc40-build.test instspc40-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''@&t@'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc41-build.test instspc41-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''a$${sp}b'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc42-build.test instspc42-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''a$${sp}$${sp}b'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc43-build.test instspc43-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''a$${lf}b'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc44-build.test instspc44-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''...'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+instspc45-build.test instspc45-install.test: instspc-tests.am
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+         echo weird_chars=\''a:'\'; \
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+
+$(srcdir)/instspc-tests.am: gen-instspc-tests Makefile.am
+       $(AM_V_GEN)(cd $(srcdir) && $(SHELL) ./gen-instspc-tests) >$@
+
+# All instspc*.test tests work by sourcing the instspc.sh script.
+$(instspc_tests:.test=.log): $(srcdir)/instspc.sh
+
 # Each test case depends on defs, aclocal, and automake.
 $(TEST_LOGS): defs aclocal-$(APIVERSION) automake-$(APIVERSION)
 
diff --git a/tests/gen-instspc-tests b/tests/gen-instspc-tests
new file mode 100755
index 0000000..6afd526
--- /dev/null
+++ b/tests/gen-instspc-tests
@@ -0,0 +1,101 @@
+#! /bin/sh
+# Generate instspc-tests.am.
+#
+# Copyright (C) 2010 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, see <http://www.gnu.org/licenses/>.
+
+# Generate a Makefile fragment which defines:
+#  1. Rules to generate tests that we can building from, and/or install
+#     to, directories having in their name shell/make metacharacters,
+#     control characters, white spaces, autoconf quadrigraphs, or other
+#     suspicious/problematic tokens.
+#  2. The macro $(instspc_tests), containing the list of the tests
+#     generated by the makefile fragment.
+#  3. The macro $(xfail_instspc_test), containing the list of those
+#     generated tests expected to fail.
+
+# Original report from James Amundson about file names with spaces.
+# Other characters added by Paul Eggert.
+
+set -e # abort on unhandled errors
+
+# Defined to help avoiding headaches with multiple escaping into
+# backquotes, below.
+escape_dollar() { sed 's/\$/$$/g'; }
+
+cat <<'END'
+## Generated by gen-instspc-tests.  DO NOT EDIT!
+instspc_tests =
+instspc_xfail_tests =
+END
+
+count=0
+# Some of these contain symbolic reperesentations of problematic
+# characters, which could easily confuse make (e.g. `#', `$' or
+# newline).  They will be properly expanded by instspc.sh.
+for weird_chars in \
+  '!' '"' '${sh}' '${dl}' '%' '&' '${sq}' '(' ')' '*' '+' ',' '-' \
+  ':' ';' '<' '=' '>' '?' '@' '[' '\' ']' '^' '`' '{' '|' '}' '~' \
+  '${bs}' '${cr}' '${ff}' '${ht}' '${lf}' '${sp}' \
+  '@<:@' '@:>@' '@S|@' '@%:@' '@&t@' \
+  'a${sp}b' 'a${sp}${sp}b' 'a${lf}b' '...' 'a:'
+do
+  count=`expr $count + 1`
+  # Simply naming the tests using incremental numbers seems to
+  # be the best policy.
+  tst=instspc$count
+  # We have to escape `$' in makefiles.
+  case "$weird_chars" in
+    *\$*) weird_escaped=`printf '%s' "$weird_chars" | escape_dollar`;;
+    *) weird_escaped=$weird_chars;;
+  esac
+  echo # separate sections for different tests
+  echo "$tst-build.test $tst-install.test: instspc-tests.am"
+  cat <<'END'
+       $(AM_V_at)rm -f $@ address@hidden
+## The apparently useless ":;" works around a bug of Bash 3.2 and earlier.
+## See section "Limitations of Shell Builtins" in the Autoconf manual.
+       $(AM_V_GEN) :; { \
+         action=`echo $@ | sed -e 's/\.test$$//' -e s/^.*-//;`; \
+         echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+         echo 'required=gcc # FIXME: any C compiler should be ok!'; \
+         echo '. ./defs || Exit 99 || exit 99'; \
+         echo action=$$action; \
+END
+  # leading tab here
+  echo "         echo weird_chars=\\''$weird_escaped'\\'; \\"
+  cat <<'END'
+         echo '. "$$testsrcdir/instspc.sh"'; \
+       } > address@hidden
+       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+END
+  echo "instspc_tests += $tst-build.test $tst-install.test"
+  # Some of the above "weird" file names cannot be used as a build
+  # directory on a POSIX host.  This list should be empty, but is
+  # not due to limitations in Autoconf, Automake, Make, M4, or the
+  # shell.
+  case $weird_chars in
+    \"|'${sh}'|'${dl}'|'${sq}'|\&|\\|\`|'${lf}'|'@&t@'|'a${lf}b')
+      echo "instspc_xfail_tests += $tst-build.test";;
+  esac
+  # Similarly, some of the "weird" file names cannot be used as an
+  # install directory on a POSIX host.  This list should ideally
+  # also be empty.
+  case $weird_chars in
+    \"|'${sh}'|'${dl}'|'${sq}'|\`|'${lf}'|'a${lf}b')
+      echo "instspc_xfail_tests += $tst-install.test";;
+  esac
+done
diff --git a/tests/instspc.sh b/tests/instspc.sh
new file mode 100644
index 0000000..3394c1c
--- /dev/null
+++ b/tests/instspc.sh
@@ -0,0 +1,228 @@
+#! /bin/sh
+# Copyright (C) 2004, 2005, 2010 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, see <http://www.gnu.org/licenses/>.
+
+# Check that building from, or installing to, directories with shell
+# metacharacters succeed.
+
+# This script is expected to be sourced by specific, individual tests,
+# which, before its inclusion, should properly define the variable
+# `$weird_chars' and `$action' (this last one to either "build"
+# or "install").
+
+# Original report from James Amundson about file names with spaces.
+# Other characters added by Paul Eggert.
+
+# Transition from `instspc.test' to `instspc.sh' done
+# by Stefano Lattarini.
+
+# This is mostly the same input as nobase.test, but we do not use
+# libtool libraries, because Libtool does not preserve space in
+# file names (Issue observed with ltmain.sh (GNU libtool) 1.5a (1.1323
+# 2003/11/10 21:06:47))
+
+set -e
+
+# This file will be sourced by many tests, so avoid cluttering up
+# the verbose logs too much.
+set +x
+echo "INFO: $me: shell traces disabled"
+
+echo "INFO: $me: action=$action"
+echo "INFO: $me: weird_chars='$weird_chars'"
+
+# Sanity check 1.
+# NOTE: Don't use `test -z' here since Solaris 10 /bin/ksh seems
+# to have problems grokking `test -z ")"'.
+if test x"$weird_chars" = x; then
+  echo "$me: FATAL: \$weird_chars unset or empty"
+  Exit 99
+fi
+
+# Sanity check 2.
+case $action in
+  "") echo "$me: FATAL: \$action unset or empty"; Exit 99;;
+  build|install) ;;
+  *) echo "$me: FATAL: invalid \$action: '$action'"; Exit 99;;
+esac
+
+# Some control characters that are white space.
+bs='' # back space
+cr='
' # carriage return
+ff='' # form feed
+ht='   ' # horizontal tab
+lf='
+'  # line feed (aka newline)
+sp=' ' # space
+
+# Some other character that might be problematic in makefiles.
+dl=\$ # dollar
+sq=\' # single quote
+sh=\# # sharp
+
+# Now we might have to perform some substitutions in the given "weird
+# file name".  This is necessary, because some "unusual" characters
+# can easily wreak havoc in makefiles (see the comments in the script
+# `gen-instspc-tests' for more information).  Since we are at it, we
+# perform some more sanity checks.
+case $weird_chars in
+  *\#*|*"$lf"*|*'${lf}${lf}')
+    echo "$me: invalid \$weird_chars: '$weird_chars'" >&2
+    Exit 99
+    ;;
+  '${bs}'|'${cr}'|'${ff}'|'${ht}'|'${lf}'|'${sp}'|'${dl}'|'${sq}'|'${sh}')
+    eval "weird_chars=$weird_chars" || Exit 99
+    if test -z "$weird_chars"; then
+      echo "$me: \"weird\" char '$weird_chars' evaluated to empty" >&2
+      Exit 99
+    fi
+    ;;
+  *'${sp}'*|*'${lf}'*)
+    #
+    # Whow, this is tricky!
+    #
+    # NOTE 1: The `subst_spaces' function helps us avoiding headaches
+    #         with backslashes into backquotes.
+    #
+    # NOTE 2: The use of `#' and newline as a characters "impossible in
+    #         input" is OK, because we $weird_chars should never contain
+    #         newline or a `#' character (the first match in the current
+    #         "case" statement takes care of this check).
+    #
+    # NOTE 3: We must add a trailing newline to the expression printed by
+    #         printf, to remain portable to all sed implementations.
+    #
+    # NOTE 4: We must be careful not to let the command suctitution strip
+    #         significant trailing newlines.  This is not difficult, as
+    #         we can be positivie that there is at most one such trailing
+    #         newline (the first match in the current "case" statement
+    #         takes care of this check).
+    #
+    subst_spaces() {
+      printf '%s\n' "$*" | sed -e 's/\${sp}/ /g' -e 's/\${lf}/#/g' \
+        | tr -d "$lf" | tr "#" "$lf"
+    }
+    new_weird_chars=`subst_spaces "$weird_chars"` || Exit 99
+    case $weird_chars in
+      *'${lf}')
+        # Add back trailing newline stripped by command substitution.
+        weird_chars=${new_weird_chars}${lf};;
+      *)
+        weird_chars=$new_weird_chars;;
+    esac
+    unset new_weird_chars
+    ;;
+  *\$*)
+    echo "$me: invalid \$weird_chars: '$weird_chars'" >&2
+    Exit 99
+    ;;
+esac
+
+echo "INFO: $me: munged x\"\$weird_chars\"x: x${weird_chars}x"
+echo "INFO: $me: enabling shell traces"
+set -x
+
+# Skip if this system doesn't support this characters in file names.
+# The created directory will also be used below, so don't remove.
+mkdir "./$weird_chars" || Exit 77
+
+mkdir sub1  # Will be used below.
+
+cat >> configure.in << 'EOF'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+EOF
+
+mkdir sub
+
+: > sub/base.h
+: > sub/nobase.h
+: > sub/base.dat
+: > sub/nobase.dat
+: > sub/base.sh
+: > sub/nobase.sh
+
+cat > source.c << 'EOF'
+int
+main (int argc, char **argv)
+{
+  return 0;
+}
+EOF
+cp source.c source2.c
+
+cat > Makefile.am << 'EOF'
+foodir = $(prefix)/foo
+fooexecdir = $(prefix)/foo
+
+foo_HEADERS = sub/base.h
+nobase_foo_HEADERS = sub/nobase.h
+
+dist_foo_DATA = sub/base.dat
+nobase_dist_foo_DATA = sub/nobase.dat
+
+dist_fooexec_SCRIPTS = sub/base.sh
+nobase_dist_fooexec_SCRIPTS = sub/nobase.sh
+
+fooexec_PROGRAMS = sub/base
+nobase_fooexec_PROGRAMS = sub/nobase
+sub_base_SOURCES = source.c
+sub_nobase_SOURCES = source.c
+
+fooexec_LIBRARIES = sub/libbase.a
+nobase_fooexec_LIBRARIES = sub/libnobase.a
+sub_libbase_a_SOURCES = source.c
+sub_libnobase_a_SOURCES = source.c
+
+.PHONY: test-install-sep
+test-install-sep: install
+       test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.h'
+       test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.h'
+       test   -f '$(DESTDIR)/$(file)-prefix/foo/base.h'
+       test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.dat'
+       test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.dat'
+       test   -f '$(DESTDIR)/$(file)-prefix/foo/base.dat'
+       test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.sh'
+       test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.sh'
+       test   -f '$(DESTDIR)/$(file)-prefix/foo/base.sh'
+       test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase$(EXEEXT)'
+       test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase$(EXEEXT)'
+       test   -f '$(DESTDIR)/$(file)-prefix/foo/base$(EXEEXT)'
+       test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/libnobase.a'
+       test ! -f '$(DESTDIR)/$(file)-prefix/foo/libnobase.a'
+       test   -f '$(DESTDIR)/$(file)-prefix/foo/libbase.a'
+EOF
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+case $action in
+  build)
+    build=$weird_chars
+    dest=`pwd`/sub1;;
+  install)
+    build=sub1
+    dest=`pwd`/$weird_chars;;
+esac
+
+cd "./$build"
+
+../configure --prefix "/$weird_chars-prefix"
+$MAKE
+DESTDIR="$dest" file="$weird_chars" $MAKE -e test-install-sep
+
+:
diff --git a/tests/instspc.test b/tests/instspc.test
deleted file mode 100755
index 414b3e5..0000000
--- a/tests/instspc.test
+++ /dev/null
@@ -1,187 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2004, 2005  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, see <http://www.gnu.org/licenses/>.
-
-# Check that installation to directory with shell metacharacters succeed.
-# Original report from James Amundson about file names with spaces.
-# Other characters added by Paul Eggert.
-
-# This is mostly the same input as nobase.test, but we do not use
-# libtool libraries, because Libtool does not preserve space in
-# file names (Issue observed with ltmain.sh (GNU libtool) 1.5a (1.1323
-# 2003/11/10 21:06:47))
-
-
-required='gcc'
-. ./defs || Exit 1
-
-set -e
-
-# Set up files that won't change each time through the loop.
-
-cat >> configure.in <<'EOF'
-AC_PROG_CC
-AC_PROG_RANLIB
-AC_OUTPUT
-EOF
-
-mkdir sub
-
-: > sub/base.h
-: > sub/nobase.h
-: > sub/base.dat
-: > sub/nobase.dat
-: > sub/base.sh
-: > sub/nobase.sh
-
-cat >source.c <<'EOF'
-int
-main (int argc, char **argv)
-{
-  return 0;
-}
-EOF
-cp source.c source2.c
-
-cat > Makefile.am << 'EOF'
-foodir = $(prefix)/foo
-fooexecdir = $(prefix)/foo
-
-foo_HEADERS = sub/base.h
-nobase_foo_HEADERS = sub/nobase.h
-
-dist_foo_DATA = sub/base.dat
-nobase_dist_foo_DATA = sub/nobase.dat
-
-dist_fooexec_SCRIPTS = sub/base.sh
-nobase_dist_fooexec_SCRIPTS = sub/nobase.sh
-
-fooexec_PROGRAMS = sub/base
-nobase_fooexec_PROGRAMS = sub/nobase
-sub_base_SOURCES = source.c
-sub_nobase_SOURCES = source.c
-
-fooexec_LIBRARIES = sub/libbase.a
-nobase_fooexec_LIBRARIES = sub/libnobase.a
-sub_libbase_a_SOURCES = source.c
-sub_libnobase_a_SOURCES = source.c
-
-test-install-sep: install
-       test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.h'
-       test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.h'
-       test   -f '$(DESTDIR)/$(file)-prefix/foo/base.h'
-       test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.dat'
-       test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.dat'
-       test   -f '$(DESTDIR)/$(file)-prefix/foo/base.dat'
-       test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.sh'
-       test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.sh'
-       test   -f '$(DESTDIR)/$(file)-prefix/foo/base.sh'
-       test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase$(EXEEXT)'
-       test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase$(EXEEXT)'
-       test   -f '$(DESTDIR)/$(file)-prefix/foo/base$(EXEEXT)'
-       test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/libnobase.a'
-       test ! -f '$(DESTDIR)/$(file)-prefix/foo/libnobase.a'
-       test   -f '$(DESTDIR)/$(file)-prefix/foo/libbase.a'
-EOF
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-# Some control characters that are white space:
-# back space, carriage return, form feed, horizontal tab, line feed, space
-bs=''
-cr='
'
-ff=''
-ht='   '
-lf='
-'
-sp=' '
-
-build_failures=
-install_failures=
-
-for file in \
-  '!' '"' '#' '$' '%' '&' \' '(' ')' '*' '+' ',' '-' ':' ';' \
-  '<' '=' '>' '?' '@' '[' '\' ']' '^' '`' '{' '|' '}' '~' \
-  "$bs" "$cr" "$ff" "$ht" "$lf" "$sp" \
-  '@<:@' '@:>@' '@S|@' '@%:@' '@&t@' \
-  "a${sp}b" "a${sp}${sp}b" "a${lf}b" ... a:
-do
-  for test in build install; do
-    case $test in
-    build)
-      build=$file
-      dest=`pwd`/sub1;;
-    install)
-      build=sub1
-      dest=`pwd`/$file;;
-    esac
-
-    # Make sure this system supports this character in file names.
-    mkdir sub1 "./$file" || Exit 77
-
-    cd "$build"
-
-    ../configure --prefix "/$file-prefix" &&
-    $MAKE &&
-    DESTDIR=$dest file=$file $MAKE -e test-install-sep ||
-      eval "${test}_failures=\"\$${test}_failures$lf\$file\""
-
-    cd ..
-
-    rm -fr sub1 "./$file"
-  done
-done
-
-# The list of the above file names that cannot be used as a build directory
-# on a POSIX host.  This list should be empty, but is not due to limitations
-# in Autoconf, Automake, Make, M4, or the shell.
-expected_build_failures='
-"
-#
-$
-&
-'\''
-\
-`
-'"$lf"'
-@&t@
-a'"${lf}"'b'
-
-# Similarly, the list of file names that cannot be used as an install directory
-# on a POSIX host.  This list should also be empty.
-expected_install_failures='
-"
-#
-$
-'\''
-`
-'"$lf"'
-a'"${lf}"'b'
-
-fail=0
-for test in build install; do
-  eval failures=\$${test}_failures
-  case $failures in
-  ?*)
-    cat >&2 <<EOF
-$0: $test test failed for the following file names:$failures
-EOF
-    eval test \"\$failures\" = \"\$expected_${test}_failures\" || fail=1
-  esac
-done
-
-Exit $fail
-- 
1.7.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]