ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Murdoch <>
Subject Re: Test infrastructure
Date Fri, 07 Jun 2002 06:45:01 GMT
On Fri, 7 Jun 2002 15:15, Peter Donald wrote:
> Hi,
> test.basedir is passed into junit tests as the directory in which test
> classes are compiled and that is used to get myrmidon.home. Some of the
> Junit tests now fail as the directory pointed to does not have have
> lib/core and thus none of the essential tasks get deployed (like TargetTask
> etc). 

Which tests are failing?  The <for-each> tests? =)

The tests all pass for me, on a clean tree.

The framework and antlib tests all end up calling 
AbstractTaskTestCase.doExecuteTarget().  It sets myrmidon.home to 
${test.basedir}/dist, and creates that dir, plus dist/ext and dist/lib/core.  
But that's just to keep the extension manager happy.  They are left empty.  
The types themselves are loaded via the classloader.

> I also notice that a lot of tasks have moved back into framework
> which seems wrong - is it to solve this problem or something?

It does seem wrong.  But the only task that has moved back to framework proper 
is the <list-path> task, plus the <equals> condition.  In the framework test 
directory, there are *copies* of a few of the antlib tasks:  There's a 
simplified <property>, <log> and <fail> tasks.  Plus a handful of tasks
the unit tests to use, like <assert>, <expect-error>, <expect-output>.

> Is this a temporary thing or is it meant to be this way (or am I missing
> something?)

Bit of both.  There's a few things that need sorting out:

- Should run the tests against as close an approximation of a real install as 
possible.  The classloader hierarchy, in particular.  One of the reasons for 
adding <expect-error>, etc, is to move the test code into build files, to 
make this easier to do.

- The relationship between framework and antlib.  Framework is quite broad in 
scope (probably too much so), and quite hard to test, when all the tools for 
doing so are over in antlib.  Now that antlibs can extend other antlibs, we 
should look at grouping classes differently.

- Move the unit test tasks into their own antlib, that can get included in the 


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message