bug-texinfo
[Top][All Lists]
Advanced

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

Re: EGREP used but not defined in tests


From: Gavin Smith
Subject: Re: EGREP used but not defined in tests
Date: Wed, 7 Dec 2016 20:31:39 +0000

On 26 November 2016 at 18:08, Ken Brown <address@hidden> wrote:
> The variable EGREP is used in info/t/Init-inter.inc but not defined. This
> leads to errors like the following when the tests are run on Cygwin:
>
> info/t/Init-inter.inc: line 28: -iv: command not found
>
> The following patch fixes it:
>
> --- info/Makefile.am    (revision 7534)
> +++ info/Makefile.am    (working copy)
> @@ -164,6 +164,8 @@
>         t/next-quoted.sh \
>         t/help.sh
>
> +AM_TESTS_ENVIRONMENT = EGREP="$(EGREP)"; export EGREP;
> +
>  EXTRA_DIST += $(TESTS) $(XFAIL_TESTS) \
>    t/README t/infodir \
>    t/Init-inter.inc t/Init-test.inc t/Timeout-test.inc \
>
>
> Ken
>

This code was actually copied from the texi2dvi program. Following
that, it would be easy to add the missing line

: ${EGREP=egrep}

to the file.

Alternatively, we could just assume that the path separator is ":" in
t/Init-inter.inc. I doubt that the tests would work on any system
where semicolon was needed as the path separator. Any objections to
this? For reference, here's the code from texi2dvi:

# In case someone pedantic insists on using grep -E.
: ${EGREP=egrep}

# Systems which define $COMSPEC or $ComSpec use semicolons to separate
# directories in TEXINPUTS -- except for Cygwin and Msys, where COMSPEC
# might be inherited, but : is used.

# In the case of Msys, uname returns a value derived from MSYSTEM, as
# MSYSTEM is user configurable, it is not so safe to use it to detect
# Msys. It is safer to use OSTYPE, this is why we set MSYSTEM to
# $OSTYPE before calling uname
if test -n "$COMSPEC$ComSpec" \
   && MSYSTEM=$OSTYPE uname | $EGREP -iv 'cygwin|msys' >/dev/null; then
  path_sep=";"
else
  path_sep=":"
fi



reply via email to

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