PageRenderTime 47ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/bundles/plugins-trunk/XML/test/build.xml

#
XML | 139 lines | 81 code | 21 blank | 37 comment | 0 complexity | 4fb230ab0e9c59a72633dc217fb8d49b MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. <project name="xml_plugin_tests" default="test" basedir=".">
  2. <property name="junit.usefile" value="on"/>
  3. <!-- general properties for plugins from the plugins directory, in
  4. partcular, need the install.dir set to know where to find the plugin
  5. jar files. -->
  6. <property file="build.properties"/>
  7. <property file="../../build.properties"/>
  8. <property name="build.properties" location="${test.framework.dir}/build.properties"/>
  9. <!-- location of the test framework, this should be set in the build.properties
  10. file loaded above. -->
  11. <property name="test.framework.home" location="/home/danson/src/jEditTestFramework"/>
  12. <!-- test source and classes -->
  13. <property name="project.test.src.dir" location="${basedir}"/>
  14. <property name="project.test.classes.dir" location="${basedir}/classes"/>
  15. <mkdir dir="${project.test.classes.dir}"/>
  16. <property name="project.src.dir" location="${basedir}/.."/>
  17. <!-- marker property to indicate to the test framework that plugin jars
  18. need to be copied -->
  19. <property name="copyPluginJars" value=""/>
  20. <property name="project.toinstrument.jar" value="XML.jar"/>
  21. <path id="project.src.dir" path=".."/>
  22. <!-- full list of all jar files necessary to let jEdit load and run
  23. the plugin. All of these files will be copied to the jedit_settings/jar
  24. directory. -->
  25. <filelist id="plugin.jars" dir="${install.dir}">
  26. <!-- XML libraries -->
  27. <file name="XML.jar"/>
  28. <file name="jing.jar"/>
  29. <file name="relaxngDatatype.jar"/>
  30. <file name="trang.jar"/>
  31. <!-- XercesPlugin -->
  32. <file name="XercesPlugin.jar"/>
  33. <file name="xml-apis.jar"/>
  34. <file name="xercesImpl.jar"/>
  35. <file name="resolver.jar"/>
  36. <!-- Beauty -->
  37. <file name="Beauty.jar"/>
  38. <!-- ErrorList -->
  39. <file name="ErrorList.jar"/>
  40. <!-- Sidekick -->
  41. <file name="SideKick.jar"/>
  42. <!-- Common Controls -->
  43. <file name="CommonControls.jar"/>
  44. <file name="kappalayout.jar"/>
  45. <!-- EclipseIcons -->
  46. <file name="EclipseIcons.jar"/>
  47. <!-- Hyperlinks -->
  48. <file name="Hyperlinks.jar"/>
  49. </filelist>
  50. <fileset id="project.resources" dir="../test_data" defaultexcludes="yes">
  51. <include name="BAH"/>
  52. </fileset>
  53. <!-- include everything needed to let jEdit load the plugin and run the
  54. unit tests. This should include all the jars listed in the plugin.jars
  55. file list defined above. -->
  56. <path id="project.class.path">
  57. <pathelement path="${project.test.classes.dir}"/>
  58. <path>
  59. <filelist refid="plugin.jars"/>
  60. </path>
  61. </path>
  62. <!-- include the classes for which you would like to see the coverage report -->
  63. <property name="emma.filter" value="*"/>
  64. <!-- these are the actual test files to compile. This is included so it
  65. is easy to fine tune which tests are compiled and ran. -->
  66. <selector id="projectFiles">
  67. <filename name="**/*.java" />
  68. </selector>
  69. <!-- this selector holds all test cases. This is optional. -->
  70. <selector id="testcases.all">
  71. <or>
  72. <filename name="**/*Test.java"/>
  73. </or>
  74. </selector>
  75. <!-- this selector holds just one test. This is optional. -->
  76. <selector id="testcases.current">
  77. <filename name="sidekick/html/HtmlParserTest.java"/>
  78. </selector>
  79. <!-- this selector controls which tests to run, set the refid to either
  80. testcases.current to run just one test or testcases.all to run all tests,
  81. or some other selector. This is NOT optional, if this selector is not
  82. defined, no tests will run. -->
  83. <selector id="junit.testcases">
  84. <or>
  85. <selector refid="testcases.current"/>
  86. </or>
  87. </selector>
  88. <!-- set any system properties, this is a way to let tests know things
  89. without hardcoding values directly in the tests. -->
  90. <property name="test_data" location="../test_data"/>
  91. <propertyset id="project.test.sysproperties">
  92. <propertyref name="test_data"/>
  93. </propertyset>
  94. <!-- actually call the test framework to run the tests. inheritRefs must
  95. be true so that all of the things defined above are known to the test
  96. framework. -->
  97. <target name="test">
  98. <ant antfile="${test.framework.home}/build.xml" target="-test" inheritRefs="true">
  99. <reference refid="project.test.sysproperties"/>
  100. </ant>
  101. </target>
  102. <target name="test-all" description="run all tests">
  103. <selector id="junit.testcases">
  104. <or>
  105. <selector refid="testcases.all"/>
  106. </or>
  107. </selector>
  108. <ant antfile="${test.framework.home}/build.xml" target="-test" inheritRefs="true">
  109. <reference refid="project.test.sysproperties"/>
  110. </ant>
  111. </target>
  112. <!-- shortcut to only compile the tests (don't waste time instrumenting) -->
  113. <target name="compile">
  114. <ant antfile="${test.framework.home}/build.xml" target="-compileTests" inheritRefs="true">
  115. <reference refid="project.test.sysproperties"/>
  116. </ant>
  117. </target>
  118. </project>