maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Corey Scott <corey.sc...@gmail.com>
Subject Problem dynamically excluding some tests
Date Fri, 03 Dec 2004 07:24:44 GMT
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


Mime
View raw message