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  Changes    Path
  1.31      +18 -2     
ant/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java
  
  Index: DirectoryScannerTest.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- DirectoryScannerTest.java 7 Dec 2004 09:10:39 -0000       1.30
  +++ DirectoryScannerTest.java 9 Feb 2005 08:16:03 -0000       1.31
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2001-2004 The Apache Software Foundation
  + * Copyright  2001-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -19,6 +19,7 @@
   
   import org.apache.tools.ant.taskdefs.condition.Os;
   import org.apache.tools.ant.types.Resource;
  +import org.apache.tools.ant.util.FileUtils;
   import org.apache.tools.ant.util.JavaEnvUtils;
   
   import junit.framework.TestCase;
  @@ -225,9 +226,13 @@
        * to Runtime.exec() must be made to create a link to test against.
        */
   
  -    public void testSetFollowLinks() {
  +    public void testSetFollowLinks() throws IOException {
           if (supportsSymlinks) {
               File linkFile = new File(System.getProperty("root"), 
"src/main/org/apache/tools/ThisIsALink");
  +            if (JavaEnvUtils.isKaffe()) {
  +                System.err.println("link exists pre-test? " + 
linkFile.exists());
  +            }
  +            
               try {
                   // add conditions and more commands as soon as the need 
arises
                   String[] command = new String[] {
  @@ -245,6 +250,11 @@
                   }
   
                   File dir = new File(System.getProperty("root"), 
"src/main/org/apache/tools");
  +            if (JavaEnvUtils.isKaffe()) {
  +                System.err.println("link exists after exec? " + 
linkFile.exists());
  +                System.err.println("Ant knows it is a link? " + 
FileUtils.getFileUtils().isSymbolicLink(dir, "ThisIsALink"));
  +            }
  +
                   DirectoryScanner ds = new DirectoryScanner();
   
                   // followLinks should be true by default, but if this ever
  @@ -301,9 +311,15 @@
                              !haveTaskdefsPackage);
   
               } finally {
  +            if (JavaEnvUtils.isKaffe()) {
  +                System.err.println("link exists pre-delete? " + 
linkFile.exists());
  +            }
                   if (!linkFile.delete()) {
                       throw new RuntimeException("Failed to delete " + 
linkFile);
                   }
  +            if (JavaEnvUtils.isKaffe()) {
  +                System.err.println("link exists post-delete? " + 
linkFile.exists());
  +            }
               }
           }
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to