How to do android emma coverage test in your own ant scipts

引用:http://www.cnitblog.com/reene/archive/2011/06/30/74504.html1.  emma taskdef    <!-- Emma configuration -->

     < property  name ="emma.dir"  value ="${android.sdk.root}/tools/lib"   />
    
< path  id ="emma.lib.dir" >
        
< pathelement  location ="${emma.dir}/emma.jar"   />
        
< pathelement  location ="${emma.dir}/emma_ant.jar"   />
    
</ path >
    
< taskdef  resource ="emma_ant.properties"  classpathref ="emma.lib.dir"   />
    
<!--  End of emma configuration  -->


2.     <!-- - - - - - - - - - - - - - - - - - 

          target: emma-instrument                      
         - - - - - - - - - - - - - - - - - 
-->
    
< target  name ="emma.instrument"  if ="enable.emma.on.test" >
        
< property  name ="emma.enabled"  value ="true"   />
        
< echo > Instrumenting classes from ${project.base.dir}/${android.project.dir}/bin,${project.base.dir}/${android.project.dir}/libs/sup-client.jar </ echo >
        
<!--  It only instruments class files, not any external libs  -->
        
< emma  enabled ="${emma.enabled}" >
            
< instr  mode ="overwrite"
                   instrpath
="${project.base.dir}/${android.project.dir}/bin,${project.base.dir}/${android.project.dir}/libs/sup-client.jar"
                   outdir
="${project.base.dir}/${android.project.dir}/bin" >
            
</ instr >
            
<!--  TODO: exclusion filters on R*.class and allowing custom exclusion from
                         user defined file 
-->
        
</ emma >
        
< echo > Copy emma. to project libs </ echo >
        
< copy  todir ="${project.base.dir}/${android.project.dir}/libs"  overwrite ="true" >
             
< fileset  dir ="${emma.dir}"  includes ="emma_device.jar" />
        
</ copy >
        
    
</ target >

333

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值