Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 20928 invoked from network); 12 Jul 2006 17:31:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Jul 2006 17:31:17 -0000 Received: (qmail 92515 invoked by uid 500); 12 Jul 2006 17:31:16 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 92471 invoked by uid 500); 12 Jul 2006 17:31:16 -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 92460 invoked by uid 99); 12 Jul 2006 17:31:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2006 10:31:16 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of antoine@gmx.de designates 213.165.64.21 as permitted sender) Received: from [213.165.64.21] (HELO mail.gmx.net) (213.165.64.21) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 12 Jul 2006 10:31:14 -0700 Received: (qmail 17490 invoked by uid 0); 12 Jul 2006 17:30:52 -0000 Received: from 66.28.87.10 by www111.gmx.net with HTTP; Wed, 12 Jul 2006 19:30:52 +0200 (CEST) Content-Type: text/plain; charset="us-ascii" Date: Wed, 12 Jul 2006 19:30:52 +0200 From: "Antoine Levy-Lambert" In-Reply-To: <20060712171807.B36781A981A@eris.apache.org> Message-ID: <20060712173052.293560@gmx.net> MIME-Version: 1.0 References: <20060712171807.B36781A981A@eris.apache.org> Subject: Re: svn commit: r421327 - in /ant/core/trunk/src: etc/testcases/taskdefs/optional/ main/org/apache/tools/ant/taskdefs/optional/junit/ main/org/apache/tools/ant/types/resources/ testcases/org/apache/tools/ant/taskdefs/optional/junit/ To: Ant Developers List X-Authenticated: #22961642 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, I made an unvoluntary, blank spaces only change to FileResource.java. Sorry about that. Antoine -------- Original-Nachricht -------- Datum: Wed, 12 Jul 2006 17:18:06 -0000 Von: antoine@apache.org An: ant-cvs@apache.org Betreff: svn commit: r421327 - in /ant/core/trunk/src: etc/testcases/taskdefs/optional/ main/org/apache/tools/ant/taskdefs/optional/junit/ main/org/apache/tools/ant/types/resources/ testcases/org/apache/tools/ant/taskdefs/optional/junit/ > Author: antoine > Date: Wed Jul 12 10:18:06 2006 > New Revision: 421327 > > URL: http://svn.apache.org/viewvc?rev=421327&view=rev > Log: > Bug Report 40021. The noframes option was not working at all. > > Modified: > ant/core/trunk/src/etc/testcases/taskdefs/optional/junitreport.xml > > ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java > > ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java > > ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java > > Modified: > ant/core/trunk/src/etc/testcases/taskdefs/optional/junitreport.xml > URL: > http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/taskdefs/optional/junitreport.xml?rev=421327&r1=421326&r2=421327&view=diff > ============================================================================== > --- ant/core/trunk/src/etc/testcases/taskdefs/optional/junitreport.xml > (original) > +++ ant/core/trunk/src/etc/testcases/taskdefs/optional/junitreport.xml Wed > Jul 12 10:18:06 2006 > @@ -115,6 +115,16 @@ > > > > + > + > + > + > + > + > + > + > + > + > > > > @@ -126,7 +136,7 @@ > format="frames"/> > > > - > + > > > > > Modified: > ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java > URL: > http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java?rev=421327&r1=421326&r2=421327&view=diff > ============================================================================== > --- > ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java (original) > +++ > ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java Wed Jul 12 10:18:06 2006 > @@ -224,12 +224,6 @@ > > TempFile tempFileTask = new TempFile(); > tempFileTask.bindToOwner(task); > - String tempFileProperty = getClass().getName() + > String.valueOf(counter++); > - File tmp = FILE_UTILS.resolveFile(project.getBaseDir(), > - project.getProperty("java.io.tmpdir")); > - tempFileTask.setDestDir(tmp); > - tempFileTask.setProperty(tempFileProperty); > - tempFileTask.execute(); > > XSLTProcess xsltTask = new XSLTProcess(); > xsltTask.bindToOwner(task); > @@ -237,8 +231,19 @@ > xsltTask.addConfigured(getStylesheet()); > // acrobatic cast. > xsltTask.setIn(((XMLResultAggregator) > task).getDestinationFile()); > - File dummyFile = new File(project.getProperty(tempFileProperty)); > - xsltTask.setOut(dummyFile); > + File outputFile = null; > + if (format.equals(FRAMES)) { > + String tempFileProperty = getClass().getName() + > String.valueOf(counter++); > + File tmp = FILE_UTILS.resolveFile(project.getBaseDir(), > + project.getProperty("java.io.tmpdir")); > + tempFileTask.setDestDir(tmp); > + tempFileTask.setProperty(tempFileProperty); > + tempFileTask.execute(); > + outputFile = new File(project.getProperty(tempFileProperty)); > + } else { > + outputFile = new File(toDir, "junit-noframes.html"); > + } > + xsltTask.setOut(outputFile); > for (Iterator i = params.iterator(); i.hasNext();) { > XSLTProcess.Param param = (XSLTProcess.Param) i.next(); > XSLTProcess.Param newParam = xsltTask.createParam(); > @@ -259,10 +264,12 @@ > } > final long dt = System.currentTimeMillis() - t0; > task.log("Transform time: " + dt + "ms"); > - Delete delete = new Delete(); > - delete.bindToOwner(task); > - delete.setFile(dummyFile); > - delete.execute(); > + if (format.equals(FRAMES)) { > + Delete delete = new Delete(); > + delete.bindToOwner(task); > + delete.setFile(outputFile); > + delete.execute(); > + } > } > > /** > > Modified: > ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java > URL: > http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java?rev=421327&r1=421326&r2=421327&view=diff > ============================================================================== > --- > ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java (original) > +++ > ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java Wed Jul 12 10:18:06 2006 > @@ -38,7 +38,7 @@ > private static final FileUtils FILE_UTILS = FileUtils.getFileUtils(); > private static final int NULL_FILE > = Resource.getMagicNumber("null file".getBytes()); > - > + > private File file; > private File baseDir; > > > Modified: > ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java > URL: > http://svn.apache.org/viewvc/ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java?rev=421327&r1=421326&r2=421327&view=diff > ============================================================================== > --- > ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java (original) > +++ > ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java Wed Jul 12 10:18:06 2006 > @@ -150,6 +150,19 @@ > assertTrue("This shouldnt be an empty stream.", > reportStream.available() > 0); > } > > + //Bugzilla Report 40021 > + public void testNoFrames() throws Exception { > + executeTarget("testNoFrames"); > + File reportFile = new File(System.getProperty("root"), > "src/etc/testcases/taskdefs/optional/junitreport/test/html/junit-noframes.html"); > + // tests one the file object > + assertTrue("No junit-noframes.html present. Not generated?", > reportFile.exists() ); > + assertTrue("Cant read the report file.", reportFile.canRead() ); > + assertTrue("File shouldnt be empty.", reportFile.length() > 0 ); > + // conversion to URL via FileUtils like in XMLResultAggregator, > not as suggested in the bug report > + URL reportUrl = new URL( > FileUtils.getFileUtils().toURI(reportFile.getAbsolutePath()) ); > + InputStream reportStream = reportUrl.openStream(); > + assertTrue("This shouldnt be an empty stream.", > reportStream.available() > 0); > + } > //Bugzilla Report 39708 > public void testWithStyleFromDirAndXslImport() throws Exception { > executeTarget("testWithStyleFromDirAndXslImport"); > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org > For additional commands, e-mail: dev-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org