From: Stefano Lattarini Date: Mon, 6 Sep 2010 14:52:25 +0000 (+0200) Subject: Internationalization tests: prefer `make distdir' over `make dist'. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=884e0a75879e73c436c9c116dfde6732ff7e9dff;p=thirdparty%2Fautomake.git Internationalization tests: prefer `make distdir' over `make dist'. Instead of running `make dist', then uncompressing the created tarball, and then grepping the uncompressed tar archive, we can simply run `make distdir' and analyze the contents of the created distibution directory. This is both faster and cleaner. * tests/pot-msgidbugs.test: Test updated to use `make distdir' instead of `make dist' where possible. * tests/pot-no-linguas.test: Likewise. * tests/pot-override1.test: Likewise. * tests/pot-xgettext1.test: Likewise. * tests/pot-xgettext2.test: Likewise. * tests/pot-xgettext3.test: Likewise. * tests/pot-xgettext4.test: Likewise. * tests/pot-download1.test: Likewise, and check the created distdir instead of the distribution tarball (which is not even created anymore). ($distdir): New variable. * tests/pot-format-csharp1.test: Likewise. * tests/pot-format-java1.test: Likewise. * tests/pot-format-java2.test: Likewise. * tests/pot-format-qt1.test: Likewise. * tests/pot-format-tcl1.test: Likewise. * tests/pot-linguas.test: Likewise. * tests/pot-noinst.test: Likewise. * tests/pot-samedir.test: Likewise. * tests/pot-topsrcdir.test: Likewise. --- diff --git a/ChangeLog b/ChangeLog index 0246cbf6b..fbead47b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,32 @@ 2010-09-06 Stefano Lattarini + Internationalization tests: prefer `make distdir' over `make dist'. + Instead of running `make dist', then uncompressing the created + tarball, and then grepping the uncompressed tar archive, we can + simply run `make distdir' and analyze the contents of the created + distibution directory. This is both faster and cleaner. + * tests/pot-msgidbugs.test: Test updated to use `make distdir' + instead of `make dist' where possible. + * tests/pot-no-linguas.test: Likewise. + * tests/pot-override1.test: Likewise. + * tests/pot-xgettext1.test: Likewise. + * tests/pot-xgettext2.test: Likewise. + * tests/pot-xgettext3.test: Likewise. + * tests/pot-xgettext4.test: Likewise. + * tests/pot-download1.test: Likewise, and check the created + distdir instead of the distribution tarball (which is not even + created anymore). + ($distdir): New variable. + * tests/pot-format-csharp1.test: Likewise. + * tests/pot-format-java1.test: Likewise. + * tests/pot-format-java2.test: Likewise. + * tests/pot-format-qt1.test: Likewise. + * tests/pot-format-tcl1.test: Likewise. + * tests/pot-linguas.test: Likewise. + * tests/pot-noinst.test: Likewise. + * tests/pot-samedir.test: Likewise. + * tests/pot-topsrcdir.test: Likewise. + Fixlets for internationalization tests. * tests/pot-copyright.test: Add trailing `:' command. Use `$MAKE', not bare `make'. diff --git a/tests/pot-download1.test b/tests/pot-download1.test index 01aead170..8198d7edb 100755 --- a/tests/pot-download1.test +++ b/tests/pot-download1.test @@ -46,6 +46,8 @@ $ACLOCAL $AUTOMAKE -a $AUTOCONF +distdir=$me-1.0 + for builddir in . sub; do if test $builddir = '.'; then sourcedir='.' @@ -62,12 +64,10 @@ for builddir in . sub; do $MAKE install test -f "$instdir"/share/locale/de/LC_MESSAGES/clisp.mo - # Check that after "make dist", the tarball does not include the German + # Check that the distribution tarball does not include the German # translation. - $MAKE dist - gzip -d -c < pot-download1-1.0.tar.gz | tar tf - > filelist - grep '^pot-download1-1\.0/clisp-de\.po$' filelist && Exit 1 - rm -f filelist + $MAKE distdir + test ! -r $distdir/clisp-de.po # Sanity check. $MAKE distcheck diff --git a/tests/pot-format-csharp1.test b/tests/pot-format-csharp1.test index 1daf13f68..7e85c4d18 100755 --- a/tests/pot-format-csharp1.test +++ b/tests/pot-format-csharp1.test @@ -113,6 +113,8 @@ msgid "Hello, world!" msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -166,11 +168,11 @@ for builddir in . sub; do test ! -f "$instdir"/share/locale/fr_CA@latin/LC_MESSAGES/foo-bar.mo test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/posub/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -189,17 +191,16 @@ for builddir in . sub; do # Check that the tarball contains posub/foo-bar-{de,fr}.{po,resources.dll} # but not the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-format-csharp1-1.0.tar.gz | tar tf - > filelist - grep '^pot-format-csharp1-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-format-csharp1-1\.0/posub/de/foo-bar\.resources\.dll$' filelist - grep '^pot-format-csharp1-1\.0/posub/foo-bar-fr_CA@latin\.po$' filelist - grep '^pot-format-csharp1-1\.0/posub/fr-CA-Latn/foo-bar\.resources\.dll$' filelist - grep '^pot-format-csharp1-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-format-csharp1-1\.0/posub/es/foo-bar\.resources\.dll$' filelist && Exit 1 - grep '^pot-format-csharp1-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1 - grep '^pot-format-csharp1-1\.0/posub/foo-bar-fr_CA@latin\.mo$' filelist && Exit 1 - grep '^pot-format-csharp1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/de/foo-bar.resources.dll + test -f $distdir/posub/foo-bar-fr_CA@latin.po + test -f $distdir/posub/fr-CA-Latn/foo-bar.resources.dll + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/es/foo-bar.resources.dll + test ! -r $distdir/posub/foo-bar-de.mo + test ! -r $distdir/posub/foo-bar-fr_CA@latin.mo + test ! -r $distdir/posub/foo-bar-es.mo # Sanity check. $MAKE distcheck diff --git a/tests/pot-format-java1.test b/tests/pot-format-java1.test index e148d43b7..c5fdfd48f 100755 --- a/tests/pot-format-java1.test +++ b/tests/pot-format-java1.test @@ -114,6 +114,8 @@ msgid "Hello, world!" msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -167,11 +169,11 @@ for builddir in . sub; do test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/posub/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -190,17 +192,16 @@ for builddir in . sub; do # Check that the tarball contains posub/foo-bar-{de,fr}.{po,properties} # but not the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-format-java1-1.0.tar.gz | tar tf - > filelist - grep '^pot-format-java1-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-format-java1-1\.0/posub/foo-bar_de\.properties$' filelist - grep '^pot-format-java1-1\.0/posub/foo-bar-fr\.po$' filelist - grep '^pot-format-java1-1\.0/posub/foo-bar_fr\.properties$' filelist - grep '^pot-format-java1-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-format-java1-1\.0/posub/foo-bar_es\.properties$' filelist && Exit 1 - grep '^pot-format-java1-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1 - grep '^pot-format-java1-1\.0/posub/foo-bar-fr\.mo$' filelist && Exit 1 - grep '^pot-format-java1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar_de.properties + test -f $distdir/posub/foo-bar-fr.po + test -f $distdir/posub/foo-bar_fr.properties + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/foo-bar_es.properties + test ! -r $distdir/posub/foo-bar-de.mo + test ! -r $distdir/posub/foo-bar-fr.mo + test ! -r $distdir/posub/foo-bar-es.mo # Sanity check. $MAKE distcheck diff --git a/tests/pot-format-java2.test b/tests/pot-format-java2.test index ef60cf7fa..644bc47fb 100755 --- a/tests/pot-format-java2.test +++ b/tests/pot-format-java2.test @@ -114,6 +114,8 @@ msgid "Hello, world!" msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -167,11 +169,11 @@ for builddir in . sub; do test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/posub/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -190,17 +192,16 @@ for builddir in . sub; do # Check that the tarball contains posub/foo-bar-{de,fr}.{po,class} but not # the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-format-java2-1.0.tar.gz | tar tf - > filelist - grep '^pot-format-java2-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-format-java2-1\.0/posub/foo-bar_de\.class$' filelist - grep '^pot-format-java2-1\.0/posub/foo-bar-fr\.po$' filelist - grep '^pot-format-java2-1\.0/posub/foo-bar_fr\.class$' filelist - grep '^pot-format-java2-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-format-java2-1\.0/posub/foo-bar_es\.class$' filelist && Exit 1 - grep '^pot-format-java2-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1 - grep '^pot-format-java2-1\.0/posub/foo-bar-fr\.mo$' filelist && Exit 1 - grep '^pot-format-java2-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar_de.class + test -f $distdir/posub/foo-bar-fr.po + test -f $distdir/posub/foo-bar_fr.class + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/foo-bar_es.class + test ! -r $distdir/posub/foo-bar-de.mo + test ! -r $distdir/posub/foo-bar-fr.mo + test ! -r $distdir/posub/foo-bar-es.mo # Sanity check. $MAKE distcheck diff --git a/tests/pot-format-qt1.test b/tests/pot-format-qt1.test index ca6da0bc8..c88f6cd7f 100755 --- a/tests/pot-format-qt1.test +++ b/tests/pot-format-qt1.test @@ -139,6 +139,8 @@ msgid "Hello, world!" msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -190,11 +192,11 @@ for builddir in . sub; do test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/posub/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -211,17 +213,16 @@ for builddir in . sub; do # Check that the tarball contains posub/foo-bar-{de,fr}.{po,qm} but not # the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-format-qt1-1.0.tar.gz | tar tf - > filelist - grep '^pot-format-qt1-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-format-qt1-1\.0/posub/foo-bar-de\.qm$' filelist - grep '^pot-format-qt1-1\.0/posub/foo-bar-fr\.po$' filelist - grep '^pot-format-qt1-1\.0/posub/foo-bar-fr\.qm$' filelist - grep '^pot-format-qt1-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-format-qt1-1\.0/posub/foo-bar-es\.qm$' filelist && Exit 1 - grep '^pot-format-qt1-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1 - grep '^pot-format-qt1-1\.0/posub/foo-bar-fr\.mo$' filelist && Exit 1 - grep '^pot-format-qt1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar-de.qm + test -f $distdir/posub/foo-bar-fr.po + test -f $distdir/posub/foo-bar-fr.qm + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/foo-bar-es.qm + test ! -r $distdir/posub/foo-bar-de.mo + test ! -r $distdir/posub/foo-bar-fr.mo + test ! -r $distdir/posub/foo-bar-es.mo # Sanity check. $MAKE distcheck diff --git a/tests/pot-format-tcl1.test b/tests/pot-format-tcl1.test index 284b1ce1b..ab3d5ae9d 100755 --- a/tests/pot-format-tcl1.test +++ b/tests/pot-format-tcl1.test @@ -109,6 +109,8 @@ msgid "Hello, world!" msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -162,11 +164,11 @@ for builddir in . sub; do test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/posub/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -185,17 +187,16 @@ for builddir in . sub; do # Check that the tarball contains posub/foo-bar-{de,fr}.{po,msg} but not # the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-format-tcl1-1.0.tar.gz | tar tf - > filelist - grep '^pot-format-tcl1-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-format-tcl1-1\.0/posub/foo-bar/de\.msg$' filelist - grep '^pot-format-tcl1-1\.0/posub/foo-bar-fr_CA\.po$' filelist - grep '^pot-format-tcl1-1\.0/posub/foo-bar/fr_ca\.msg$' filelist - grep '^pot-format-tcl1-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-format-tcl1-1\.0/posub/foo-bar/es\.msg$' filelist && Exit 1 - grep '^pot-format-tcl1-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1 - grep '^pot-format-tcl1-1\.0/posub/foo-bar-fr_CA\.mo$' filelist && Exit 1 - grep '^pot-format-tcl1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar/de.msg + test -f $distdir/posub/foo-bar-fr_CA.po + test -f $distdir/posub/foo-bar/fr_ca.msg + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/foo-bar/es.msg + test ! -r $distdir/posub/foo-bar-de.mo + test ! -r $distdir/posub/foo-bar-fr_CA.mo + test ! -r $distdir/posub/foo-bar-es.mo # Sanity check. $MAKE distcheck diff --git a/tests/pot-linguas.test b/tests/pot-linguas.test index dd7bc9481..7557b876b 100755 --- a/tests/pot-linguas.test +++ b/tests/pot-linguas.test @@ -120,6 +120,8 @@ msgid "See the documentation for details." msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -172,11 +174,11 @@ END test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo fi - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/posub/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -191,14 +193,12 @@ END # Check that the tarball contains posub/foo-bar-{de,fr}.{po,mo} but not # the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-linguas-1.0.tar.gz | tar tf - > filelist - grep '^pot-linguas-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-linguas-1\.0/posub/foo-bar-de\.mo$' filelist - grep '^pot-linguas-1\.0/posub/foo-bar-fr\.po$' filelist - grep '^pot-linguas-1\.0/posub/foo-bar-fr\.mo$' filelist - grep '^pot-linguas-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-linguas-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar-de.mo + test -f $distdir/posub/foo-bar-fr.po + test -f $distdir/posub/foo-bar-fr.mo + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/foo-bar-es.mo # Try modifying a source file. cat > $sourcedir/src/main.c << 'END' @@ -245,7 +245,7 @@ END cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po cmp $sourcedir/posub/foo-bar-es.mobak $sourcedir/posub/foo-bar-es.mo - # Check that "make dist" updates the POT file, the PO files, and the + # Check that "make distdir" updates the POT file, the PO files, and the # MO files listed in the _LINGUAS variable, regardless whether LINGUAS # was specified or not. cp -p $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot @@ -253,7 +253,7 @@ END cp -p $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo cp -p $sourcedir/posub/foo-bar-fr.pobak $sourcedir/posub/foo-bar-fr.po cp -p $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo - $MAKE dist + $MAKE distdir grep great $sourcedir/posub/foo-bar.pot # NOTE: This is *not* a useless use of cat. See comments above. cat $sourcedir/posub/foo-bar-de.po | grep great diff --git a/tests/pot-msgidbugs.test b/tests/pot-msgidbugs.test index 3b3b954ee..aba3df28c 100755 --- a/tests/pot-msgidbugs.test +++ b/tests/pot-msgidbugs.test @@ -87,11 +87,11 @@ for builddir in . sub1; do $sourcedir/configure --prefix="$instdir" $MAKE - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -150,11 +150,11 @@ for builddir in . sub2; do $sourcedir/configure --prefix="$instdir" $MAKE - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot diff --git a/tests/pot-no-linguas.test b/tests/pot-no-linguas.test index 86039d82d..4f34264ee 100755 --- a/tests/pot-no-linguas.test +++ b/tests/pot-no-linguas.test @@ -113,11 +113,11 @@ int main () } END - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -156,8 +156,8 @@ END $MAKE diff $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot - # Check that "make dist" updates the POT file. - $MAKE dist + # Check that "make distdir" updates the POT file. + $MAKE distdir grep great $sourcedir/posub/foo-bar.pot # Check that "make install" updates the POT file. diff --git a/tests/pot-noinst.test b/tests/pot-noinst.test index 047a3282d..377358388 100755 --- a/tests/pot-noinst.test +++ b/tests/pot-noinst.test @@ -117,6 +117,8 @@ msgid "See the documentation for details." msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -153,12 +155,12 @@ END test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo - # Check that "make dist" creates the expected .pot file, .po files + # Check that "make distdir" creates the expected .pot file, .po files # and .mo files. # (They are created under $sourcedir, because the files are distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -173,14 +175,13 @@ END # Check that the tarball contains posub/foo-bar-{de,fr}.{po,mo} but not # the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-noinst-1.0.tar.gz | tar tf - > filelist - grep '^pot-noinst-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-noinst-1\.0/posub/foo-bar-de\.mo$' filelist - grep '^pot-noinst-1\.0/posub/foo-bar-fr\.po$' filelist - grep '^pot-noinst-1\.0/posub/foo-bar-fr\.mo$' filelist - grep '^pot-noinst-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-noinst-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar-de.mo + test -f $distdir/posub/foo-bar-fr.po + test -f $distdir/posub/foo-bar-fr.mo + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/foo-bar-es.mo # Try modifying a source file. cat > $sourcedir/src/main.c << 'END' @@ -221,10 +222,10 @@ END cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po cmp $sourcedir/posub/foo-bar-es.mobak $sourcedir/posub/foo-bar-es.mo - # Check that "make dist" updates the POT file, the PO files, and the + # Check that "make distdir" updates the POT file, the PO files, and the # MO files listed in the _LINGUAS variable, regardless whether LINGUAS # was specified or not. - $MAKE dist + $MAKE distdir grep great $sourcedir/posub/foo-bar.pot # NOTE: This is *not* a useless use of cat. The *.po files can contain # non-ASCII characters, which might cause problems with some `grep' diff --git a/tests/pot-override1.test b/tests/pot-override1.test index bf51b8802..e2e4a77d3 100755 --- a/tests/pot-override1.test +++ b/tests/pot-override1.test @@ -90,11 +90,11 @@ int main () } END - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -125,8 +125,8 @@ END $MAKE diff $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot - # Check that "make dist" updates the POT file. - $MAKE dist + # Check that "make distdir" updates the POT file. + $MAKE distdir grep great $sourcedir/posub/foo-bar.pot # Check that "make install" updates the POT file. diff --git a/tests/pot-samedir.test b/tests/pot-samedir.test index 6c321a96a..ccdd41d18 100755 --- a/tests/pot-samedir.test +++ b/tests/pot-samedir.test @@ -147,6 +147,8 @@ msgid "See the documentation for details." msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do if test $builddir = '.'; then sourcedir='.' @@ -194,24 +196,23 @@ for builddir in . sub; do cmp "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo \ "$instdir"/share/locale/de/LC_MESSAGES/foo-baz.mo && Exit 1 - $MAKE dist + $MAKE distdir # Check that the tarball contains the .po files and .mo files for the # specified languages, but not more. - gzip -d -c < pot-samedir-1.0.tar.gz | tar tf - > filelist - grep '^pot-samedir-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-samedir-1\.0/posub/foo-bar-de\.mo$' filelist - grep '^pot-samedir-1\.0/posub/foo-bar-fr\.po$' filelist - grep '^pot-samedir-1\.0/posub/foo-bar-fr\.mo$' filelist - grep '^pot-samedir-1\.0/posub/foo-bar-it\.po$' filelist && Exit 1 - grep '^pot-samedir-1\.0/posub/foo-bar-it\.mo$' filelist && Exit 1 - grep '^pot-samedir-1\.0/posub/foo-baz-de\.po$' filelist - grep '^pot-samedir-1\.0/posub/foo-baz-de\.mo$' filelist - grep '^pot-samedir-1\.0/posub/foo-baz-it\.po$' filelist - grep '^pot-samedir-1\.0/posub/foo-baz-it\.mo$' filelist - grep '^pot-samedir-1\.0/posub/foo-baz-fr\.po$' filelist && Exit 1 - grep '^pot-samedir-1\.0/posub/foo-baz-fr\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar-de.mo + test -f $distdir/posub/foo-bar-fr.po + test -f $distdir/posub/foo-bar-fr.mo + test -f $distdir/posub/foo-baz-de.po + test -f $distdir/posub/foo-baz-de.mo + test -f $distdir/posub/foo-baz-it.po + test -f $distdir/posub/foo-baz-it.mo + test ! -r $distdir/posub/foo-bar-it.po + test ! -r $distdir/posub/foo-bar-it.mo + test ! -r $distdir/posub/foo-baz-fr.po + test ! -r $distdir/posub/foo-baz-fr.mo # Sanity check. $MAKE distcheck diff --git a/tests/pot-topsrcdir.test b/tests/pot-topsrcdir.test index 442ea5635..23ebe67bf 100755 --- a/tests/pot-topsrcdir.test +++ b/tests/pot-topsrcdir.test @@ -117,6 +117,8 @@ msgid "See the documentation for details." msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -169,11 +171,11 @@ END test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo fi - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/foo-bar.pot test $builddir = '.' || test ! -f foo-bar.pot @@ -188,14 +190,13 @@ END # Check that the tarball contains foo-bar-{de,fr}.{po,mo} but not # the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-linguas-1.0.tar.gz | tar tf - > filelist - grep '^foo-bar-de\.po$' filelist - grep '^foo-bar-de\.mo$' filelist - grep '^foo-bar-fr\.po$' filelist - grep '^foo-bar-fr\.mo$' filelist - grep '^foo-bar-es\.po$' filelist && Exit 1 - grep '^foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/foo-bar-de.po + test -f $distdir/foo-bar-de.mo + test -f $distdir/foo-bar-fr.po + test -f $distdir/foo-bar-fr.mo + test ! -r $distdir/foo-bar-es.po + test ! -r $distdir/foo-bar-es.mo # Try modifying a source file. cat > $sourcedir/src/main.c << 'END' @@ -242,7 +243,7 @@ END cmp $sourcedir/foo-bar-es.pobak $sourcedir/foo-bar-es.po cmp $sourcedir/foo-bar-es.mobak $sourcedir/foo-bar-es.mo - # Check that "make dist" updates the POT file, the PO files, and the + # Check that "make distdir" updates the POT file, the PO files, and the # MO files listed in the _LINGUAS variable, regardless whether LINGUAS # was specified or not. cp -p $sourcedir/foo-bar.potbak $sourcedir/foo-bar.pot @@ -250,7 +251,7 @@ END cp -p $sourcedir/foo-bar-de.mobak $sourcedir/foo-bar-de.mo cp -p $sourcedir/foo-bar-fr.pobak $sourcedir/foo-bar-fr.po cp -p $sourcedir/foo-bar-fr.mobak $sourcedir/foo-bar-fr.mo - $MAKE dist + $MAKE distdir grep great $sourcedir/foo-bar.pot # NOTE: This is *not* a useless use of cat. See comments above. cat $sourcedir/foo-bar-de.po | grep great diff --git a/tests/pot-xgettext1.test b/tests/pot-xgettext1.test index 740968576..d018fa749 100755 --- a/tests/pot-xgettext1.test +++ b/tests/pot-xgettext1.test @@ -84,11 +84,11 @@ for builddir in . sub; do $sourcedir/configure --prefix="$instdir" $MAKE - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot diff --git a/tests/pot-xgettext2.test b/tests/pot-xgettext2.test index d7b81b0e9..0bd2407c7 100755 --- a/tests/pot-xgettext2.test +++ b/tests/pot-xgettext2.test @@ -84,11 +84,11 @@ for builddir in . sub; do $sourcedir/configure --prefix="$instdir" $MAKE - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot diff --git a/tests/pot-xgettext3.test b/tests/pot-xgettext3.test index 65d2deaca..ef5ad8bf0 100755 --- a/tests/pot-xgettext3.test +++ b/tests/pot-xgettext3.test @@ -99,11 +99,11 @@ for builddir in . sub; do $sourcedir/configure --prefix="$instdir" $MAKE - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot diff --git a/tests/pot-xgettext4.test b/tests/pot-xgettext4.test index 6fd1cd4e0..61b59de59 100755 --- a/tests/pot-xgettext4.test +++ b/tests/pot-xgettext4.test @@ -94,11 +94,11 @@ for builddir in . sub; do $sourcedir/configure --prefix="$instdir" $MAKE - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/maude.pot test $builddir = '.' || test ! -f maude.pot