Testing extensions

Christian Ebert blacktrash at gmx.net
Sat Dec 29 12:08:10 CST 2007


* Patrick Mézard on Wednesday, December 26, 2007 at 20:38:23 +0100
> Is there a canonical way to write extensions tests and run them ?

I'd love to know about it ;-)

ATM I just make extension and test part of a source-tree and then
run the test.

> For instance, the forest extension module and test-forest are
> in the same directory (there are also other tests in tests/).
> Calling run-tests.py from the extension root directory works
> fine but has several limitations:
> 
> - tests and tools living in the same directory is no longer
> true. It means extension tests cannot use mercurial tools like
> hghave or simplemerge. Test coverage cannot be generated.  -
> the extension code is not installed. It works with forest
> because run-tests.py is executed in the extension module
> directory, which is added to sys.path. I am not convinced
> requiring the extension code to be with tests is a good
> practice.  - what about extensions with a setup/compilation
> process ?
> 
> First point can be solved with a separate environment variable,
> but I prefer to hear about extension writers before moving
> forward. It would be great that a collection of extensions
> could be tested against a given mercurial version without
> installing any of them.

Perhaps some standard run-tests.py for external extensions. If I
can be of any help (especially asking stupid questions) let me
know.
 
c
-- 
keyword extension for Mercurial (http://selenic.com/mercurial):
<http://www.blacktrash.org/hg/hgkeyword/> (incl. 0.9.2 compatible branch)
Mercurial crew development repository + keyword extension:
<http://www.blacktrash.org/hg/hg-crew-keyword/>


More information about the Mercurial-devel mailing list