[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Egrep and test suite (Was: FYI: AS_EXIT)
From: |
Akim Demaille |
Subject: |
FYI: Egrep and test suite (Was: FYI: AS_EXIT) |
Date: |
06 Dec 2000 15:16:52 +0100 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
Daniele, I've just killed another suspicious part of the test suite
which might be responsible for a big part of the failures we observed.
Would it be possible that you run it again?
The ``bad'' news is that I couldn't find in your logs the error
messages `egrep' should have printed. One hope though: how do you
build the logs you send us? It is extremely important that you
include stderr, which basically means
./testsuite >testsuite.log 2>&1
FYI, here is the patch.
Index: ChangeLog
from Akim Demaille <address@hidden>
The SunOS' egrep fails to process properly the `egrep' invocations
of the test suite.
* tests/aclocal.m4 (AC_STATE_SAVE): If egrep fails, remove the
output file.
* tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Don't check `state-*'
if the files are not present.
* m4sugar.m4 (m4_join): Rename as...
(m4_smash): this.
* tests/aclocal.m4 (join): Move as...
* m4sugar.m4 (m4_flatten): this.
* autoconf.sh (trace.m4): Rename m4_smash as m4_flatten.
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.644
diff -u -u -r1.644 acgeneral.m4
--- acgeneral.m4 2000/12/06 08:58:42 1.644
+++ acgeneral.m4 2000/12/06 14:01:52
@@ -511,7 +511,7 @@
# ive ], [-Var-])end
# => -active--b--active-end
m4_define([AC_FOREACH],
-[m4_foreach([$1], m4_split(m4_strip(m4_join([$2]))), [$3])])
+[m4_foreach([$1], m4_split(m4_strip(m4_flatten([$2]))), [$3])])
Index: autoconf.sh
===================================================================
RCS file: /cvs/autoconf/autoconf.sh,v
retrieving revision 1.109
diff -u -u -r1.109 autoconf.sh
--- autoconf.sh 2000/12/06 10:53:58 1.109
+++ autoconf.sh 2000/12/06 14:01:53
@@ -434,7 +434,7 @@
# MODE can be:
# `at' -- the elements are enclosed in brackets.
# `star' -- the elements are listed as are.
- # `percent' -- the elements are `smashed': spaces are singled out,
+ # `percent' -- the elements are `flattened': spaces are singled out,
# and no new line remains.
define([_at_at],
[at_ifelse([$#], [1], [],
@@ -442,15 +442,15 @@
[[[$2]][$1]$0([$1], at_shift(at_shift($@)))])])
define([_at_percent],
[at_ifelse([$#], [1], [],
- [$#], [2], [at_smash([$2])],
- [at_smash([$2])[$1]$0([$1], at_shift(at_shift($@)))])])
+ [$#], [2], [at_flatten([$2])],
+ [at_flatten([$2])[$1]$0([$1], at_shift(at_shift($@)))])])
define([_at_star],
[at_ifelse([$#], [1], [],
[$#], [2], [[$2]],
[[$2][$1]$0([$1], at_shift(at_shift($@)))])])
- # Smash quotes its result.
- define([at_smash],
+ # FLATTEN quotes its result.
+ define([at_flatten],
[at_patsubst(at_patsubst(at_patsubst([[[$1]]],
[\\
]),
@@ -535,7 +535,7 @@
# $*, list of unquoted effective arguments.
if (arg == "*")
return "]at_star([" (separator ? separator : ",") "], $@)["
- # $%, list of smashed unquoted effective arguments.
+ # $%, list of flattened unquoted effective arguments.
if (arg == "%")
return "]at_percent([" (separator ? separator : ":") "], $@)["
}
Index: m4sugar.m4
===================================================================
RCS file: /cvs/autoconf/m4sugar.m4,v
retrieving revision 2.30
diff -u -u -r2.30 m4sugar.m4
--- m4sugar.m4 2000/12/06 08:58:42 2.30
+++ m4sugar.m4 2000/12/06 14:01:57
@@ -1333,17 +1333,17 @@
-# m4_join(STRING)
+# m4_flatten(STRING)
# ---------------
# If STRING contains end of lines, replace them with spaces. If there
# are backslashed end of lines, remove them. This macro is safe with
# active symbols.
# m4_define(active, ACTIVE)
-# m4_join([active
+# m4_flatten([active
# act\
# ive])end
# => active activeend
-m4_define([m4_join],
+m4_define([m4_flatten],
[m4_translit(m4_patsubst([[[$1]]], [\\
]), [
], [ ])])
@@ -1378,6 +1378,17 @@
+# m4_join(SEP, ARG1, ARG2...)
+# ---------------------------
+# Produce ARG1SEPARG2...SEPARGn.
+m4_defun([m4_join],
+[m4_case([$#],
+ [1], [],
+ [2], [[$2]],
+ [[$2][$1]m4_join([$1], m4_shift(m4_shift($@)))])])
+
+
+
# m4_append(MACRO-NAME, STRING)
# -----------------------------
# Redefine MACRO-NAME to hold its former content plus STRING at the
@@ -1484,7 +1495,7 @@
m4_if(m4_eval(m4_Cursor > m4_len(m4_Prefix)),
1, [m4_define([m4_Cursor], m4_len(m4_Prefix))
m4_Prefix])[]dnl
-m4_foreach_quoted([m4_Word], (m4_split(m4_strip(m4_join([$1])))),
+m4_foreach_quoted([m4_Word], (m4_split(m4_strip(m4_flatten([$1])))),
[m4_define([m4_Cursor], m4_eval(m4_Cursor + len(m4_Word) + 1))dnl
dnl New line if too long, else insert a space unless it is the first
dnl of the words.
Index: tests/aclocal.m4
===================================================================
RCS file: /cvs/autoconf/tests/aclocal.m4,v
retrieving revision 1.8
diff -u -u -r1.8 aclocal.m4
--- tests/aclocal.m4 2000/12/06 08:58:42 1.8
+++ tests/aclocal.m4 2000/12/06 14:01:57
@@ -1,16 +1,6 @@
# actest.m4 -*- autoconf -*-
# Additional Autoconf macros to ease testing.
-# join(SEP, ARG1, ARG2...)
-# ------------------------
-# Produce ARG1SEPARG2...SEPARGn.
-define([join],
-[m4_case([$#],
- [1], [],
- [2], [[$2]],
- [[$2][$1]join([$1], m4_shift(m4_shift($@)))])])
-
-
# AC_STATE_SAVE(FILE)
# ------------------
# Save the environment, but the variables we are allowed to touch.
@@ -28,10 +18,9 @@
# Some variables some shells use and change
# - POW_LIB
# From acfunctions.m4.
-AC_DEFUN([AC_STATE_SAVE],
+m4_defun([AC_STATE_SAVE],
[(set) 2>&1 |
- egrep -v -e \
-'join([|],
+ egrep -v -e 'm4_join([|],
[^ac_],
[^(CC|CFLAGS|CPP|GCC|CXX|CXXFLAGS|CXXCPP|GXX|F77|FFLAGS|FLIBS|G77)=],
[^(LIBS|LIBOBJS|LDFLAGS)=],
@@ -46,11 +35,14 @@
[^(AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|RANLIB|SET_MAKE|YACC)=],
[^(_|@|.[*#?].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS)=])' |
# There maybe variables spread on several lines, eg IFS, remove the dead
- # lines
+ # lines.
fgrep = >state-env.$1
- rm -f state-ls.$1
- ls -1 | grep -v '^state' | sort > state-ls.$1
-])
+# Some `egrep' choke on such a big regex (e.g., SunOS 4.1.3). In this
+# case just don't pay attention to the env.
+test $? = 0 || rm -f state-env.$1
+
+ls -1 | grep -v '^state' | sort >state-ls.$1
+])# AC_STATE_SAVE
@@ -58,7 +50,7 @@
# ----------------
# Related VALUE to NAME both with AC_SUBST and AC_DEFINE. This is
# used in the torture tests.
-AC_DEFUN([AC_DEFUBST],
+m4_defun([AC_DEFUBST],
[AC_DUMMY_VAR($1)="AC_DEFUBST_VALUE"
AC_DEFINE_UNQUOTED(AC_DUMMY_VAR($1),
"$AC_DUMMY_VAR($1)",
Index: tests/atspecific.m4
===================================================================
RCS file: /cvs/autoconf/tests/atspecific.m4,v
retrieving revision 1.31
diff -u -u -r1.31 atspecific.m4
--- tests/atspecific.m4 2000/12/06 08:58:42 1.31
+++ tests/atspecific.m4 2000/12/06 14:01:57
@@ -72,9 +72,11 @@
dnl Some tests might exit prematurely when they find a problem, in
dnl which case `env-after' is probably missing. Don't check it then.
-if test -f state-env.after; then
+if test -f state-env.before -a -f state-env.after; then
mv -f state-env.before expout
AT_CHECK([cat state-env.after], 0, expout)
+fi
+if test -f state-ls.before -a -f state-ls.after; then
mv -f state-ls.before expout
AT_CHECK([cat state-ls.after], 0, expout)
fi
- FYI: Egrep and test suite (Was: FYI: AS_EXIT),
Akim Demaille <=