maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <br...@apache.org>
Subject Re: Problem dynamically excluding some tests
Date Fri, 03 Dec 2004 11:33:36 GMT
Less icky but basically equivalent... how about this in suite() for 
MsAccessTest:

// test="${systemScope['os.name'].startsWith('Windows')}">

if (System.getProperty("os.name").startsWith("Windows")) {
return new TestSuite(MSAccessTest.class);
}
else {
 return null; // or an empty test or something - new TestSuite()?
}

Cheers,
Brett

Eric Pugh wrote:

>Here's an icky idea..   See what the exception thrown is when you run the
>test on RedHat, and then just ignore it.  I know, it sucks..  but it
>works...
>
>  
>
>>-----Original Message-----
>>From: Florin Vancea [mailto:fvancea@maxiq.ro]
>>Sent: Friday, December 03, 2004 11:27 AM
>>To: Maven Developers List; Corey Scott
>>Subject: Re: Problem dynamically excluding some tests
>>
>>
>>On second thought; just an idea.
>>Maybe you can fiddle with the POM var available in Jelly. After all there
>>are lots of things possible there, as it's described "turning XML into
>>code".
>>It's an interesting challenge and I've done similar things with
>>Jelly but I
>>cannot test it now and provide a final solution.
>>
>>----- Original Message -----
>>From: "Corey Scott" <corey.scott@gmail.com>
>>To: "Maven Developers List" <dev@maven.apache.org>
>>Sent: Friday, December 03, 2004 12:06 PM
>>Subject: Re: Problem dynamically excluding some tests
>>
>>
>>    
>>
>>>That didnt work either, I think I will just stick with the build.props.
>>>
>>>Thanks away,
>>>-CS
>>>
>>>
>>>On Fri, 3 Dec 2004 10:55:15 +0100, Jörg Schaible
>>><joerg.schaible@elsag-solutions.com> wrote:
>>>      
>>>
>>>>Corey Scott wrote on Friday, December 03, 2004 8:25 AM:
>>>>[snip]
>>>>
>>>>
>>>>        
>>>>
>>>>>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>
>>>>>          
>>>>>



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


Mime
View raw message