⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 build.xml~

📁 SRI international 发布的OAA框架软件
💻 XML~
字号:
<?xml version="1.0" encoding="UTF-8"?>
<project name="backport-util-concurrent" default="dist">

    <!-- where to build the distribution -->
    <condition property="buc.dist.dir" value="${dist.dir}">
      <isset property="dist.dir"/>
    </condition>
    <property name="buc.dist.dir" location="backport-util-concurrent-dist"/>

    <!-- see the comments on the "test" target -->
    <property name="tck.shortDelay" value="300"/>

    <property name="build.compiler.emacs" value="true"/>

    <import file="build-jbexport.xml"/>

    <target name="dist" depends="jbuild,javadoc">
        <copy file="backport-util-concurrent.jar" todir="${buc.dist.dir}/"/>
        <copy file="license.html" todir="${buc.dist.dir}"/>
        <copy file="README.html" todir="${buc.dist.dir}"/>
        <copy todir="${buc.dist.dir}/src">
            <fileset dir="src" includes="**/*" excludes="**/CVS"/>
        </copy>
        <copy todir="${buc.dist.dir}/doc">
            <fileset dir="doc" includes="**/*"/>
        </copy>
    </target>

    <target name="jbuild" depends="jdeps,make"/>

    <!--

    Please note that the TCK unit tests have been written in a way so that
    they depend on certain race conditions (e.g. that a given thread completes
    within a given time frame etc.). In other words, failing unit test does
    NOT immediately imply that there is a bug in the backport - it may simply
    be the effect of a missed race, e.g. resulting from the background load
    interferring with the tests.

    To balance robustness with time-to-completion, the "tck.shortDelay" property
    can be used. The bigger its value, the more reliable the test suite
    becomes, but the time to completion increases proportionally. For these
    tests to be representative, you need to make sure that no other CPU- or
    IO-bound programs are running, and use sufficiently large value of the
    "tck.shortDelay" property (default is 300ms). Good value to start with is
    50ms, although it may be insufficient on machines below 1 GHz. On fast
    computers (3 GHz) you can get away with values of 10ms. However, if you
    observe failures, increase this value. Please report errors ONLY if the
    failures occur consistently (with constant probability) regardless of the
    value of the "tck.shortDelay" property, and with no background load.

     -->

    <target name="test" depends="jdeps,javacompile"
            description="runs TCK unit tests on the backport">

        <java classname="JSR166TestCase">
            <classpath>
                <pathelement location="external/junit.jar"/>
                <pathelement location="classes/"/>
            </classpath>
            <sysproperty key="tck.shortDelay" value="${tck.shortDelay}"/>
        </java>

<!--        <junit printsummary="true" showoutput="true">
            <classpath>
                <pathelement location="external/junit.jar"/>
                <pathelement location="classes/"/>
            </classpath>

            <test name="JSR166TestCase" haltonfailure="no" fork="true"/>
        </junit>
-->
    </target>

    <target name="test.loops" depends="init,javacompile">

        <property name="max.trials" value="8"/>

        <runloop.maxtrials class="SimpleReentrantLockLoops"/>
        <runloop.maxtrials class="TimeoutLockLoops"/>
        <runloop.maxtrials class="CheckedLockLoops"/>
        <runloop.maxtrials class="UncheckedLockLoops"/>
        <runloop.maxtrials class="CancelledLockLoops"/>
        <runloop.maxtrials class="LockOncePerThreadLoops"/>
        <runloop.maxtrials class="ProducerConsumerLoops"/>
        <runloop.maxtrials class="MultipleProducersSingleConsumerLoops"/>
        <runloop.maxtrials class="SingleProducerMultipleConsumerLoops"/>
        <runloop.maxtrials class="CancelledProducerConsumerLoops"/>
        <runloop.maxtrials class="ExecutorCompletionServiceLoops"/>
        <runloop class="ConcurrentQueueLoops"
                 args="edu.emory.mathcs.backport.java.util.concurrent.ConcurrentLinkedQueue ${max.trials}"/>
        <runloop class="ConcurrentDequeLoops"
                 args="edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingDeque ${max.trials}"/>
        <runloop class="DequeBash"
                 args="edu.emory.mathcs.backport.java.util.ArrayDeque ${max.trials}"/>
        <!--runloop class="DequeBash"
                 args="java.util.LinkedList ${max.trials}"/-->
        <runloop class="DequeBash"
                 args="edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingDeque ${max.trials}"/>
        <runloop.maxtrials class="ExchangeLoops"/>
        <runloop.maxtrials class="CancelledFutureLoops"/>
        <runloop class="MapCheck"
                 args="edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap ${max.trials}"/>
        <runloop class="IntMapCheck"
                 args="edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap ${max.trials}"/>
        <!--runloop.maxtrials class="IntMapCheck edu.emory.mathcs.backport.java.util.concurrent.ConcurrentSkipListMap"/>
        <runloop class="NavigableMapCheck" args="java.util.TreeMap ${max.trials}"/>
        <runloop class="NavigableMapCheck"
                 args="edu.emory.mathcs.backport.java.util.concurrent.ConcurrentSkipListMap ${max.trials}"/>
        <runloop class="NavigableSetCheck"
                 args="java.util.TreeSet ${max.trials}"/>
        <runloop class="SetBash"
                 args="edu.emory.mathcs.backport.java.util.concurrent.ConcurrentSkipListSet ${max.trials} 100"/>
        <runloop class="NavigableSetCheck"
                 args="edu.emory.mathcs.backport.java.util.concurrent.ConcurrentSkipListSet ${max.trials}"/-->
        <runloop class="MapLoops"
                 args="edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap ${max.trials}"/>
        <!--runloop class="MapLoops"
                  args="edu.emory.mathcs.backport.java.util.concurrent.ConcurrentSkipListMap ${max.trials}"/-->
        <runloop class="MapLoops" args="RWMap ${max.trials}"/>
        <runloop class="TimeUnitLoops"/>
        <runloop class="ReadHoldingWriteLock"/>
        <runloop class="RLJBar"/>
        <runloop class="RLJBar" args="-b"/>
        <runloop class="RLIBar" args="-np ${max.trials}"/>
        <runloop class="RLIBar" args="-batch 10 -np ${max.trials}"/>
    </target>

    <target depends="init" name="javacompile">
      <javac classpathref="project.class.path" debug="true" deprecation="true" destdir="${dest}" nowarn="false" source="1.3" target="1.2">
        <src path="src"/>
        <src path="test/tck/src"/>
        <src path="test/loops/src"/>
      </javac>
    </target>

    <target name="jdeps">
      <dependset>
        <srcfileset dir="src" includes="**/*"/>
        <srcfileset dir="test/tck/src" includes="**/*"/>
        <srcfileset dir="." includes="*.xml"/>
        <targetfileset dir="classes" includes="**/*"/>
        <targetfileset dir="doc/api" includes="**/*"/>
      </dependset>
    </target>

    <target name="javadoc" depends="javadoc.uptodateCheck" unless="javadoc.uptodate">
      <javadoc source="1.4"
               destdir="doc/api"
               protected="true"
               packagenames="edu.emory.mathcs.*"
               sourcepath="src">
        <tag description="To Do:" name="todo" scope="all"/>
      </javadoc>
    </target>

    <target name="javadoc.uptodateCheck">
      <uptodate property="javadoc.uptodate" targetfile="doc/api/index.html">
        <srcfiles dir="src" includes="**/*"/>
      </uptodate>
    </target>

    <target name="clean.dist" depends="clean"
            description="Deletes distribution and all generated files">
      <delete dir="${buc.dist.dir}"/>
      <delete dir="doc/api"/>
    </target>

    <target name="rebuild.dist" depends="clean.dist,dist"
            description="Rebuilds the distribution from scratch">
    </target>

    <macrodef name="runloop">
      <attribute name="class"/>
      <attribute name="args" default=""/>
      <sequential>
        <echo message="@{class} @{args}"/>
        <java classpath="classes" classname="@{class}">
          <arg line="@{args}"/>
        </java>
      </sequential>
    </macrodef>

    <presetdef name="runloop.maxtrials">
      <runloop args="${max.trials}"/>
    </presetdef>

</project>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -