]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: fix spurious failure in test 'yacc-d-cxx.test'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 12 Apr 2011 16:19:41 +0000 (18:19 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 12 Apr 2011 16:19:41 +0000 (18:19 +0200)
* tests/yacc-d-cxx.test: Create ylwrap script before calling
automake for the first time, so that the script gets correctly
distributed.  Add checks verifying it indeed is.

ChangeLog
tests/yacc-d-cxx.test

index 871aadf2c679793ae774848d93622a923f7a1617..6e522d8fe657df0d75b4ed73b83ff3475e669090 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-04-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix spurious failure in test 'yacc-d-cxx.test'
+       * tests/yacc-d-cxx.test: Create ylwrap script before calling
+       automake for the first time, so that the script gets correctly
+       distributed.  Add checks verifying it indeed is.
+
 2011-04-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests cosmetics: remove redundant definitions of variable $tab
index 67e4dabdac02708de4eb945add6bc8849089f482..43813463cb8df3470d8ffc62bbddeda685ee5675 100755 (executable)
@@ -64,28 +64,30 @@ AC_CONFIG_FILES([foo/Makefile bar/Makefile baz/Makefile qux/Makefile])
 AC_OUTPUT
 END
 
-cat > Makefile.am <<'END'
-SUBDIRS = foo bar baz qux
-END
-
 mkdir foo bar baz qux baz/sub
 
 # These makefiles will be extended later.
-cat > foo/Makefile.am <<'END'
+cat > Makefile.am <<'END'
 .PHONY: echo-distcom
 echo-distcom:
        @echo ' ' $(DIST_COMMON) ' '
 END
-cp foo/Makefile.am bar/Makefile.am
-cp foo/Makefile.am baz/Makefile.am
-cp foo/Makefile.am qux/Makefile.am
+cp Makefile.am foo/Makefile.am
+cp Makefile.am bar/Makefile.am
+cp Makefile.am baz/Makefile.am
+cp Makefile.am qux/Makefile.am
+
+cat >> Makefile.am <<'END'
+SUBDIRS = foo bar baz qux
+END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE Makefile
 
 cp $testsrcdir/../lib/ylwrap .
 
+$AUTOMAKE Makefile
+
 # Try with -d in $(YFLAGS) (don't do this in real life!).
 cat >> foo/Makefile.am <<END
 bin_PROGRAMS = zardoz
@@ -155,6 +157,10 @@ test -f baz/sub/parse.h++
 test -f qux/maude-parse.cxx
 test -f qux/maude-parse.hxx
 
+# The ylwrap script must be shipped.
+$MAKE echo-distcom
+$MAKE -s echo-distcom | grep '[ /]ylwrap '
+
 # The generated C++ source and header files must be shipped.
 cd foo
 $MAKE echo-distcom
@@ -180,6 +186,7 @@ cd ..
 $MAKE distdir
 find $distdir # For debugging.
 
+test -f $distdir/ylwrap
 test -f $distdir/foo/parse.cc
 test -f $distdir/foo/parse.hh
 test -f $distdir/bar/parse.cpp