[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests: fix spurious failures in yflags*.test
From: |
Ralf Wildenhues |
Subject: |
Re: [PATCH] tests: fix spurious failures in yflags*.test |
Date: |
Sat, 22 Jan 2011 14:24:34 +0100 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
* Stefano Lattarini wrote on Sat, Jan 22, 2011 at 01:57:45PM CET:
> Hmpf. The tests `yflags.test' and `yflags2.test' fail if an environment
> variable YACC is defined, because they call `make -e', thus letting the
> value of that variable override the value we forced at configure time.
>
> The attached patch fixes this.
>
> OK for a temporary branch yflags-test-fixes (stemming out of commit
> v1.11-136-gfee7d0d "Fix minor testsuite issues, update docs, for
> Yacc/Lex changes"), to be merged into maint and yacc-work?
Can't you `unset YACC || :' in the tests? That would seem like a more
obviously-safe workaround.
Consider that preapproved; or, if that is not possible, then OK for the
original patch, but with fix below.
Thanks,
Ralf
> --- a/tests/yflags.test
> +++ b/tests/yflags.test
> @@ -23,17 +23,20 @@
>
> set -e
>
> -cat >fake-yacc <<'END'
> +mkdir bin
> +cat > bin/fake-yacc <<'END'
> #!/bin/sh
> echo '/*' "$*" '*/' >y.tab.c
> echo 'extern int dummy;' >> y.tab.c
> END
> -chmod a+x fake-yacc
> +chmod a+x bin/fake-yacc
> +PATH=`pwd`/bin:$PATH_SEPARATOR$PATH
There is an extra : in here, causing '.' to be added to PATH.
Same in the other test.
> +YACC=fake-yacc; export YACC
>
> cat >> configure.in <<'END'
> AC_PROG_CC
> -# Simulate presence of Yacc using our fake-yacc script.
> -AC_SUBST([YACC], ['$(abs_top_srcdir)'/fake-yacc])
> +AC_PROG_YACC
> AC_OUTPUT
> END