build_run_ui.xml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="project" default="getreport" basedir="../"
  3. xmlns:jsl="antlib:com.googlecode.jslint4java"> <!-- 配置信息 10.48.31.90:8089-->
  4. <property name="serverip" value="10.48.31.90:8089"/>
  5. <property name="report.path" value="_test/tools/br/report_ui"/>
  6. <property name="coverage.path" value="_test/coverage"/>
  7. <property name="report.file" value="_test/tools/br/report.html"/>
  8. <property name="svn.project" value="ueditor_svn"/>
  9. <property name="git.project" value="ueditor"/>
  10. <property name="git.user" value=""/>
  11. <path id="ext.classpath">
  12. <fileset dir="_test/tools/lib">
  13. <include name="**/*.jar"/>
  14. </fileset>
  15. </path>
  16. <taskdef uri="antlib:com.googlecode.jslint4java" classpathref="ext.classpath"
  17. resource="com/googlecode/jslint4java/antlib.xml"/>
  18. <target name="init">
  19. <delete dir="${report.path}"/>
  20. <delete file="${report.file}"/>
  21. </target>
  22. <target name="coverage">
  23. <delete dir="${coverage.path}"/>
  24. <exec executable="/home/ueditor/jscoverage/bin/jscoverage">
  25. <arg value="--encoding=UTF-8"/>
  26. <arg value="_src"/>
  27. <arg value="${coverage.path}"/>
  28. </exec>
  29. </target>
  30. <!--<target name="jslint" description="Run the JSLint tool on JS files">-->
  31. <!--<fileset dir="_src" id="jsfiles.raw">-->
  32. <!--<include name="*.js"/>-->
  33. <!--&lt;!&ndash;<exclude name="**/*.min.js" />&ndash;&gt;-->
  34. <!--</fileset>-->
  35. <!--<pathconvert pathsep=" " property="jsfiles.clean" refid="jsfiles.raw" />-->
  36. <!--<exec executable="java" output="build/logs/jslint.xml">-->
  37. <!--<arg line="-jar jslint4java.jar -report xml ${jsfiles.clean}" />-->
  38. <!--</exec>-->
  39. <!--</target>-->
  40. <target name="jslint">
  41. <!-- jslint 任务的配置如下 ,options 是用户自定义规则-->
  42. <jsl:jslint options="undef=true, white=true, eqeq=true,nomen=true,sloppy=true" haltOnFailure="false">
  43. <!--formatter plain, 没有 destfile 则表示输出到控制台 -->
  44. <formatter type="plain"/>
  45. <!-- formatter report 表示输出成 html 格式的 report-->
  46. <formatter type="junit" destfile="_test/tools/br/jslint"/>
  47. <formatter type="report" destfile="_test/tools/br/jslint.html"/>
  48. <!-- 通过指定 fileset 设置要进行检测的 JavaScript 文件集 -->
  49. <fileset dir="_src" includes="**/*.js"/>
  50. </jsl:jslint>
  51. </target>
  52. <!--<target name="jslint">-->
  53. <!--<formatter type="plain" destfile="_test/tools/br/jslint.out"/>-->
  54. <!--<fileset dir="_src" id="jsfiles.raw">-->
  55. <!--<include name="*.js"/>-->
  56. <!--</fileset>-->
  57. <!--</target>-->
  58. <target name="executeui" depends="init,coverage">
  59. <get src="http://${serverip}/${git.project}/_test/tools/br/runall.php?ci=true&amp;cov=true&amp;filter=ui"
  60. dest="/tmp/${git.user}_${git.project}ui.php"/>
  61. </target>
  62. <target name="getreportui" depends="init,coverage,executeui">
  63. <waitfor maxwait="3000" maxwaitunit="second">
  64. <available file="${report.file}"/>
  65. </waitfor>
  66. <waitfor maxwait="10" maxwaitunit="second">
  67. <istrue value="false"/>
  68. </waitfor>
  69. </target>
  70. </project>