geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject cvs commit: incubator-geronimo/etc global.properties maven.xml
Date Mon, 01 Sep 2003 18:47:14 GMT
jdillon     2003/09/01 11:47:14

  Modified:    etc      global.properties maven.xml
  Log:
   o conditionaly run tests if sources change
  
  Revision  Changes    Path
  1.5       +4 -1      incubator-geronimo/etc/global.properties
  
  Index: global.properties
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/etc/global.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- global.properties	16 Aug 2003 17:15:11 -0000	1.4
  +++ global.properties	1 Sep 2003 18:47:14 -0000	1.5
  @@ -18,6 +18,9 @@
   
   maven.simian.linecount=3
   
  +# Force module tests to run, even if maven thinks they have passed
  +#maven.test.force=true
  +
   
   #####################################################
   # Properties related to project-site
  
  
  
  1.18      +29 -1     incubator-geronimo/etc/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/etc/maven.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- maven.xml	1 Sep 2003 18:26:11 -0000	1.17
  +++ maven.xml	1 Sep 2003 18:47:14 -0000	1.18
  @@ -148,6 +148,34 @@
       
     </goal>
     
  +  <!-- Check if the tests need to run -->
  +  <preGoal name="test:test">
  +    <j:if test="${context.getVariable('maven.test.force') == null}">
  +      <j:set var="uptodatePropName" value="tests.uptodate"/>
  +      <j:remove var="${uptodatePropName}"/>
  +      <ant:mkdir dir="${basedir}/target/test-reports/"/>
  +      <j:set var="uptodateFile" value="${basedir}/target/test-reports/tstamp"/>
  +      
  +      <ant:uptodate property="${uptodatePropName}"
  +                targetfile="${uptodateFile}">
  +        <ant:srcfiles dir="${basedir}/src/" includes="**/*"/>
  +      </ant:uptodate>
  +      
  +      <j:if test="${context.getVariable(uptodatePropName) == 'true'}">
  +        <ant:echo>NOTICE: Skipping tests, then seem to have passed already</ant:echo>
  +        <j:set var="maven.test.skip" value="true"/>
  +        <j:set var="unitTestSourcesPresent" value="false"/>
  +      </j:if>
  +    </j:if>
  +  </preGoal>
  +  
  +  <!-- Update the timestamp of the last successful test -->
  +  <postGoal name="test:test">
  +    <j:if test="${context.getVariable('maven.test.failure') == null}">
  +      <ant:touch file="${basedir}/target/test-reports/tstamp"/>
  +    </j:if>
  +  </postGoal>
  +  
     
     <!-- =================== -->
     <!-- XDoclet Integration -->
  
  
  

Mime
View raw message