automake-patches
[Top][All Lists]
Advanced

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

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


From: Stefano Lattarini
Subject: [PATCH] Overhauled and modularized tests in `instspc.test'.
Date: Sun, 9 May 2010 14:51:57 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; )

Hello automakers.

The test `instspc.test' is IMO way too big and too fragile.

It is so long (in its looping over and over again) that it produces
an unreadable log, making it very difficult to find out the reason
of failures.

Also, it  is too much monolithic, a single (possibly 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 patch should solve this problem, by separating
`instspc.test' into many smaller, self-contained, auto-generated
tests.  This adds some complexity to our build system, but its a
good trade-off IMO.

Regards,
     Stefano

-*-*-

 ChangeLog                          |   35 ++++++++++
 bootstrap                          |    5 +-
 tests/.gitignore                   |    5 +-
 tests/Makefile.am                  |   34 ++++++++-
 tests/Makefile.in                  |   88 ++++++++++++++++++++----
 tests/gen-instspc-tests            |  111 
++++++++++++++++++++++++++++++
 tests/{instspc.test => instspc.sh} |  133 
++++++++++++------------------------
 7 files changed, 303 insertions(+), 108 deletions(-)
From 805adde3e7c00bf1eafa22d1cca75c4727b15f90 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Sun, 9 May 2010 14:14:56 +0200
Subject: [PATCH] Overhauled and modularized tests in `instspc.test'.

The test `instspc.test' was way too big and fragile.  It was so
long (looping over and over again) that it produced an unreadable
log, making it very difficult to find out the reason of failures.
Also, it was too much monolithic, a single (possibly spurious)
failure in a corner case causing the wole test to fail (even if
everything worked as expected in the other 99% of cases).
The present change should solve this problem, 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', and 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 accordingly (it will
be included by all the newly generated `instspc*.test').
* tests/Makefile.am ($(srcdir)/instspc-tests.am): Include this
snippet, which 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 accordingly.
---
 ChangeLog                          |   35 ++++++++++
 bootstrap                          |    5 +-
 tests/.gitignore                   |    5 +-
 tests/Makefile.am                  |   34 ++++++++-
 tests/Makefile.in                  |   88 ++++++++++++++++++++----
 tests/gen-instspc-tests            |  111 ++++++++++++++++++++++++++++++
 tests/{instspc.test => instspc.sh} |  133 ++++++++++++------------------------
 7 files changed, 303 insertions(+), 108 deletions(-)
 create mode 100755 tests/gen-instspc-tests
 rename tests/{instspc.test => instspc.sh} (58%)
 mode change 100755 => 100644

diff --git a/ChangeLog b/ChangeLog
index 71b0d9b..ef6eaf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+2010-05-09  Stefano Lattarini  <address@hidden>
+
+       Overhauled and modularized tests in `instspc.test'.
+       The test `instspc.test' was way too big and fragile.  It was so
+       long (looping over and over again) that it produced an unreadable
+       log, making it very difficult to find out the reason of failures.
+       Also, it was too much monolithic, a single (possibly 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 this problem, 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', and 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 accordingly (it will
+       be included by all the newly generated `instspc*.test').
+       * tests/Makefile.am ($(srcdir)/instspc-tests.am): Include this
+       snippet, which 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 accordingly.
+
 2010-04-25  Ralf Wildenhues  <address@hidden>
 
        Warning and error message formatting cleanups.
diff --git a/bootstrap b/bootstrap
index 2a86345..5208754 100755
--- a/bootstrap
+++ b/bootstrap
@@ -2,8 +2,8 @@
 
 # This script helps bootstrap automake, when checked out from git.
 #
-# Copyright (C) 2002, 2003, 2004, 2007, 2008  Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2003, 2004, 2007, 2008, 2010 Free Software
+# Foundation, Inc.
 # written by Pavel Roskin <address@hidden> September 2002
 #
 # This program is free software; you can redistribute it and/or modify
@@ -127,6 +127,7 @@ dosubst automake.in automake.tmp
 # Create tests/parallel-tests.am.
 cd tests
 $BOOTSTRAP_SHELL ./gen-parallel-tests > parallel-tests.am
+$BOOTSTRAP_SHELL ./gen-instspc-tests "`pwd`"
 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 cff34c5..c3bc609 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
@@ -38,7 +42,28 @@ $(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
+
+# FIXME: Here we'd like to have also a dependency like:
+#   $(instspc_tests): gen-instspc-tests Makefile.am
+# but that could cause problems and race conditions with parallel
+# non-GNU make executions (multiple instances of gen-instspc-tests
+# are run in parallel, and chaos ensues).
+# to the following hack.
+$(srcdir)/instspc-tests.am: gen-instspc-tests Makefile.am
+       $(AM_V_GEN)cd $(srcdir) && $(SHELL) ./gen-instspc-tests $(srcdir)
+
+# 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 \
@@ -388,7 +413,6 @@ instman2.test \
 instmany.test \
 instmany-mans.test \
 instmany-python.test \
-instspc.test \
 interp.test \
 interp2.test \
 java.test \
@@ -779,9 +803,11 @@ yacc7.test \
 yacc8.test \
 yaccpp.test \
 yaccvpath.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.
 check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 3ff9012..269f1a9 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,13 +250,12 @@ 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 \
@@ -280,7 +279,59 @@ 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 \
@@ -629,7 +680,6 @@ instman2.test \
 instmany.test \
 instmany-mans.test \
 instmany-python.test \
-instspc.test \
 interp.test \
 interp2.test \
 java.test \
@@ -1020,9 +1070,9 @@ yacc7.test \
 yacc8.test \
 yaccpp.test \
 yaccvpath.test \
-$(parallel_tests)
+$(parallel_tests) \
+$(instspc_tests)
 
-EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
 
 # Each test case depends on defs, aclocal, and automake.
 check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
@@ -1030,7 +1080,7 @@ 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*) \
@@ -1390,6 +1440,18 @@ $(parallel_tests): Makefile.am
        } > address@hidden
        $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
 
+# FIXME: Here we'd like to have also a dependency like:
+#   $(instspc_tests): gen-instspc-tests Makefile.am
+# but that could cause problems and race conditions with parallel
+# non-GNU make executions (multiple instances of gen-instspc-tests
+# are run in parallel, and chaos ensues).
+# to the following hack.
+$(srcdir)/instspc-tests.am: gen-instspc-tests Makefile.am
+       $(AM_V_GEN)cd $(srcdir) && $(SHELL) ./gen-instspc-tests $(srcdir)
+
+# All instspc*.test tests work by sourcing the instspc.sh script.
+$(instspc_tests:.test=.log): $(srcdir)/instspc.sh
+
 clean-local: clean-local-check
 .PHONY: clean-local-check
 clean-local-check:
diff --git a/tests/gen-instspc-tests b/tests/gen-instspc-tests
new file mode 100755
index 0000000..4394ba4
--- /dev/null
+++ b/tests/gen-instspc-tests
@@ -0,0 +1,111 @@
+#! /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 tests checking that building from, or installing to,
+# directories with shell metacharacters succeed.
+
+# Also generate a Makefile fragment defining the list of generated
+# tests ($(instspc_tests)), and the list of those tests expected to
+# fail ($(xfail_instspc_test)).
+
+# Original report from James Amundson about file names with spaces.
+# Other characters added by Paul Eggert.
+
+set -e # abort on unhandled errors
+
+srcdir=${1-`pwd`}
+
+# Some control characters that are white space:
+# back space, carriage return, form feed, horizontal tab, line feed, space
+bs=''
+cr='
'
+ff=''
+ht='   '
+lf='
+'
+sp=' '
+
+single_quote() {
+   case $1 in
+     *\'*) quoted=\'`printf '%s' "$1" | sed "s/'/'\\\\\\\\''/"`\';;
+        *) quoted="'$1'"
+   esac
+}
+
+am=$srcdir/instspc-tests.am
+
+rm -f $am $am-t
+
+cat >>$am-t <<END
+## Generated by gen-instspc-tests.  Edit Makefile.am instead of this.
+instspc_tests =
+instspc_xfail_tests =
+END
+
+cnt=0
+for weird_chars in \
+  '!' '"' '#' '$' '%' '&' \' '(' ')' '*' '+' ',' '-' ':' ';' \
+  '<' '=' '>' '?' '@' '[' '\' ']' '^' '`' '{' '|' '}' '~' \
+  "$bs" "$cr" "$ff" "$ht" "$lf" "$sp" \
+  '@<:@' '@:>@' '@S|@' '@%:@' '@&t@' \
+  "a${sp}b" "a${sp}${sp}b" "a${lf}b" ... a:
+do
+  cnt=`expr $cnt + 1`
+  for action in build install; do
+    # Simply naming the tests using incremental numbers seems to
+    # be the best policy.
+    tst=instspc$cnt-$action.test
+    single_quote "$weird_chars" # will set $quoted
+    rm -f $tst $tst-t
+    cat > $tst-t <<EOF
+#!/bin/sh
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
+action=$action
+weird_file_name=$quoted
+. '$srcdir/instspc.sh'
+EOF
+    chmod a+x,a-w $tst-t
+    mv -f $tst-t $tst
+    echo "instspc_tests += $tst" >> $am-t
+    if test x"$action" = x"build"; then
+      # 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.
+      case $weird_chars in
+        \"|\#|\$|\&|\'|\\|\`|"$lf"|'@&t@'|"a${lf}b")
+          echo "instspc_xfail_tests += $tst" >> $am-t;;
+      esac
+    elif test x"$action" = x"install"; then
+      # Similarly, the list of file names that cannot be used as an
+      # install directory on a POSIX host.  This list should also be
+      # empty.
+      case $weird_chars in
+        \"|\#|\$|\'|\`|"$lf"|"a${lf}b")
+          echo "instspc_xfail_tests += $tst" >> $am-t;;
+      esac
+    else
+      # CANTHAPPEN
+      echo "$0: INTERNAL ERROR: \$action='$action'" >&2
+      exit 255
+    fi
+  done
+done
+
+chmod a-w $am-t
+mv -f $am-t $am
diff --git a/tests/instspc.test b/tests/instspc.sh
old mode 100755
new mode 100644
similarity index 58%
rename from tests/instspc.test
rename to tests/instspc.sh
index 414b3e5..05d7dbf
--- a/tests/instspc.test
+++ b/tests/instspc.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# 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
@@ -14,7 +14,14 @@
 # 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.
+# 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 variables
+# `$weird_file_name' (to any non-empty string) and `$action' (to either
+# "build" or "install").
+
 # Original report from James Amundson about file names with spaces.
 # Other characters added by Paul Eggert.
 
@@ -23,13 +30,31 @@
 # 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.
+# Sanity check 1.
+if test -z "$weird_file_name"; then
+  echo "$me: FATAL: \$weird_file_name unset or empty"
+  Exit 1
+fi
+
+# Sanity check 2.
+case $action in
+  "") echo "$me: FATAL: \$action unset or empty"; Exit 1;;
+  build|install) ;;
+  *) echo "$me: FATAL: invalid \$action: '$action'"; Exit 1;;
+esac
+
+echo "INFO: \$action=$action"
+echo "INFO: \$weird_file_name='$weird_file_name'"
+
+# Skip if this system doesn't support this characters in file names.
+mkdir "./$weird_file_name" || Exit 77
+
+mkdir sub1
 
 cat >> configure.in <<'EOF'
 AC_PROG_CC
@@ -78,6 +103,7 @@ 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'
@@ -100,88 +126,19 @@ $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
+case $action in
+  build)
+    build=$weird_file_name
+    dest=`pwd`/sub1;;
+  install)
+    build=sub1
+    dest=`pwd`/$weird_file_name;;
+esac
+
+cd "./$build"
+
+../configure --prefix "/$weird_file_name-prefix"
+$MAKE
+DESTDIR="$dest" file="$weird_file_name" $MAKE -e test-install-sep
 
-Exit $fail
+:
-- 
1.6.5


reply via email to

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