ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r448068 - in /ant/core/trunk: build.xml src/testcases/org/apache/tools/ant/DirectoryScannerTest.java
Date Wed, 20 Sep 2006 05:10:30 GMT
Author: antoine
Date: Tue Sep 19 22:10:29 2006
New Revision: 448068

URL: http://svn.apache.org/viewvc?view=rev&rev=448068
Log:
make sure that most of DirectoryScannerTest runs when we build a release.
This one is too critical.

Modified:
    ant/core/trunk/build.xml
    ant/core/trunk/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java

Modified: ant/core/trunk/build.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/build.xml?view=diff&rev=448068&r1=448067&r2=448068
==============================================================================
--- ant/core/trunk/build.xml (original)
+++ ant/core/trunk/build.xml Tue Sep 19 22:10:29 2006
@@ -1698,8 +1698,6 @@
           <!--  These tests only passes if testcases and Ant classes have
           been loaded by the same classloader - will throw
           IllegalAccessExceptions otherwise.  -->
-          <exclude name="${ant.package}/DirectoryScannerTest.java"
-            unless="tests.and.ant.share.classloader"/>
           <exclude name="${taskdefs.package}/SQLExecTest.java"
             unless="tests.and.ant.share.classloader"/>
           <exclude name="${taskdefs.package}/cvslib/ChangeLogWriterTest.java"

Modified: ant/core/trunk/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java?view=diff&rev=448068&r1=448067&r2=448068
==============================================================================
--- ant/core/trunk/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java (original)
+++ ant/core/trunk/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java Tue Sep 19
22:10:29 2006
@@ -401,6 +401,18 @@
     }
 
     public void testIsExcludedDirectoryScanned() {
+        String shareclassloader = getProject().getProperty("tests.and.ant.share.classloader");
+        // when the test is started by the build.xml of ant
+        // if the property tests.and.ant.share.classloader is not set in the build.xml
+        // a sysproperty with name tests.and.ant.share.classloader and value
+        // ${tests.and.ant.share.classloader} will be set
+        // we are trying to catch this here.
+        if (shareclassloader == null
+                || (shareclassloader != null && shareclassloader.indexOf("${") ==
0)) {
+            System.out.println("cannot execute testIsExcludedDirectoryScanned when tests
are forked, " +
+                    "package private method called");
+            return;
+        }
         getProject().executeTarget("children-of-excluded-dir-setup");
         DirectoryScanner ds = new DirectoryScanner();
         ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message