automake
[Top][All Lists]
Advanced

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

Re: yaccvpath.test


From: Pavel Roskin
Subject: Re: yaccvpath.test
Date: Tue, 27 Feb 2001 22:47:11 -0500 (EST)

Hello, Alexandre!

>  Pavel> It fails on RedHat 6.2, but not 7.0. I believe it's a
>  Pavel> Perl issue. Not sure if I'll have time today to look at
>  Pavel> this.

It's not Perl. It's a timestamp quantization.

Some unices (including GNU/Linux) are not very precise with respect to the
timestamps. It's likely that parse.c and the new parse.y are created in
the same second, so parse.c will appear to be up-to-date.  Adding "sleep
3" (I have no idea what would be a minimal safe time) before the new
parse.y is created makes the test fail reliably:

make[2]: Entering directory `/usr/local/src/am1/tests/testSubDir/sub'
bison   ../parse.y && mv y.tab.c parse.c
../parse.y contains 1 useless nonterminal and 1 useless rule
mv: y.tab.c: No such file or directory
make[2]: *** [parse.c] Error 1

Well, another lame error in the few lines of the damned test! Setting
YACC=bison is absolutely wrong! It's not going to work this way.  Bison
creates files with different names by default. If we really don't trust
Autoconf to find YACC (probably we shouldn't, since we are testing not
Autoconf), let's use YACC="bison -y".

By the way, I don't understand why we need LEX. It's absolutely irrelevant
to the test.

Now we have a more interesting error:

make[3]: Leaving directory
`/usr/local/src/am1/tests/testSubDir/sub/foo-0.1/=build'
Error: files left after distclean
make[2]: *** [distcheck] Error 1
make[2]: Leaving directory `/usr/local/src/am1/tests/testSubDir/sub'
FAIL: yaccvpath.test

The file left after distclean is parse.c in the "=build" directory.

Just for reference, here's the patch I applied to yaccvpath.test

________________________
--- yaccvpath.test
+++ yaccvpath.test
@@ -40,12 +40,9 @@
 $needs_autoconf
 # Likewise for some other tools.
 (gcc -v) > /dev/null 2>&1 || exit 77
-(flex -V) > /dev/null 2>&1 || exit 77
 (bison -V) > /dev/null 2>&1 || exit 77

-LEX=flex
-export LEX
-YACC=bison
+YACC="bison -y"
 export YACC

 # Remove some files installed by defs.
@@ -61,6 +58,7 @@
 bison -y parse.y
 mv y.tab.c parse.c

+sleep 3
 cat >> parse.y << 'END'
 fubar : 'f' foobar {};
 END
________________________

Regards,
Pavel Roskin




reply via email to

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