[jboss-cvs] jboss-portal/testsuite ...

Rali Genova rgenova at jboss.org
Mon Jul 24 16:44:30 EDT 2006


  User: rgenova 
  Date: 06/07/24 16:44:30

  Modified:    testsuite  build.xml
  Log:
  updated testsuite module and all modules that are currently running tests
  
  Revision  Changes    Path
  1.16      +98 -112   jboss-portal/testsuite/build.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: build.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/testsuite/build.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- build.xml	21 Jul 2006 18:02:07 -0000	1.15
  +++ build.xml	24 Jul 2006 20:44:30 -0000	1.16
  @@ -1,20 +1,31 @@
  +<?xml version="1.0" encoding="UTF-8"?>         
  +<!DOCTYPE project [  
  +<!ENTITY defaults   SYSTEM "../tools/etc/buildfragments/defaults.ent">
  +<!ENTITY libraries  SYSTEM "../thirdparty/libraries.ent">
  +]>
  +
   <project default="tests" name="JBoss Portal Testuite"
            xmlns:server="http://jboss.org/ns/test/ant/server">
      
  -
      <import file="imports/server-config.xml"/>
   
      <property environment="env"/>
  -   <property name="junit.formatter.usefile" value="true"/>
  -   <property name="jboss.junit.config" value=""/>
  +   <property name="junit.formatter.usefile" value="true" />
  +   <property name="jboss.junit.config" value="" />
      <property name="log.dir" value="output/logs"/>
      <property name="reports.dir" value="output/reports"/>
  +   <property name="project.thirdparty" value="../thirdparty"/>   
  +  
  +   &defaults;
  +   &libraries;
   
      <path id="portal.task.classpath">
         <pathelement location="${project.tools}/lib/ant.jar"/>
         <pathelement location="${project.tools}/lib/explode.jar"/>
         <pathelement location="${project.tools}/lib/cargo-core-uberjar-0.8.jar"/>
      </path>
  +   
  +   
      <taskdef
         name="deploy"
         classname="org.jboss.portal.common.ant.Deploy"
  @@ -28,18 +39,75 @@
         <mkdir dir="${log.dir}"/>
         <mkdir dir="${reports.dir}"/>
      </target>
  +  <!-- copy all logs to testsuite/output/logs --> 
  +   <target name="copy-logs">
  +           <copy todir="${log.dir}">
  +           <fileset dir="../${module}/">
  +               <include name="*.log"/>                
  +           </fileset>
  +           <globmapper from="*" to="${module}-*"/>
  +       </copy>
  +   </target>
  +	
  +	  <!-- copy all reports to testsuite/output/reports --> 
  +   <target name="copy-reports">
  +       <copy todir="${reports.dir}">
  +            <fileset dir="../${module}/">
  +               <include name="TEST-*.xml"/>
  +            </fileset>
  +       </copy>
  +   </target>
  +	
  +   <target name="run-tests">
  +       <ant antfile="../${module}/build.xml" output="output.log" dir="../${module}" target="package-tests"/>
  +       <ant antfile="../${module}/build.xml" output="tests.log" dir="../${module}" target="tests"/>
  +   </target>  
  +   
  +   <target name="tests-modules">
  +       <antcall target="run-tests">
  +           <param name="module" value="${module}"/>
  +       </antcall>
  +       <antcall target="copy-logs">
  +           <param name="module" value="${module}"/>
  +       </antcall>
  +       <antcall target="copy-reports">
  +           <param name="module" value="${module}"/>
  +       </antcall>
  +   </target>
  +   
  +  
   
      <!-- executes all modules' tests -->
      <target name="tests" depends="init">
         <server:start name="default"/>
  -      <antcall target="tests-common"/>
  -   	<antcall target="tests-format"/>
  -      <antcall target="tests-security"/>
  -      <antcall target="tests-identity"/>
  -   	<antcall target="tests-server"/>
  -   	<antcall target="tests-portlet"/>
  -      <antcall target="tests-cms"/>
  -      <antcall target="tests-wsrp"/>
  +   	<sequential>
  +   	<antcall target="agent-deploy"/>
  +   	<antcall target="tests-modules">
  +   	    <param name="module" value="common"/>
  +   	</antcall>
  +   	<antcall target="tests-modules">
  +   	    <param name="module" value="cms"/>
  +        </antcall>
  +        <antcall target="tests-modules">
  +   	    <param name="module" value="format"/>
  +   	</antcall>
  +   	<antcall target="tests-modules">
  +   	    <param name="module" value="security"/>
  +   	</antcall>
  +   	<antcall target="tests-modules">
  +   	    <param name="module" value="identity"/>
  +   	</antcall>
  +   	<antcall target="tests-modules">
  +   	    <param name="module" value="server"/>
  +   	</antcall>   	
  +   	<antcall target="tests-modules">
  +   	    <param name="module" value="portlet"/>
  +   	</antcall>
  +      <antcall target="tests-modules">
  +   		 <param name="module" value="portlet"/>
  +      </antcall>   	
  +      <antcall target="agent-undeploy"/>
  +        </sequential>
         <server:stop name="default"/>
      	<antcall target="reports"/>
      </target>
  @@ -64,7 +132,7 @@
             <fileset dir="../portlet" includes="TEST-*.xml,TEST-*.txt, *.log"/>
             <fileset dir="../security" includes="TEST-*.xml,TEST-*.txt, *.log"/>
             <fileset dir="../identity" includes="TEST-*.xml,TEST-*.txt, *.log"/>
  -          <fileset dir="../wsrp" includes="TEST-*.xml,TEST-*.txt, *.log"/>
  +          <fileset dir="../wsrp" includes="*.log"/>
         </delete>
         <!-- remove testsuite output dir -->
         <delete includeEmptyDirs="true">
  @@ -72,81 +140,6 @@
         </delete>
      </target>
   
  -
  -   <!-- runs tests from the common module -->
  -   <target name="tests-common">
  -      <ant antfile="../common/build.xml" output="tests.log" dir="../common" target="test"/>
  -      <copy todir="${reports.dir}">
  -         <fileset dir="../common/">
  -            <include name="TEST-*.xml"/>
  -         </fileset>
  -      </copy>
  -   </target>
  -
  -   <!-- runs tests from the format module -->
  -   <target name="tests-format">
  -      <ant antfile="../format/build.xml" output="tests.log" dir="../format" target="test"/>
  -      <copy todir="${reports.dir}">
  -         <fileset dir="../format/">
  -            <include name="TEST-*.xml"/>
  -         </fileset>
  -      </copy>
  -   </target>
  -
  -   <!-- runs tests from the security module -->
  -   <target name="tests-security">
  -      <ant antfile="../security/build.xml" output="tests.log" dir="../security" target="test"/>
  -      <copy todir="${reports.dir}">
  -         <fileset dir="../security/">
  -            <include name="TEST-*.xml"/>
  -         </fileset>
  -      </copy>
  -   </target>
  -
  -   <!-- runs tests from the identity module -->
  -   <target name="tests-identity">
  -      <ant antfile="../identity/build.xml" output="tests.log" dir="../identity" target="test"/>
  -      <copy todir="${reports.dir}">
  -         <fileset dir="../identity/">
  -            <include name="TEST-*.xml"/>
  -         </fileset>
  -      </copy>
  -   </target>
  -
  -   <!-- runs tests from the server module -->
  -   <target name="tests-server">
  -      <antcall target="agent-deploy"/>
  -      <ant antfile="../server/build.xml" output="tests.log" dir="../server" target="test"/>
  -      <copy todir="${reports.dir}">
  -         <fileset dir="../server/">
  -            <include name="TEST-*.xml"/>
  -         </fileset>
  -      </copy>
  -      <antcall target="agent-undeploy"/>
  -   </target>
  -
  -   <!-- runs tests from the portlet module -->
  -   <target name="tests-portlet">
  -      <antcall target="agent-deploy"/>
  -      <ant antfile="../portlet/build.xml" output="tests.log" dir="../portlet" target="test"/>
  -      <copy todir="${reports.dir}">
  -         <fileset dir="../portlet/">
  -            <include name="TEST-*.xml"/>
  -         </fileset>
  -      </copy>
  -      <antcall target="agent-undeploy"/>
  -   </target>
  -
  -   <!-- runs tests from the cms module -->
  -   <target name="tests-cms">
  -      <ant antfile="../cms/build.xml" output="tests.log" dir="../cms" target="test"/>
  -      <copy todir="${reports.dir}">
  -         <fileset dir="../cms/">
  -            <include name="TEST-*.xml"/>
  -         </fileset>
  -      </copy>
  -   </target>
  -
      <!-- Deployment of agent -->
      <target name="agent-deploy">
         <deploy file="../test/output/lib/portal-test.sar" config="default"/>
  @@ -157,15 +150,8 @@
         <undeploy file="../test/output/lib/portal-test.sar" config="default"/>
      </target>
   
  -   <!-- WSRP tests -->
  -   <target name="tests-wsrp">
  -      <antcall target="agent-deploy"/>
  -      <ant antfile="../wsrp/build.xml" output="tests.log" dir="../wsrp" target="execute-tests"/>
  -      <copy todir="${reports.dir}">
  -         <fileset dir="../wsrp/">
  -            <include name="TEST-*.xml"/>
  -         </fileset>
  -      </copy>
  -      <antcall target="agent-undeploy"/>
  +	<target name="help">
  +		<echo message="To run individual modules use the test-modules target with -Dmodule=the module you want to test"/>
      </target>
  +   
   </project>
  \ No newline at end of file
  
  
  



More information about the jboss-cvs-commits mailing list