Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 65218 invoked from network); 27 Sep 2006 04:24:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Sep 2006 04:24:24 -0000 Received: (qmail 77290 invoked by uid 500); 27 Sep 2006 04:24:20 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 77254 invoked by uid 500); 27 Sep 2006 04:24:20 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 77234 invoked by uid 99); 27 Sep 2006 04:24:20 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Sep 2006 21:24:20 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=bodewig@apache.org; spf=permerror X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received-SPF: error (idunn.apache.osuosl.org: domain apache.org from 217.160.128.107 cause and error) Received: from [217.160.128.107] ([217.160.128.107:36845] helo=www.samaflost.de) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id C6/10-22234-2FCF9154 for ; Tue, 26 Sep 2006 21:24:20 -0700 Received: by www.samaflost.de (Postfix, from userid 1000) id 9FEF98FD275; Wed, 27 Sep 2006 06:24:15 +0200 (CEST) To: dev@ant.apache.org Subject: Re: [antunit] included/excluded tests patterns X-Draft-From: ("nnfolder:mail.jakarta-ant" 76626) References: <20060926210644.6223.qmail@web55109.mail.re4.yahoo.com> From: Stefan Bodewig Date: Wed, 27 Sep 2006 06:24:14 +0200 In-Reply-To: <20060926210644.6223.qmail@web55109.mail.re4.yahoo.com> (Matt Benson's message of "Tue, 26 Sep 2006 14:06:44 -0700 (PDT)") Message-ID: <873bae6ioh.fsf@www.samaflost.de> User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Tue, 26 Sep 2006, Matt Benson wrote: > When writing antunit tests, one cannot use the > log-inspection assertions or the new au:logcontent > resource outside the context of an AntUnit test. This > is understandable/unavoidable, Is it? We could add a task that registers a LogCapturer with the current project. We'd lose the log before the task was run, but that should be fine for most antunit tests. > but it does mean that there are some tests that cannot be developed > with 'ant -f ...'. Unless you add a target running antunit in the file to the file itself ... > I was thinking of adding a means of [in|ex]cluding tests to be run. Independent of the problem above, I've been thinking about this myself. The reason is the current failure of the antbook examples in Gump. The failing AntUnit test cannot pass in Gump since it assumes a classpath setup that's not available here. The alternative to an approach that selects targets to be run in the task (as you suggest) is putting guards into the build file under test, like we currently do in several JUnit tests public void testEcho() throws Exception { if (getProject().getProperty("nant.found") != null) { expectLogContaining("echo", "foo is bar"); } } would translate to ... > To that end, it seems like it would be easy to use PatternSets for > this; Interesting abuse of patternsets, but why not. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org