cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-11 Thread mbenson
mbenson 2005/03/11 11:34:01 Modified:src/testcases/org/apache/tools/ant Tag: ANT_16_BRANCH DirectoryScannerTest.java Log: Merge DirectoryScanner improvements; disable ClasspathUtilsTest if tests.and.ant.share.classloader PR: 33118 Revision Changes

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-09 Thread Stefan Bodewig
On Wed, 9 Mar 2005, Dominique Devienne <[EMAIL PROTECTED]> wrote: > I find this pretty weird, if not dangerous. I don't understand > why we don't just fork the tests all the time Because historically (pre Ant 1.6.2) forking would slow down tests immensily. > But now a test requires the reverse!?

RE: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-09 Thread Dominique Devienne
> From: Stefan Bodewig [mailto:[EMAIL PROTECTED] > On Tue, 8 Mar 2005, Matt Benson <[EMAIL PROTECTED]> wrote: > > On a related note, ClasspathUtilsTest is marked as run > > unless running.in.gump . But it (seemingly rightly > > so) fails whenever tests.and.ant.share.classloader is > > true. > > Y

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-09 Thread Stefan Bodewig
On Tue, 8 Mar 2005, Matt Benson <[EMAIL PROTECTED]> wrote: > On a related note, ClasspathUtilsTest is marked as run > unless running.in.gump . But it (seemingly rightly > so) fails whenever tests.and.ant.share.classloader is > true. Yes, just tried with -Djunit.fork="true" and it fails - because

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-08 Thread Matt Benson
--- Stefan Bodewig <[EMAIL PROTECTED]> wrote: > > There are other tests that rely on being in the same > package, we > exclude them via the tests.and.ant.share.classloader > property. On a related note, ClasspathUtilsTest is marked as run unless running.in.gump . But it (seemingly rightly so) fa

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-08 Thread Stefan Bodewig
On Mon, 07 Mar 2005, Stefan Bodewig <[EMAIL PROTECTED]> wrote: > On Mon, 7 Mar 2005, Dominique Devienne <[EMAIL PROTECTED]> wrote: >> I was not aware of this restriction. Can you point to a specific VM >> spec? > > Let me sleep over this ;-)

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-07 Thread mbenson
mbenson 2005/03/07 15:25:52 Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: Spelling, blank lines Revision ChangesPath 1.34 +7 -3 ant/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java Index: DirectoryScannerTest.java

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-07 Thread Stefan Bodewig
On Mon, 7 Mar 2005, Dominique Devienne <[EMAIL PROTECTED]> wrote: >> From: Stefan Bodewig [mailto:[EMAIL PROTECTED] The "package" a >> class belongs to really is not just the package name, but the pair >> of package name and the classloader that has loaded the class. > > Only when a package is sea

RE: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-07 Thread Dominique Devienne
> From: Stefan Bodewig [mailto:[EMAIL PROTECTED] > The "package" a class belongs to really is not just the package name, > but the pair of package name and the classloader that has loaded the > class. Only when a package is sealed, no? Are you saying that you can't have two classes from the same p

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-07 Thread Stefan Bodewig
On Mon, 7 Mar 2005, Dominique Devienne <[EMAIL PROTECTED]> wrote: >> Looks like a classloader issue (your test has been loaded from a >> different classloader than the class to test which means they are >> not inside the same package). >> >> There are other tests that rely on being in the same pa

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-07 Thread Stefan Bodewig
On Mon, 7 Mar 2005, Matt Benson <[EMAIL PROTECTED]> wrote: > Do these get run by Gump in any way? Yes, in this case tests and classes under test share the same classloader, since they all get loaded with the system classloader. > But I'd still like to know how to run such a test. :) Put build/

RE: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-07 Thread Dominique Devienne
> From: Stefan Bodewig [mailto:[EMAIL PROTECTED] > On Mon, 7 Mar 2005, Matt Benson <[EMAIL PROTECTED]> wrote: > > That's what I thought, but the test got: > > > > [junit] java.lang.IllegalAccessError: tried to access > > method org.apache.tools > > .ant.DirectoryScanner.getScannedDirs()Ljava/util/S

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-07 Thread Matt Benson
--- Stefan Bodewig <[EMAIL PROTECTED]> wrote: > On Mon, 7 Mar 2005, Matt Benson > <[EMAIL PROTECTED]> wrote: > > That's what I thought, but the test got: > > > > [junit] java.lang.IllegalAccessError: tried to > access > > method org.apache.tools > > > .ant.DirectoryScanner.getScannedDirs()Ljava/u

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-07 Thread Stefan Bodewig
On Mon, 7 Mar 2005, Matt Benson <[EMAIL PROTECTED]> wrote: > That's what I thought, but the test got: > > [junit] java.lang.IllegalAccessError: tried to access > method org.apache.tools > .ant.DirectoryScanner.getScannedDirs()Ljava/util/Set; > from class org.apache.tools.ant.DirectoryScannerTest

RE: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-07 Thread Matt Benson
--- Dominique Devienne <[EMAIL PROTECTED]> wrote: > > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > > By popular demand: Do not scan directories if > their contents are > > excluded. Changed scannedDirs from a cache to a > result and added > > a gettor method with a warning in the J

RE: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-07 Thread Dominique Devienne
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > By popular demand: Do not scan directories if their contents are > excluded. Changed scannedDirs from a cache to a result and added > a gettor method with a warning in the Javadoc that it was a testing > method only. Cool! Should be a

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-07 Thread Antoine Levy-Lambert
Hello Matt, this change could speed up directory scanning very much. Let's see what it is going to do. Cheers, Antoine [EMAIL PROTECTED] wrote: mbenson 2005/03/04 15:41:21 Modified:src/main/org/apache/tools/ant DirectoryScanner.java src/testcases/org/apache/tools/ant Director

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-03-04 Thread mbenson
mbenson 2005/03/04 15:41:21 Modified:src/main/org/apache/tools/ant DirectoryScanner.java src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: By popular demand: Do not scan directories if their contents are excluded. Changed scannedDirs from a cache to

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2005-02-09 Thread bodewig
bodewig 2005/02/09 00:16:03 Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: Some very temporary diagnostic output to help find/fix a Kaffe+Gump issue Revision ChangesPath 1.31 +18 -2 ant/src/testcases/org/apache/tools/ant/DirectoryScan

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-29 Thread antoine
antoine 2003/07/29 12:44:38 Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: new testcase Revision ChangesPath 1.24 +13 -1 ant/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java Index: DirectoryScannerTest.java

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-29 Thread antoine
antoine 2003/07/29 03:38:35 Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: adding 3 tests showing how include and exclude patterns together interact Revision ChangesPath 1.23 +44 -0 ant/src/testcases/org/apache/tools/ant/DirectoryScan

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-23 Thread Steve Loughran
Antoine Levy-Lambert wrote: Sorry, I had some disorder in my ant.jar files, here are real results, which are even much better in terms of speed for the new DirectoryScanner (at least for the fileset containing specific includes) : tests done on nagoya (Solaris) NEW VERSION fileset1 : 117 fileset2 6

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-23 Thread bodewig
bodewig 2003/07/23 00:30:14 Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: Some additional tests to increase confidence Revision ChangesPath 1.21 +21 -0 ant/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java Index: Dire

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-23 Thread Stefan Bodewig
On 23 Jul 2003, <[EMAIL PROTECTED]> wrote: > More problems with case sensitivity Two of the new tests fail on Linux (the *ScanningInsensitive ones), I expect all four to fail on case insensitive filesystems. I'm working on a solution that doesn't (completely) cancel the speed benefit. Stefan

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-23 Thread bodewig
bodewig 2003/07/23 00:15:02 Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: better be consistent Revision ChangesPath 1.20 +1 -1 ant/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java Index: DirectoryScannerTest.java

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-23 Thread bodewig
bodewig 2003/07/23 00:13:39 Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: More problems with case sensitivity Revision ChangesPath 1.19 +46 -0 ant/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java Index: DirectoryScan

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-23 Thread Stefan Bodewig
On Tue, 22 Jul 2003, Steve Loughran <[EMAIL PROTECTED]> wrote: > Of course, we will see a speedup on case sensitive file systems, > right? It depends 8-) In situations where all your include patterns start with constants paths, you'll see significant enhancements - no matter whether the filesyst

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-22 Thread Antoine Levy-Lambert
Sorry, I had some disorder in my ant.jar files, here are real results, which are even much better in terms of speed for the new DirectoryScanner (at least for the fileset containing specific includes) : tests done on nagoya (Solaris) NEW VERSION fileset1 : 117 fileset2 6813 CVS July 10th 2003 fi

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-22 Thread Antoine Levy-Lambert
Steve Loughran wrote : > Of course, we will see a speedup on case sensitive file systems, right? Stefan will probably check in a very very good DirectoryScanner tomorrow, which combines speed and accuracy +10 :-) OK here are the figures : tests done on nagoya.apache.org July 22 13:something PDT

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-22 Thread Steve Loughran
Antoine Levy-Lambert wrote: Stefan, Maybe using something like findFileCaseInsensitive instead of getCanonicalPath would be better. If we agree that we need to return the exact case on case insensitive filesystems, that is. this seems to be the only solution which preserves the old behavior of D

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-22 Thread Stefan Bodewig
On Tue, 22 Jul 2003, Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote: > I am afraid that if we use it we are going to lose the benefit of > the optimization, Yes, that's what I see while playing with a solution as well. An alternative that I'm currently testing is a combination of getCanonicalPat

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-22 Thread Antoine Levy-Lambert
Stefan, > Maybe using something like findFileCaseInsensitive instead of > getCanonicalPath would be better. If we agree that we need to return > the exact case on case insensitive filesystems, that is. this seems to be the only solution which preserves the old behavior of DirectoryScanner and wo

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-22 Thread bodewig
bodewig 2003/07/22 05:34:56 Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: Typo Revision ChangesPath 1.18 +1 -1 ant/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java Index: DirectoryScannerTest.java

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-22 Thread Stefan Bodewig
On 22 Jul 2003, Stefan Bodewig <[EMAIL PROTECTED]> wrote: > I don't know for sure. Let me see, yep, behavior on MacOS X using > HFS is the same as on Windows. To be more precise: Given the code as it is, testFullPathMatchesCaseSensitive, testFullPathMatchesCaseInsensitive and test2ButCaseInsens

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-22 Thread Antoine Levy-Lambert
> OK. But for case-insensitive file systems it doesn't matter, right? > The need for this getCanonicalFile() suppose you are building on Windows a jar file in your build.xml you have the jar file will then contain ALPHA/BETA/BETA.XML and it will make a big difference on UNIX, and it will a

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-22 Thread Stefan Bodewig
On 21 Jul 2003, Stefan Bodewig <[EMAIL PROTECTED]> wrote: > Your getCanonicalPath fix will not catch the situation for any OS > other than Windows (the way it is coded right now). I don't have a solution apart from "do it for all OSes" and "do it for none". > It will also slow down scanning cons

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-22 Thread Stefan Bodewig
On Mon, 21 Jul 2003, Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote: > No, the original behavior is the current behavior. OK. But for case-insensitive file systems it doesn't matter, right? > The current test of DirectoryScanner passes with the nightly of July > 10th. Sure. > Then we need to

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-21 Thread Antoine Levy-Lambert
> Your getCanonicalPath fix will not catch the situation for any OS > other than Windows (the way it is coded right now). It will also slow > down scanning considerably, probably to the point that your prior > optimization gets undone. And it would probably break in the presence > of symbolic lin

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-21 Thread Antoine Levy-Lambert
Stefan, > after your first patch, getIncludedFiles would return the names like > they appeared in the patterns. I.e. if you matched **/GAMMA.XML and > the file was gamma.xml, you'd get the uppercase version. I think this > may have been the original behavior as well. > No, the original behavior

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-21 Thread Stefan Bodewig
Antoine, after your first patch, getIncludedFiles would return the names like they appeared in the patterns. I.e. if you matched **/GAMMA.XML and the file was gamma.xml, you'd get the uppercase version. I think this may have been the original behavior as well. When I played with it to get the c

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-19 Thread antoine
antoine 2003/07/19 10:08:06 Modified:src/main/org/apache/tools/ant DirectoryScanner.java src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: Fix a problem introduced in the recent optimization of DirectoryScanner : under Windows, the case of the include

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-19 Thread Antoine Levy-Lambert
Subject: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java > antoine 2003/07/19 08:57:21 > > Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java > Log: > make the new tests involving case sensitivity or not pass on Windows >

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-19 Thread antoine
antoine 2003/07/19 08:57:21 Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: make the new tests involving case sensitivity or not pass on Windows Revision ChangesPath 1.16 +19 -4 ant/src/testcases/org/apache/tools/ant/DirectoryScannerTe

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-16 Thread bodewig
bodewig 2003/07/16 06:34:14 Modified:src/etc/testcases/core directoryscanner.xml src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: Demonstrate symlink problem. With includes="alpha/beta/gamma", gamma must not be scanned if beta is a symlink.

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-16 Thread Stefan Bodewig
On Wed, 16 Jul 2003, Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote: > - The other possibility is to write (for instance in FileUtils) a > routine of the type public static File findFileCaseInsensitive(File > basedir, String child) which internally would try all > uppercase/lowercase combinations

Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-16 Thread Antoine Levy-Lambert
ROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 16, 2003 1:09 PM Subject: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java > bodewig 2003/07/16 04:09:22 > > Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java > Log:

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-16 Thread bodewig
bodewig 2003/07/16 04:09:22 Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: Add tests for case insensitive matching. Both tests with CaseInsensitive in their name fail on Linux, I expect test2ButCaseInsesitive to pass on case insensitive file systems

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-16 Thread bodewig
bodewig 2003/07/16 03:57:56 Modified:src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: some whitespace changes plus assertTrue -> assertEquals in a couple of cases Revision ChangesPath 1.13 +60 -40 ant/src/testcases/org/apache/tools/ant/DirectoryS

cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java

2003-07-15 Thread antoine
antoine 2003/07/15 16:19:15 Modified:src/main/org/apache/tools/ant DirectoryScanner.java src/testcases/org/apache/tools/ant DirectoryScannerTest.java Log: Fix the following (remark of Stefan Bodewig on July 15th 2003 on the dev list) * You go a long way to avoid redu