The version of Apache log4j used by SoundHelix.

[[ 🗃 ^aEp6o apache-log4j ]] :: [📥 Inbox] [📤 Outbox] [🐤 Followers] [🤝 Collaborators] [🛠 Commits]

Clone

HTTPS: git clone https://vervis.peers.community/repos/aEp6o

SSH: git clone USERNAME@vervis.peers.community:aEp6o

Branches

Tags

v1_2_12_rc1 :: tests /

build.xml


<!-- This file is an ANT build script. ANT is a Java based build tool. -->
<!-- It is availale from http://jakarta.apache.org/ant/                -->


<!-- ================================================================= -->
<!-- NOTE: all directories are relative to jakarta-log4j/tests         -->
<!-- ================================================================= -->
<project name="log4j" default="usage" basedir="." >

  <property file="build.properties"/>

  <!-- Read the system environment variables and stores them in properties, -->
  <!-- prefixed with "env". -->
  <property environment="env"/>

  <!-- The base directory relative to which most targets are built -->
  <property name="base" value="."/>
 
  <!-- The directory where source files are stored. -->
  <property name="project.source.home" value="../src/java/"/>
  <property name="project.classes.home" value="../dist/classes/"/>

  <property name="tests.source.home" value="./src/java/"/>
  <property name="excludes" value=""/>

  <path id="tests.classpath">
    <pathelement location="${project.source.home}"/>
    <pathelement location="${project.classes.home}"/>
    <pathelement location="${tests.source.home}"/>
    <pathelement location="./classes"/>
    <pathelement location="./resources"/>
    <pathelement location="${jakarta.oro.jar}"/>
    <pathelement location="${xml-api.jar}"/>
    <pathelement location="${xml-impl.jar}"/>
    <pathelement location="${clover.jar}"/>
  </path>

  <!-- ================================================================= -->
  <!--                        TARGETS                                    -->
  <!-- ================================================================= -->



  <!-- ================================================================= -->
  <!-- Default target                                                    -->
  <!-- ================================================================= -->
  
  <target name="usage">
    <echo>

    These are the targets supported by this ANT build scpript:

    build  - compile all project files, if a certain library is missing, 
	      then the compilation of its dependents are skipped.

    regression - Run regression tests which check large parts of log4j.

    runAll     - run all available tests
    </echo>
  </target>

  <target name="prepare">
    <mkdir dir="./classes" />
    <mkdir dir="./output" />
  </target>

  <!-- Clean the parent project                                          -->
  <!-- ================================================================= -->
  <target name="parentClean">
    <ant dir=".." target="clean" inheritRefs="true"/>
  </target>
  
  
  
  <!-- ================================================================= -->
  <!-- Build the parent project                                          -->
  <!-- ================================================================= -->  
  <target name="parentBuild">    
    <ant dir=".." target="build.core" inheritRefs="true"/>
    <ant dir=".." target="build.xml" inheritRefs="true"/>
  </target>


  <!-- ================================================================= -->
  <!-- Compile test cases and related source files.                      -->
  <!-- ================================================================= -->
  <target name="build" depends="parentBuild, prepare">
    <property name="haltonfailure" value="yes"/>
    <javac srcdir="${tests.source.home}"
	         destdir="./classes"
           deprecation="${deprecation}"
           target="1.1"
           source="1.3"
           debug="on"
           excludes="${excludes}">			
      <classpath refid="tests.classpath"/>
    </javac>
  </target>

  <!-- ================================================================= -->
  <!-- Remove all generated files such as compiled class files and test  -->
  <!-- case output.                                                     -->
  <!-- ================================================================= -->
  <target name="clean">
    <delete dir="./classes/" />
    <delete dir="./output/" />
  </target>

  <!-- ================================================================= -->
  <!-- Run all tests                                                     -->
  <!-- ================================================================= -->  
  <target name="runAll" depends="regression, longUnit"/>

  <!-- ================================================================= -->
  <!-- Tests multiple parts of log4j. These tests are much more fragile  -->
  <!-- unit tests. Regression tests compare output with a previously     -->
  <!-- created witness file.                                             -->
  <!-- ================================================================= -->  
  <target name="regression" depends="Core, Minimum, Logger, DOM, CustomLevel, 
                                     CustomLogger,  
                                     HierarchyThreshold, DefaultInit, SocketServer, 
                                     XMLLayout, AsyncAppender, 
                                     OptionConverter, BoundedFIFO, 
                                     CyclicBuffer, OR, 
                                     LevelMatchFilter, PatternParser, 
                                     PatternLayout, DRFA"/>

  <!-- ================================================================= -->
  <!-- Longer unit tests                                                 -->
  <!-- ================================================================= -->
  <target name="longUnit" depends=""/>

  <!-- ================================================================= -->
  <!-- ============== Regression and Unit Tests follow ================= -->  
  <!-- ================================================================= -->
    <target name="Core" depends="build">
      <junit printsummary="yes" fork="yes" haltonfailure="yes">
        <classpath refid="tests.classpath"/>
        <formatter type="plain" usefile="false"/>
        <test name="org.apache.log4j.CoreTestSuite" />
      </junit>
    </target>


  <target name="Minimum" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test name="org.apache.log4j.MinimumTestCase" />
    </junit>
  </target>

  <target name="Logger" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test name="org.apache.log4j.LoggerTestCase" />
    </junit>
  </target>

  <target name="PatternLayout" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test name="org.apache.log4j.PatternLayoutTestCase" />
    </junit>
  </target>

  <target name="HierarchyThreshold" depends="build">
    <delete file="output/temp"/>
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test name="org.apache.log4j.HierarchyThresholdTestCase" />
    </junit>
  </target>

  <target name="DOM" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test name="org.apache.log4j.xml.DOMTestCase" />
    </junit>
  </target>

  <target name="CustomLevel" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false" />
      <test name="org.apache.log4j.xml.CustomLevelTestCase" />
    </junit>
  </target>

  <target name="CustomLogger" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false" />
      <test name="org.apache.log4j.customLogger.XLoggerTestCase" />
    </junit>
  </target>

  <target name="DefaultInit" depends="build">
    <!-- Delete possible cruft from previous runs. -->
    <delete file="classes/log4j.xml"/>
    <delete file="classes/log4j.properties"/>

    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test fork="true" name="org.apache.log4j.defaultInit.TestCase1" />
    </junit>

    <copy file="input/xml/defaultInit.xml" tofile="classes/log4j.xml"/>
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test fork="true" name="org.apache.log4j.defaultInit.TestCase2" />      
    </junit>
    <delete file="classes/log4j.xml"/>

    <!-- test handling of log4j.defaultInitOverride system property -->
    <copy file="input/xml/defaultInit.xml" tofile="classes/log4j.xml"/>
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <jvmarg value="-Dlog4j.defaultInitOverride=true"/>
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test fork="true" name="org.apache.log4j.defaultInit.TestCase1" />
    </junit>
    <delete file="classes/log4j.xml"/>

    <!-- test default initialization from log4j.xml -->
    <copy file="input/defaultInit3.properties" tofile="classes/log4j.properties"/>
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test fork="true" name="org.apache.log4j.defaultInit.TestCase3" />      
    </junit>
    <delete file="classes/log4j.properties"/>

    <!-- test default initialization from log4j.properties -->
    <copy file="input/xml/defaultInit.xml" tofile="classes/log4j.xml"/>
    <copy file="input/defaultInit3.properties" tofile="classes/log4j.properties"/>
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test fork="true" name="org.apache.log4j.defaultInit.TestCase4" />      
    </junit>
    <delete file="classes/log4j.xml"/>
    <delete file="classes/log4j.properties"/>
  </target>

  <target name="SocketServer" depends="build">
    <parallel>
      <java classname="org.apache.log4j.net.ShortSocketServer" fork="yes">
	<arg value="8"/> 
	<arg value="input/socketServer"/> 
	<classpath refid="tests.classpath"/>
      </java>
      <sequential>
	<sleep seconds="2"/>
	<junit printsummary="yes" fork="yes" haltonfailure="${haltonfailure}">
	  <sysproperty key="testNumber" value="1"/>
	  <classpath refid="tests.classpath"/>
	  <formatter type="plain" usefile="false" />
	  <test name="org.apache.log4j.net.SocketServerTestCase" />
	</junit>
      </sequential>
    </parallel>
  </target>

  <target name="XMLLayout" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false" />
      <test name="org.apache.log4j.xml.XMLLayoutTestCase" />
    </junit>
  </target>

  <target name="AsyncAppender" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false" />
      <test name="org.apache.log4j.AsyncAppenderTestCase" />
    </junit>
  </target>

  <target name="LevelMatchFilter" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test name="org.apache.log4j.varia.LevelMatchFilterTestCase" />
    </junit>
  </target>

  <target name="ErrorHandler" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false" />
      <test name="org.apache.log4j.varia.ErrorHandlerTestCase" />
    </junit>
  </target>

  <target name="OptionConverter" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test name="org.apache.log4j.helpers.OptionConverterTestCase" />
    </junit>
  </target>

  <target name="BoundedFIFO" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test name="org.apache.log4j.helpers.BoundedFIFOTestCase" />
    </junit>
  </target>

  <target name="CyclicBuffer" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test name="org.apache.log4j.helpers.CyclicBufferTestCase" />
    </junit>
  </target>

  <target name="PatternParser" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test name="org.apache.log4j.helpers.PatternParserTestCase" />
    </junit>
  </target>


  <target name="OR" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test name="org.apache.log4j.or.ORTestCase" />
    </junit>
  </target>

  <target name="DRFA" depends="build">
    <junit printsummary="yes" fork="yes" haltonfailure="yes">
      <classpath refid="tests.classpath"/>
      <formatter type="plain" usefile="false"/>
      <test name="org.apache.log4j.DRFATestCase" />
    </junit>
  </target>

  <!-- ================================================================= -->
  <!-- ========================= Very long Tests ======================= -->
  <!-- ================================================================= -->
  
  <!-- none yet, but StressCategory is a good candidate... -->
  
   <!-- ============================================================= --> 
   <!--                      Coverage analysis                        -->
   <!-- ============================================================= --> 
   <target name="with.clover">
        <!-- some tests fail when running clover
                setting this property will cause testing to continue  -->
        <property name="haltonfailure" value="no"/>
        <available resource="clovertasks" property="clover-present"/>

        <fail unless="clover-present">
          clover.jar must be in the classpath and should also be
          placed in the lib directory.  A version of clover 
          (http://www.cenqua.com/clover) for use with ASF projects 
          is available from the committers/donated-licenses/clover module 
          in the SVN repository. 
       </fail>
         
       <taskdef resource="clovertasks"/>
       <clover-setup initString="log4j.db"/>
    </target>

    <target name="coverageReport" depends="parentClean, clean, with.clover, runAll">
      <mkdir dir="coverage"/>
      <taskdef resource="clovertasks"/>
      <clover-report>
        <current title="log4j coverage" outfile="coverage">
          <format type="html"/>
        </current>
      </clover-report>
    </target>

  
</project>


[See repo JSON]