automake-patches
[Top][All Lists]
Advanced

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

Re: automake po / pot file integration: first tests available


From: Bruno Haible
Subject: Re: automake po / pot file integration: first tests available
Date: Mon, 6 Sep 2010 22:28:19 +0200
User-agent: KMail/1.9.9

Hello Stefano,

Ralf said:
> Give Bruno some time for comments before applying to the pot-primary
> branch, please.

Yes, please. Give me always between 2 days (48 hours) and 7 days to react.

> tests/README suggest

Oops, I had completely missed this file. Now that I read it, I see that the
'pot-macro-warn' test will also need an 'rm -rf autom4te.cache'.

>  1. You sometimes failed to use `$MAKE' instead of `make'

Yes, sorry, I did not think at this.

>     and `Exit' instead of `exit'

Likewise, sorry, I wasn't aware of this.

>  2. IMHO it's better to avoid redirecting output (from e.g. grep and
>     cmp) to /dev/null, since our testsuite is already very verbose, and
>     some extra output (even if redundant) won't hurt.

I agree for the cases where one expects 'grep' not to find anything.
But for the positive cases, I don't agree:
After changing
      grep '^pot-linguas-1\.0/posub/foo-bar-de\.po$' filelist >/dev/null
to
      grep '^pot-linguas-1\.0/posub/foo-bar-de\.po$' filelist
the output log will contain the line
      pot-linguas-1.0/posub/foo-bar-de.po
which is useless since it is always this same string.

But anyway, your preference here matters more than mine.

>  3. tests/README suggest to end test scripts with a `:':
>      ``End the test script with a `:' or `Exit 0'.  Otherwise, when
>        somebody changes the test by adding a failing command after
>        the last command, the test will spuriously fail because $? is
>        nonzero at the end.''

I have no objection. But for tests that are run in 'set -e' mode, the
rationale is void: if somebody changes the test by adding a failing
command after the last command, the test will fail anyway, regardless\
whether there is a ':' command after it.

>  4. Ralf and I agreed that we shouldn't put `gzip' in $required

I copied this idiom from one of the tests install2.test, lex3.test, pr9.test.

> Also, you forgot ... to add them to $(TESTS) in tests/Makefile.am.

Yes, I noticed this later myself, sorry.

> -  if grep '^pot-download1-1\.0/clisp-de\.po$' filelist >/dev/null; then
> -    exit 1
> -  fi
> +  grep '^pot-download1-1\.0/clisp-de\.po$' filelist && Exit 1

Today you taught me about how 'command && exit 1' works in 'set -e' mode.

> OK to push the three attached follow-up patches?

Part 1 and 2 are OK.

In part 3, in pot-linguas.test, pot-noinst.test, pot-topsrcdir.test, you
simplified

  cat $sourcedir/posub/foo-bar-de.po | grep great >/dev/null

to

  grep great $sourcedir/posub/foo-bar-de.po
or
  grep great < $sourcedir/posub/foo-bar-de.po

This is an invalid simplification for files that contain non-ASCII characters,
because 'grep' on OpenBSD 4.0 then merely outputs
  "Binary file (standard input) matches"
for the case where the input is standard input, and similarly for a command-
line argument. The only workaround I found (on 2008-01-12) for this problem
is to use 'grep' with a pipe, not a regular file, as input.

This is not an issue for POT files, which - in the Automake test cases -
only contain ASCII characters. But in the PO files, I want to be able to
use non-ASCII characters here and there without much thinking. It's only
by luck that the German and French PO files that I used there happen to
contain only ASCII characters; this may change in the future.

The rest of part 3 is OK.

Thanks for all these fixes!

Bruno



reply via email to

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