User: user57  
  Date: 01/08/29 23:40:09

  Modified:    jboss    build.xml
  Log:
   o added 'run-nightly', which could be the target used for the night
     build/testsuite (once we have a machine to put it on).
   ! not really tested, names may changed, may not send report correctly,
   o dropped min stuff, what was I thinking
  
  Revision  Changes    Path
  1.11      +96 -32    build/jboss/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /cvsroot/jboss/build/jboss/build.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- build.xml 2001/08/30 05:09:35     1.10
  +++ build.xml 2001/08/30 06:40:09     1.11
  @@ -10,7 +10,7 @@
   <!--                                                                        -->
   <!-- ====================================================================== -->
   
  -<!-- $Id: build.xml,v 1.10 2001/08/30 05:09:35 mnf999 Exp $ -->
  +<!-- $Id: build.xml,v 1.11 2001/08/30 06:40:09 user57 Exp $ -->
   
   <project default="main">
   
  @@ -357,18 +357,6 @@
       </execmodules>
     </target>
   
  -  <!-- Invoke the 'min' on all configured modules -->
  -  <target name="all-min" depends="init">
  -    <execmodules target="min" modules="${modules}" 
  -              root="${project.root}/${module}"
  -              skipmissing="${executemodules.skipmissing}">
  -      <before target="${target}-${module}-prepare"/>
  -      <header message="${executemodules.header}"/>
  -      <footer message="${executemodules.footer}"/>
  -      <after target="${target}-${module}"/>
  -    </execmodules>
  -  </target>
  -
     <!-- Invoke the 'most' on all configured modules -->
     <target name="all-most" depends="init">
       <execmodules target="most" modules="${modules}" 
  @@ -449,15 +437,17 @@
       </projecthelp>
     </target>
   
  +  <target name="update-workspace">
  +    <echo>Updating workspace</echo>
  +    <cvs command="update -d" dest="${project.root}"/>
  +  </target>
  +
     <target name="main" depends="release"
          description="Executes the default target (release)."/>
       
     <target name="all" depends="all-all"
          description="Executes all modules and builds everything."/>
   
  -  <target name="min" depends="all-min"
  -       description="Executes all modules and builds a minimal subset."/>
  -
     <target name="most" depends="all-most"
          description="Executes all modules and builds most everything."/>
   
  @@ -473,8 +463,15 @@
     <target name="tests" depends="all-tests"
          description="Execute all tests."/>
   
  +
  +  <!-- ================================================================== -->
  +  <!-- Run the JBoss/Testsuite                                            -->
  +  <!-- ================================================================== -->
  +
  +  <target name="testsuite" depends="run-testsuite"/>
  +
     <!-- Invoke the 'tests' on the 'testsuite' module -->
  -  <target name="testsuite" depends="init"
  +  <target name="run-testsuite" depends="init"
             description="Execute the testsuite.">
       <execmodules target="tests" modules="testsuite"
                 root="${project.root}/${module}"
  @@ -486,17 +483,22 @@
       </execmodules>
     </target>
   
  -  <!-- Run the JBoss server. -->
  -  <property name="run.flags" value=""/>
  +  <!-- Run JBoss -->
  +  <property name="run.jboss.flags" value=""/>
   
  -  <target name="run" depends="run-check-os, run-unix, run-win32"
  -          description="Runs the JBoss server."/>
  +  <target name="run-jboss" depends="init"
  +          description="Runs the JBoss server.">
  +    <echo>Starting JBoss (redirected ${basedir}/run.log) </echo>
  +    <call target="run-jboss-check-os"/>
  +    <call target="run-jboss-unix"/>
  +    <call target="run-jboss-win32"/>
  +  </target>
   
  -  <target name="run-check-os">
  -    <condition property="run.unix">
  +  <target name="run-jboss-check-os">
  +    <condition property="run.jboss.unix">
         <os family="unix"/>
       </condition>
  -    <condition property="run.win32">
  +    <condition property="run.jboss.win32">
         <or>
           <os family="windows"/>
           <os family="dos"/>
  @@ -504,20 +506,82 @@
       </condition>
     </target>
   
  -  <target name="run-unix" depends="init" if="run.unix">
  -    <record name="${control.root}/run.log" append="no" loglevel="info"/>
  +  <!-- this is sloppy -->
  +
  +  <target name="run-jboss-unix" depends="init" if="run.jboss.unix">
       <exec executable="${project.release}/${release.id}/bin/run.sh"
  -       dir="${project.release}/${release.id}">
  -      <arg line="${run.flags}"/>
  +       dir="${project.release}/${release.id}"
  +          output="${basedir}/run.log"
  +       newenvironment="true">
  +      <arg line="${run.jboss.flags}"/>
       </exec>
     </target>
   
  -  <target name="run-win32" depends="init" if="run.win32">
  -    <record name="${control.root}/run.log" append="no" loglevel="info"/>
  +  <target name="run-jboss-win32" depends="init" if="run.jboss.win32">
       <exec executable="${project.release}/${release.id}/bin/run.bat"
  -       dir="${project.release}/${release.id}">
  -      <arg line="${run.flags}"/>
  +       dir="${project.release}/${release.id}"
  +          output="${basedir}/run.log"
  +       newenvironment="true">
  +      <arg line="${run.jboss.flags}"/>
       </exec>
  +  </target>
  +
  +
  +  <!-- ================================================================== -->
  +  <!-- Run the Nightly Tasks                                              -->
  +  <!-- ================================================================== -->
  +
  +  <!-- testing -->
  +
  +  <target name="run-nightly">
  +    <!-- perhaps refresh cvs -->
  +    <call target="update-workspace" unless="test.skipupdate"/>
  +
  +    <!-- perhaps clean/clobber -->
  +    <call target="clean" if="test.clean"/>
  +    <call target="clobber" if="test.clobber"/>
  +
  +    <!-- build everything -->
  +    <call target="all-release"/>
  +
  +    <!-- run the server in a seperate thread-->
  +    <parallel>
  +      <sequential>
  +        <antcall target="run-jboss"/>
  +      </sequential>
  +
  +      <sequential>
  +        <echo>Waiting for JBoss to activate (1 minute)</echo>
  +        <!-- need something to wait until jboss is up, or timeout -->
  +        <sleep minutes="1"/>
  +
  +        <!-- start the testsuite (it will generate reports by default) -->
  +        <echo>Starting JBoss/Testsuite</echo>
  +        <call target="run-testsuite"/>
  +
  +        <!-- shutdown the server -->
  +        <echo>Stopping JBoss</echo>
  +        <java classname="org.jboss.Shutdown">
  +          <classpath>
  +            <pathelement location="${release.lib}"/>
  +          </classpath>
  +
  +          <arg value="localhost"/>
  +          <arg value="1099"/>
  +        </java>
  +      </sequential>
  +    </parallel>
  +
  +    <echo>Sending Reports</echo>
  +    <!-- email output to list -->
  +    <mimemail tolist="[EMAIL PROTECTED]"
  +           subject="Automated JBoss Testsuite"
  +           message="Automated JBoss Testsuite"
  +           from="[EMAIL PROTECTED]">
  +      <fileset dir="${project.root}/testsuite/output/reports">
  +        <include name="text/**"/>
  +      </fileset>
  +    </mimemail>
     </target>
   
   </project>
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to