avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject svn commit: rev 22455 - avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks
Date Fri, 02 Jul 2004 08:01:39 GMT
Author: mcconnell
Date: Fri Jul  2 01:01:38 2004
New Revision: 22455

Modified:
   avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/JUnitTestTask.java
Log:
Update to ensure that we copy unit test resources before doing the test to see if unit tests
exist.  This is to deal with builds that override the test target but still need the target/test
directory setup and populated.

Modified: avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/JUnitTestTask.java
==============================================================================
--- avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/JUnitTestTask.java	(original)
+++ avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/JUnitTestTask.java	Fri
Jul  2 01:01:38 2004
@@ -101,6 +101,9 @@
         final String testPath = project.getProperty( TEST_SRC_KEY );
         final File src = new File( build, testPath );
 
+        final File working = getContext().getTestDirectory();
+        copyUnitTestResource( working );
+
         if( src.exists() )
         {
             final File classes = getContext().getTestClassesDirectory();
@@ -125,7 +128,7 @@
             //
 
             classpath.createPathElement().setLocation( classes );
-            test( src, classpath );
+            test( src, classpath, working );
         }
 
         final String error = project.getProperty( ERROR_KEY );
@@ -212,13 +215,9 @@
         javac.execute();
     }
 
-    private void test( final File src, final Path classpath )
+    private void test( final File src, final Path classpath, File working )
     {
         final Project project = getProject();
-
-        final File working = getContext().getTestDirectory();
-        mkDir( working );
-        copyUnitTestResource( working );
 
         final FileSet fileset = new FileSet();
         fileset.setDir( src );

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message