Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 14256 invoked from network); 30 Dec 2000 20:17:20 -0000 Received: from unknown (HELO ?209.10.208.98?) (209.10.208.98) by h29.sny.collab.net with SMTP; 30 Dec 2000 20:17:20 -0000 Received: from mailus.imediation.com by [209.10.208.98] via smtpd (for h29.sny.collab.net [64.208.42.39]) with SMTP; 30 Dec 2000 12:13:05 UT Received: by mailus.imediation.com with Internet Mail Service (5.5.2650.21) id ; Sat, 30 Dec 2000 12:10:21 -0800 Received: from cerber.imediation.com (r111m80.cybercable.tm.fr [195.132.111.80]) by parsv011.imediation.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id ZZM5NZLW; Sat, 30 Dec 2000 20:20:18 -0000 Received: from r111m80.cybercable.tm.fr ([195.132.111.80]) by cerber.imediation.com via smtpd (for maileu.imediation.com [172.30.10.3]) with SMTP; 30 Dec 2000 21:16:55 UT Message-ID: <01ba01c0729d$e661e0a0$506f84c3@unknowncomp> From: =?iso-8859-1?Q?St=E9phane_Bailliez?= To: References: <3A4D07F4.96A050A8@collab.net> <008401c07203$d2e11a90$020a0a0a@alsatian> Subject: Ant testcases properties/ JUnit sysproperty Date: Sat, 30 Dec 2000 21:20:04 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: h29.sny.collab.net 1.6.2 0/1000/N Hello, While working on enhancing the JUnit task (I was trying to see how to add the requested haltontimeout property, see http://marc.theaimsgroup.com/?l=ant-dev&m=97714480625784&w=2) I modified the ExecuteWatchdog in order to know if the watchdog did killed its monitored process and also fixed some minor glitches. To ensure I was not breaking anything I did the testcase for it, but... I ran into a minor problem which is: classpath availability into JUnit TestCases. If I'm forking a process to run a Test process from a TestCase, I need the classpath. (The Test process is a static inner class to the TestCase), therefore I need ${build.tests} If I'm forking a JUnitTestRunner it is ok, I can get the classpath via System.getProperty("java.class.path"). However if i'm not forking a JUnitTestRunner..AFAIK I have no way to get it. If i'm wrong skip the next part: :) So I think there is a need to set some testcases properties in the JUnit targets. Since it must be available in both forked and non forked vm, the only solution should be: (okay the key 'build.tests' is not that appropriate but you get the idea) the sysproperty is however not supported by JUnit but this no big deal. I takes less than 20 lines of code to add this feature. (btw ! I'm impressed everytime by how clever the architecture is in some parts, it makes me happy to use the API, I feel like I have every tools available because you thought about a lot of things !!!) I also noticed that in the build.xml it only refers to the ant.jar (${lib.dir}/${name}.jar) and not optional.jar thus it will always use the bootstrap optional.jar when running the testcases... Any comments on all this ? -- Stephane Bailliez Software Engineer, Paris - France iMediation - http://www.imediation.com Disclaimer: All the opinions expressed above are mine and not those from my company.