hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-hivemind/examples/src/test/com/panorama/startup/impl TestTaskExecutor.java
Date Sat, 24 Jul 2004 13:41:53 GMT
hlship      2004/07/24 06:41:53

  Modified:    hivebuild hivebuild.xml jar-module.xml
               framework/src/test/hivemind/test FrameworkTestCase.java
               examples/src/test/com/panorama/startup/impl
                        TestTaskExecutor.java
  Log:
  Minor modifcations to the test suite, to make it work properly inside Eclipse and from the
command line.
  
  Revision  Changes    Path
  1.2       +4 -0      jakarta-hivemind/hivebuild/hivebuild.xml
  
  Index: hivebuild.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/hivebuild/hivebuild.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- hivebuild.xml	11 Jul 2004 17:14:43 -0000	1.1
  +++ hivebuild.xml	24 Jul 2004 13:41:52 -0000	1.2
  @@ -26,6 +26,10 @@
     <!-- Note: this should move out of the hivebuild.dir -->
     
   	<property file="${root.dir}/version.properties"/>
  +  
  +  <!-- Get the absolute location of the project directory. -->
  +  
  +  <property name="project.dir" location="${root.dir}"/>
   
   	<target name="clean" description="Deletes all derived files.">
   	
  
  
  
  1.3       +2 -0      jakarta-hivemind/hivebuild/jar-module.xml
  
  Index: jar-module.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/hivebuild/jar-module.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jar-module.xml	20 Jul 2004 17:27:07 -0000	1.2
  +++ jar-module.xml	24 Jul 2004 13:41:52 -0000	1.3
  @@ -166,6 +166,8 @@
   				tempdir="${junit.temp.dir}">
   					
   					<classpath refid="@{classpath-id}"/>
  +          
  +          <sysproperty key="PROJECT_ROOT" value="${project.dir}"/>    
   					
   					<formatter type="xml"/>
             <formatter type="brief" usefile="false"/>
  
  
  
  1.10      +2 -2      jakarta-hivemind/framework/src/test/hivemind/test/FrameworkTestCase.java
  
  Index: FrameworkTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/test/hivemind/test/FrameworkTestCase.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FrameworkTestCase.java	25 Jun 2004 20:20:04 -0000	1.9
  +++ FrameworkTestCase.java	24 Jul 2004 13:41:52 -0000	1.10
  @@ -32,11 +32,11 @@
   {
       protected ClassResolver _resolver = new DefaultClassResolver();
   
  -    private static final String FRAMEWORK_ROOT = System.getProperty("FRAMEWORK_ROOT", "./");
  +    private static final String PROJECT_ROOT = System.getProperty("PROJECT_ROOT", "..");
   
       protected String getFrameworkPath(String path)
       {
  -        return FRAMEWORK_ROOT + path;
  +        return PROJECT_ROOT + "/framework/" + path;
       }
   
       protected ModuleDescriptor parse(String file) throws Exception
  
  
  
  1.2       +9 -5      jakarta-hivemind/examples/src/test/com/panorama/startup/impl/TestTaskExecutor.java
  
  Index: TestTaskExecutor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/examples/src/test/com/panorama/startup/impl/TestTaskExecutor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestTaskExecutor.java	20 Jul 2004 17:22:53 -0000	1.1
  +++ TestTaskExecutor.java	24 Jul 2004 13:41:53 -0000	1.2
  @@ -23,12 +23,14 @@
   import org.apache.hivemind.ApplicationRuntimeException;
   import org.apache.hivemind.ErrorHandler;
   import org.apache.hivemind.Messages;
  +import org.apache.hivemind.Resource;
   import org.apache.hivemind.impl.DefaultClassResolver;
   import org.apache.hivemind.impl.MessagesImpl;
   import org.apache.hivemind.test.ExceptionAwareArgumentsMatcher;
   import org.apache.hivemind.test.HiveMindTestCase;
   import org.apache.hivemind.test.RegexpArgumentsMatcher;
   import org.apache.hivemind.util.ClasspathResource;
  +import org.apache.hivemind.util.FileResource;
   import org.easymock.MockControl;
   
   import com.panorama.startup.Executable;
  @@ -59,8 +61,10 @@
   
       public Messages getMessages()
       {
  -        ClasspathResource r =
  -            new ClasspathResource(new DefaultClassResolver(), "/META-INF/panorama.startup.sdl");
  +        String projectRoot = System.getProperty("PROJECT_ROOT", "..");
  +        String path = projectRoot + "/examples/src/descriptor/META-INF/panorama.startup.sdl";
  +
  +        Resource r = new FileResource(path);
   
           return new MessagesImpl(r, Locale.getDefault());
       }
  @@ -99,8 +103,8 @@
           e.setMessages(getMessages());
           e.setTasks(tasks);
   
  -		// Note the ordering; explicitly set, to check that ordering does
  -		// take place.
  +        // Note the ordering; explicitly set, to check that ordering does
  +        // take place.
           log.info("Executing task Fixture #2.");
           log.info("Executing task Fixture #1.");
           log.info("Executed 2 tasks \\(in \\d+ milliseconds\\)\\.");
  @@ -159,7 +163,7 @@
           e.setLog(log);
           e.setMessages(getMessages());
           e.setTasks(tasks);
  -        
  +
           e.run();
   
           verifyControls();
  
  
  

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


Mime
View raw message