* stefano.lattar...@gmail.com wrote on Thu, Dec 23, 2010 at 12:27:44PM CET: > In view of soon-to-follow refactorings (still in the pursuit of a > fix for Automake bug#7669 a.k.a. PR/547), we add some more tests
How about s/we // > on AUTOMAKE_OPTIONS support, to prevent obvious regressions. > > * tests/amopts-indirect.test: New test. > * tests/amopts-location.test: Likewise. > * tests/Makefile.am (TESTS): Update. > --- /dev/null > +++ b/tests/amopts-indirect.test > +# Check that AUTOMAKE_OPTIONS support indirections. s/indirections/variable expansion/ and adjust test name? > +cat > Makefile.am <<'END' > +AUTOMAKE_OPTIONS = $(foo) foreign > +AUTOMAKE_OPTIONS += ${bar} > +foo = $(foo1) > +foo1 = ${foo2} > +foo2 = -Wnone > +foo2 += $(foo3) > +foo3 = -Wno-error > +bar = -Wportability This seems a wee bit convoluted (i.e., hard to parse by human upon first reading), but oh well, that's more of a testsuite QoI nit. > +## This will give a warning with `-Wportability' > +zardoz := > +## This would give a warning with `-Woverride'. > +install: > +END > + > +$ACLOCAL > +AUTOMAKE_run 0 > +grep '^Makefile\.am:.*:=.*not portable' stderr > +grep README stderr && Exit 1 > +$EGREP '(install|override)' stderr && Exit 1 > --- /dev/null > +++ b/tests/amopts-location.test > @@ -0,0 +1,80 @@ > +# Check that errors about AUTOMAKE_OPTIONS refers to correct > +# locations. > + > +. ./defs || Exit 1 > + > +set -e > + > +cat > Makefile.am <<'END' > +# comment \ > +# continued > +include Makefile0.am > +END > + > +cat > Makefile0.am <<'END' > +#1 > +#2 > +#3 > +include Makefile1.am > +END > + > +cat > Makefile1.am <<'END' > +AUTOMAKE_OPTIONS = tar-pax > +# comment > +END > + > +cat > Makefile2.am <<'END' > +## automake comment > +bar: > + : > +line = \ > +continued > +AUTOMAKE_OPTIONS = tar-ustar > +END > + > +cat > Makefile3.am <<'END' > +quux = a > +AUTOMAKE_OPTIONS = > +quux += b > +AUTOMAKE_OPTIONS += tar-v7 > +zardoz = 1 > +END > + > +cat >>configure.in <<'END' > +AC_CONFIG_FILES([Makefile2 Makefile3]) > +END > + > +$ACLOCAL > +AUTOMAKE_fails What are the expected failures here? (Not sure if they should be mentioned in the test source, but I sure am curious about what automake prints.) Just to be sure, this patch does not rely upon any of the previous ones, right? > +grep '^Makefile1\.am:1:.*tar-pax' stderr > +grep '^Makefile2\.am:6:.*tar-ustar' stderr > +grep '^Makefile3\.am:2:.*tar-v7' stderr > +grep '^Makefile\.am:3:.*Makefile0\.am.*included from here' stderr > +grep '^Makefile0\.am:4:.*Makefile1\.am.*included from here' stderr > +cat stderr \ > + | grep -v '^Makefile\.am:3:' \ > + | grep -v '^Makefile0\.am:4:' \ > + | grep -v '^Makefile1\.am:1:' \ > + | grep -v '^Makefile2\.am:6:' \ > + | grep -v '^Makefile3\.am:2:' \ > + | grep . && Exit 1 What is this for, to ensure there are not more warnings? How about just testing for 5 lines of output? Even that is a bit fragile though, as we might have multi-line warnings. Thanks, Ralf