[PATCH] tests: introduce conditional sections in .t tests

Adrian Buehlmann adrian at cadifra.com
Sat Jun 2 13:54:46 CDT 2012


On 2012-06-01 21:24, Mads Kiilerich wrote:
> On 01/06/12 20:58, Matt Mackall wrote:
>> So perhaps we should do something that looks like the C
>> preprocessor:
> 
> Agreed. Simple and well-known syntax that is less ugly than m4.
> 
>> Also, is there a reason not to roll hghave into run-tests?
> 
> No - only that it had to be done and wasn't the top priority. There are 
> some existing ugly not-completely-trivial uses with '$ if hghave' and 
> test-filecache.py .

Perhaps this could be implemented in two steps.

(a) Implement:

    #if msys

      $ foo

    #else

      $ bar

    #endif

using good old hghave, then

(b) roll hghave into run-tests.py

I think doing (b) doesn't affect the syntax. So we could start using (a)
before we have an implementation for (b).







More information about the Mercurial-devel mailing list