build.xml.svn-base
来自「cqME :java framework for TCK test.」· SVN-BASE 代码 · 共 287 行
SVN-BASE
287 行
<!-- $Id$ Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 only, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details (a copy is included at /legal/license.txt). You should have received a copy of the GNU General Public License version 2 along with this work; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, CA 95054 or visit www.sun.com if you need additional information or have any questions.--><project name="TestME"> <dirname property="build" file="build.xml"/> <property name="tckdir" value="${build}/../" /> <property name="tcktests" value="${tckdir}/tests" /> <property name="src" value="${tckdir}/src" /> <property name="tcklib" value="${tckdir}/lib" /> <property name="precompileDir" value="${build}/precompileDir" /> <property name="javac_source" value="1.3" /> <property name="javac_target" value="1.3" /> <property name="j2mefm_lib" value="${tcklib}" /> <property name="javatest.jar" value="${tcklib}/javatest.jar" /> <property name="tckbuild.jar" value="${j2mefm_lib}/tckbuild.jar" /> <path id="tests.class.path"> <pathelement location="${j2mefm_lib}/midp_agent.jar"/> <pathelement location="${j2mefm_lib}/client.jar"/> <pathelement location="${j2mefm_lib}/agent.jar"/> <pathelement location="${j2mefm_lib}/j2me_communication.jar"/> <pathelement location="${j2mefm_lib}/j2me_messaging.jar"/> <pathelement location="${build}/testsClasses/not_preverified"/> </path> <property name="tests.class.path" refid="tests.class.path"/> <target name="build" depends="dist-tck_jt.jar, compile-tests, compile-server-part, compile-ant-tasks"> </target> <target name="run" depends="build"> <java classpath="${tckdir}/lib/javatest.jar" classname="com.sun.javatest.tool.Main" fork="true"> <arg value="-testsuite"/> <arg value="${tckdir}"/> <arg value="-config"/> <arg value="${interview}"/> </java> </target> <macrodef name="genDeps"> <attribute name="destDir"/> <attribute name="classpath"/> <attribute name="depClassPath"/> <attribute name="testsClassesDir"/> <attribute name="testsClassesLst"/> <attribute name="in"/> <attribute name="out"/> <sequential> <apply executable="${PRECOMPILE_JAVAHOME}/bin/java" dir ="@{destDir}" dest="@{destDir}" failonerror="yes" relative="yes" parallel="yes" type="file" skipemptyfilesets="yes"> <arg line="-classpath @{classpath}"/> <arg line="com.sun.tck.ant.DependencyCalculator"/> <arg line="-cp @{depClassPath}"/> <arg line="@{in} -out com.sun.tck"/> <arg line="@{out}" /> <arg line="-classes"/> <fileset dir="@{testsClassesDir}" includesfile="@{testsClassesLst}"/> <mapper type="glob" from="*.class" to="*.class.dep"/> </apply> </sequential> </macrodef> <macrodef name="createLists"> <attribute name="testsDir"/> <attribute name="testUrlsList"/> <attribute name="testExecuteClassesList"/> <attribute name="testSourcesList"/> <attribute name="testRemoteSourcesList"/> <attribute name="build"/> <attribute name="precompileDir"/> <attribute name="excludeList"/> <attribute name="create-lists.jte"/> <attribute name="reportDir"/> <sequential> <propertyfile file="@{testsDir}/testsuite.jtt" comment="Precompile TCK Test Suite Properties"> <entry key="name" value="Precompile TCK Test Suite"/> </propertyfile> <delete file="@{testUrlsList}"/> <delete file="@{testExecuteClassesList}"/> <delete file="@{testSourcesList}"/> <delete file="@{testRemoteSourcesList}"/> <delete dir="@{precompileDir}" /> <mkdir dir="@{precompileDir}" /> <java classname="com.sun.javatest.tool.Main" dir="@{testsDir}" fork="true" failonerror="true"> <arg line="-EtestUrlsList=@{testUrlsList}"/> <arg line="-EtestExecuteClassesList=@{testExecuteClassesList}"/> <arg line="-EtestSourcesList=@{testSourcesList}"/> <arg line="-EtestRemoteSourcesList=@{testRemoteSourcesList}"/> <arg line="-EbuildDir=@{build}"/> <arg line="-batch"/> <arg line=" -testsuite @{testsDir}"/> <arg line=" -workDir @{precompileDir}"/> <arg line=" -keywords execute|runtime"/> <arg line=" -excludeList @{excludeList}"/> <arg line=" -envFile @{create-lists.jte}"/> <arg line=" -env create-lists"/> <arg line=" -tests com"/> <arg line=" -runtests"/> <arg line=" -writeReport @{reportDir}"/> <arg line=" "/> <classpath> <pathelement location="${javatest.jar}"/> <pathelement location="${tckbuild.jar}"/> </classpath> </java> <delete file="@{testsDir}/testsuite.jtt"/> </sequential> </macrodef> <target name="compile-ant-tasks"> <loadproperties srcFile="${build}/plugin.properties"/> <path id="ant.class.path"> <pathelement location="${ant_home}/ant.jar"/> </path> <property name="ant.class.path" refid="ant.class.path"/> <mkdir dir="${build}/antClasses" /> <javac srcdir="${build}/src" destdir="${build}/antClasses" classpath="${ant.class.path}" memoryInitialSize="128m" memoryMaximumSize="512m" fork="true" debug="yes"> <patternset includes="**" /> </javac> <taskdef name="generateTestClassesList" classname="com.sun.jtharness.helper.GenerateTestClassesList" classpath="${build}/antClasses"/> <delete> <fileset dir="${build}/testsClasses/not_preverified" includes="**/*.dep"/> </delete> <genDeps destDir="${build}/testsClasses/not_preverified" classpath="${tcklib}/tckbuild.jar${path.separator}${JINI_TOOLS_JAR}${path.separator}${PRECOMPILE_JAVAHOME}/lib/tools.jar" depClassPath="${tests.class.path}${path.separator}${IMPLEMENTATION.CLASS.PATH}${path.separator}${testedClasspath}" testsClassesDir="${build}/testsClasses/not_preverified" testsClassesLst="${build}/testExecuteClassesList.lst" in="${testedPackagePrefix}" out="-out com.sun.tck.cldc.lib"/> <generateTestClassesList testUrlsList="${build}/testUrlsList.lst" testClassesList="${build}/../classes/shared/testClasses.lst" baseDir="${build}/testsClasses/not_preverified"/> </target> <target name="compile-tests"> <loadproperties srcFile="${build}/plugin.properties"/> <mkdir dir="${build}/testsClasses/not_preverified" /> <createLists testsDir="${tcktests}" testUrlsList="${build}/testUrlsList.lst" testExecuteClassesList="${build}/testExecuteClassesList.lst" testSourcesList="${build}/testSourcesList.lst" testRemoteSourcesList="${build}/testRemoteSourcesList.lst" build="${build}" precompileDir="${precompileDir}" excludeList="${build}/testSuite.jtx" create-lists.jte="${build}/create-lists.jte" reportDir="${precompileDir}/report"/> <patternset id="testSrc"> <includesfile name="${build}/testSourcesList.lst"/> </patternset> <javac srcdir="${tcktests}" destdir="${build}/testsClasses/not_preverified" bootclasspath="${IMPLEMENTATION.CLASS.PATH}" classpath="${tests.class.path}${path.separator}${testedClasspath}" memoryInitialSize="128m" memoryMaximumSize="512m" fork="true" source="${javac_source}" target="${javac_target}" debug="yes"> <patternset refid="testSrc" /> </javac> <mkdir dir="${tckdir}/classes/preverified" /> <exec executable="${PREVERIFIER}" failonerror="yes"> <arg line="-classpath ${IMPLEMENTATION.CLASS.PATH}${path.separator}${tests.class.path}${path.separator}${testedClasspath}"/> <arg line="-d ${tckdir}/classes/preverified"/> <arg line="${build}/testsClasses/not_preverified"/> </exec> </target> <target name="check-testRemoteSourcesList.lst"> <available file="${build}/testRemoteSourcesList.lst" property="testRemoteSourcesList.present"/> </target> <target name="compile-server-part" depends="check-testRemoteSourcesList.lst" if="testRemoteSourcesList.present"> <patternset id="serverTestSrc"> <includesfile name="${build}/testRemoteSourcesList.lst"/> </patternset> <path id="server.class.path"> <pathelement location="${javatest.jar}"/> <pathelement location="${j2mefm_lib}/j2mefw_jt.jar"/> </path> <property name="server.class.path" refid="server.class.path"/> <echo message="server.class.path=${server.class.path}" /> <mkdir dir="${build}/server_tests"/> <javac srcdir="${tcktests}" destdir="${build}/server_tests" classpath="${server.class.path}" memoryInitialSize="128m" memoryMaximumSize="512m" fork="true" source="${javac_source}" target="${javac_target}" debug="yes"> <patternset refid="serverTestSrc" /> </javac> <jar jarfile="${tcklib}/server_tests.jar" basedir="${build}/server_tests" includes="com/**"/> </target> <target name="compile-j2se.jar"> <mkdir dir="${build}/${jarname}"/> <javac srcdir="${src}" destdir="${build}/${jarname}" debug="on" source="${javac_source}" target="${javac_target}"> <patternset includes="**/*.java"/> <classpath path="${jarname.class.path}"/> </javac> </target> <property name="tck_jt" value="tck_jt" /> <target name="dist-tck_jt.jar"> <path id="tck_jt.class.path"> <pathelement location="${javatest.jar}"/> <pathelement location="${j2mefm_lib}/j2mefw_jt.jar"/> <pathelement location="${IMPLEMENTATION.CLASS.PATH}"/> </path> <property name="tck_jt.class.path" refid="tck_jt.class.path"/> <antcall target="compile-j2se.jar"> <param name="jarname" value="${tck_jt}"/> <param name="jarname.class.path" value="${tck_jt.class.path}"/> </antcall> <mkdir dir="${tcklib}" /> <jar jarfile="${tcklib}/${tck_jt}.jar" basedir="${build}/${tck_jt}" includes="com/**"/> </target> </project>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?