autotest.xml

<?xml version="1.0" encoding="UTF-8"?>

<project name="publisher" default="file" basedir="..">

<property file="CI_tool/ant.properties"/>

    <taskdef resource="net/sf/antcontrib/antlib.xml">
        <classpath>
            <fileset dir="${ant.home}/lib" includes="ant-contrib*.jar"/>
        </classpath>
    </taskdef>
   
  <target name="file">
<!-- 杀掉客户端
<exec executable="cmd" failonerror="false">
  <arg value="/c"/>
    <arg value="${rootdir}/CI_tool/kill.bat" />
  </exec>  
  -->
<!--  安装客户端  //-->
  <delete dir="${testDir}/runningDir" failonerror="false"/>
  <delete file="${testDir}/${patchName}" failonerror="false"/>
  
  <echo message="ftp download the client" />
  <ftp action="get" server="${ftpServer}" port="${ftpPort}" userid="${ftpUsr}" password="${ftpPwd}" remotedir="${ftpDir}" >        
<fileset dir="${testDir}">        
<include name="${patchName}" />        
</fileset>        
  </ftp>     
  <echo message="ftp end"/>
  <echo message="unjar the package" />
  <unjar src="${testDir}/${patchName}" dest="${testDir}" overwrite="true" />
 
   
    <!--
    <exec executable="cmd">
  <arg value="/c"/>
    <arg value="d:\bvt\ci_tool\xxx.bat"/>
    <arg value="-p"/>   
  </exec>  
   -->

  <!-- 分机更新womat -->   
  <exec executable="cmd">
  <arg value="/c"/>
    <arg value="${womat}/bin/womat-upgrade.bat" />
    <arg value="-p"/>   
  </exec>  
  <echo>install womat upgrade finish!</echo>
 
  <!--删除截图和日志 -->
<exec executable="cmd">
<arg value="/c"/>
<arg value="${rootdir}/CI_tool/dir.bat"/>
<arg value="D:\\BVT\\log"/>
<arg value="D:\\BVT\\projects\\ATP_M2000\\case\\R10Case\\snapshot"/>
</exec>

 
  <echo>start agent.........</echo>

  <property name="libs" value="${codedir}/lib" />
<property name="libs_rft" value="${womat}\eclipse\plugins\com.rational.test.ft.wswplugin_6.1.0" />
  <path id="path.id.classpath">
<fileset dir="${libs}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${libs_rft}">
<include name="**/*.jar" />
</fileset>
<pathelement location="${codedir}" />
</path>

<forget>
<java classname="script.main.EntryPoint"
classpathref="path.id.classpath"
failonerror="false"
fork="true"
maxmemory="1024m"
output="agent.txt"
>
<jvmarg value="-Djava.library.path=${womat}\eclipse\plugins\com.huawei.af_1.0.0"/>
<arg file="${codedir}"/>
<arg file="${casedir}"/>
</java>
</forget>

 
    <echo>agent started.........</echo>
   
    </target>
</project>

你可能感兴趣的:(xml)