maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Florin Vancea" <fvan...@maxiq.ro>
Subject Re: Problem dynamically excluding some tests
Date Fri, 03 Dec 2004 07:38:18 GMT
I'm no expert but I believe project.xml is already parsed when you get to
maven.xml. Therefore it's useless to change that property within maven.xml.
Maybe you can use build.properties to specify test.extra.excludes and
configure different build.properties on different machines.

Florin

----- Original Message ----- 
From: "Corey Scott" <corey.scott@gmail.com>
To: "Maven Dev List" <dev@maven.apache.org>
Sent: Friday, December 03, 2004 9:24 AM
Subject: Problem dynamically excluding some tests


> Currently I am trying to exclude a certain set of tests from running
> on different machines based on their operation system.  Basically I
> have some DB code which has ODBC tests that I dont want to run on my
> Redhat server but I want to run them on my XP desktop.
>
> I currently have the following settings:
>
> Extract from my POM:
> <!-- Unit test cases -->
> <unitTest>
> <includes>
> <include>**/*Test.java</include>
> </includes>
> <excludes>
> <exclude>**/*Mock*.java</exclude>
> </excludes>
> <excludes>
> <exclude>${test.extra.excludes}</exclude>
> </excludes>
> </unitTest>
>
>
> Extract from my maven.xml:
> <preGoal name="test">
> <!-- Exclude MsAccess (ODBC) tests from Non-Windows runs -->
>    <j:choose>
> <j:when test="${systemScope['os.name'].startsWith('Windows')}">
> <ant:echo>Including MsAccess(ODBC) Tests</ant:echo>
> <ant:property name="test.extra.excludes" value="**/*MsAccess*.java"/>
> </j:when>
> <j:otherwise>
> <ant:echo>Excluding MsAccess(ODBC) Tests</ant:echo>
> <ant:property name="test.extra.excludes" value="FaKecLaSs.java"/>
> </j:otherwise>
> </j:choose>
> </preGoal>
>
>
> Many thanks,
> Corey
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message