Hard to see an Ant with all this sand…..

May 27, 2008 at 8:15 pm Leave a comment

While trying to write an Ant script that will run python files, test them and return a coverage report I run into the following problems:

– Cannot pass a pattern of file types into exec task.

– Coverage report for the wanted file types return 0 percentage!

– Coverage execution of files can’t get a bunch of files in the command line but just one by one

– Nosetests coverage is not working

– Didn’t find a useful loop in ant (for, foreach are not recognized) for iterating over files passed to coverage.


exec needs to be thrown away in favour of the apply task! Apply task can get a set of files as an external command (filsets). By removing the coverage.py file from /usr/bin the nosetests command with coverage (see nosetests -h for more details about options) works but give a different percentage result from the coverage tool. So by using the apply task with the coverage.py tool and -x as an argument the tests files are executed. After that command, coverage.py needs to be executed again with -r to gather all the reports saved before.

Now we have all the test results, all the coverage reports, Do we need something more or we found all the ants?


Entry filed under: Web-CAT.

Brief Update: A New Hope Bitten by the Version Bug

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

Time Machine

May 2008
    Jun »

RSS Qi’s Utterances

  • An error has occurred; the feed is probably down. Try again later.

%d bloggers like this: