tests/hghave: easier way to skip tests

Mads Kiilerich mads at kiilerich.com
Sat Jun 9 10:28:14 CDT 2012


Eduard-Cristian Stefan wrote, On 06/09/2012 05:04 PM:
> Would it be ok to test some environment variables in order to skip 
> tests [1]?
> Instead of:
>
>  def has_gettext():
> +    if os.name == 'nt':
> +        return False # msgfmt.exe crashes on Windows
>      return matchoutput('msgfmt --version', 'GNU gettext-tools')
>
> simply check some environment variable like HG_TESTS_SKIP_GETTEXT.

Possibly. But I'm not sure exactly what it should be used for and how 
important it is. We shouldn't need these kind of exceptions at all.

We also have some blacklist functionality that perhaps should have been 
used for msys from the beginning ... but from another point of view I 
think it would be better to get rid of the blacklists and annotate the 
tests with the right hghave's.

But gettext works fine on windows. You just have to prepare the 
localizations - for example with 'make local'.

/Mads


More information about the Mercurial-devel mailing list