You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

release-tests.xml 9.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <!-- ========================================================================= -->
  2. <!-- Copyright (c) 2005 Contributors. -->
  3. <!-- All rights reserved. -->
  4. <!-- This program and the accompanying materials are made available -->
  5. <!-- under the terms of the Eclipse Public License v1.0 -->
  6. <!-- which accompanies this distribution and is available at -->
  7. <!-- http://www.eclipse.org/legal/epl-v10.html -->
  8. <!-- -->
  9. <!-- Contributors: -->
  10. <!-- Wes Isberg initial implementation -->
  11. <!-- ========================================================================= -->
  12. <project name="release-tests" default="product-tests">
  13. <target name="product-tests" unless="skip.test"
  14. description="run product tests">
  15. <do-vm-targets target="test-build-examples"/>
  16. </target>
  17. <target name="init-postBuild-properties" depends="init-release-properties">
  18. <require-available property="aspectj.jar"
  19. path="${aj.dist.dir}/aspectj-${build.version}.jar"/>
  20. </target>
  21. <target name="init-sources-available" depends="init-release-properties"
  22. unless="sources.available">
  23. <available property="sources.available"
  24. file="${aspectj.modules.dir}/build/build.xml"/>
  25. <fail unless="sources.available" message="checkout first"/>
  26. </target>
  27. <target name="init-aspectj-available" depends="init-release-properties"
  28. unless="aspectj.available">
  29. <available property="aspectj.available"
  30. file="${aj.install.dir}" type="dir"/>
  31. <fail unless="aspectj.available"
  32. message="install first in ${aj.install.dir}"/>
  33. </target>
  34. <target name="init-harness-available" depends="init-release-properties"
  35. unless="harness.available">
  36. <available property="harness.available"
  37. classname="org.aspectj.testing.drivers.Harness"
  38. classpath="${harness.jar}"/>
  39. <fail unless="harness.available"
  40. message="harness not found - first build-testing"/>
  41. </target>
  42. <target name="test-build-examples"
  43. depends="init-postBuild-properties,init-aspectj-available">
  44. <run-example name="bean"/>
  45. <run-example name="intro"/>
  46. <run-example name="intro-clone"/>
  47. <run-example name="intro-compare"/>
  48. <run-example name="intro-hash"/>
  49. <run-example name="telecom"/>
  50. <run-example name="telecom-billing"/>
  51. <run-example name="telecom-timing"/>
  52. <run-example name="tjp"/>
  53. <run-example name="tracing-1"/>
  54. <run-example name="tracing-2"/>
  55. <run-example name="tracing-3"/>
  56. <run-example name="tracing-bc"/>
  57. <run-example name="nonGui"/>
  58. <echo message="TODO: setup and run compiler adapter example"/>
  59. </target>
  60. <target name="do-run-harness" depends="init-postBuild-properties,init-harness-available">
  61. <fail unless="suite.filename" message="define suite.filename"/>
  62. <fail unless="harness.args" message="define harness.args"/>
  63. <fail unless="harness.suffix" message="define harness.suffix"/>
  64. <property name="drho.default.options"
  65. value="-release -logFail -killTemp"/>
  66. <property file="${java.home.file}"/>
  67. <fail unless="build.java.home"
  68. message="failed to read ${build.java.home} from ${java.home.file}"/>
  69. <fail unless="build.java.version"
  70. message="failed to read ${build.java.version} from ${java.home.file}"/>
  71. <property name="harness.output.file"
  72. location="${aj.logs.dir}/test-${suite.filename}${harness.suffix}-${build.java.version}.txt"/>
  73. <echo> do-run-harness ${suite.filename}.xml with options
  74. ${drho.default.options} ${harness.args} to ${harness.output.file}
  75. </echo>
  76. <java fork="true" dir="${aspectj.modules.dir}/tests" jar="${harness.jar}"
  77. jvm="${build.java.command}" maxmemory="250m"
  78. output="${harness.output.file}">
  79. <jvmarg line="${harness.jvmline}"/>
  80. <arg value="${suite.filename}.xml"/>
  81. <arg line="${drho.default.options} ${harness.args}"/>
  82. </java>
  83. </target>
  84. <macrodef name="run-example">
  85. <attribute name="name"/>
  86. <sequential>
  87. <antcall target="init"/>
  88. <antcall target="do-run-ant">
  89. <param name="ant.dir"
  90. location="${aj.install.dir}/doc/examples"/>
  91. <param name="run.ant.file" value="build.xml"/>
  92. <param name="ant.target" value="@{name}"/>
  93. <param name="ant.output"
  94. location="${aj.logs.dir}/test-example-@{name}"/>
  95. <param name="ant.properties" value=""/>
  96. <!-- XXX getting OOMemory - permit and investigate -->
  97. <param name="failonerror" value="false"/>
  98. </antcall>
  99. </sequential>
  100. </macrodef>
  101. <target name="test-ajc-aspectj"
  102. depends="init-postBuild-properties,init-aspectj-available,init-sources-available">
  103. <antcall target="do-run-ant">
  104. <param name="ant.dir"
  105. location="${aspectj.modules.dir}/tests/product/build-aspectj"/>
  106. <param name="run.ant.file" value="build.xml"/>
  107. <param name="ant.target" value=""/>
  108. <param name="ant.output"
  109. location="${aj.logs.dir}/test-ajc-aspectj"/>
  110. </antcall>
  111. <delete quiet="on" dir="${aspectj.modules.dir}/tests/product/build-aspectj/output"/>
  112. </target>
  113. <!-- ==== source tests ==== -->
  114. <target name="test-sources">
  115. <do-vm-targets target="do-test-sources-sequence"/>
  116. </target>
  117. <target name="do-test-sources-sequence">
  118. <antcall target="harness-tests"/>
  119. <antcall target="test-junit-modules"/>
  120. </target>
  121. <target name="test-doc-links"
  122. depends="init-aspectj-available,init-harness-available"
  123. description="run link check against distribution">
  124. <setup-vm vm="13"/>
  125. <property file="${java.home.file}"/>
  126. <fail unless="build.java.home"
  127. message="failed to read ${build.java.home} from ${java.home.file}"/>
  128. <property name="doclink.output.file"
  129. location="${aj.logs.dir}/test-doc-links"/>
  130. <property name="doclink.start.file"
  131. location="${aj.install.dir}/README-AspectJ.html"/>
  132. <echo>
  133. test-doc-links ${doclink.start.file}
  134. to ${doclink.output.file}-[out|messages].txt
  135. WARNING: verify manually if result code is not 0. Known failures:
  136. - google link nets 403, but works in browser
  137. - progguide/printable.html has harmless empty link to d0e26 (ajc-ref?)
  138. </echo>
  139. <java
  140. classname="org.aspectj.testing.util.LinkCheck"
  141. fork="true"
  142. dir="${aj.install.dir}"
  143. classpath="${harness.jar}"
  144. jvm="${build.java.command}"
  145. output="${doclink.output.file}-out.txt">
  146. <arg value="${doclink.start.file}"/>
  147. <arg value="-printInfo"/>
  148. <arg value="-log"/>
  149. <arg value="${doclink.output.file}-messages.txt"/>
  150. <sysproperty key="http.proxyHost" value="${proxy.host}" />
  151. <sysproperty key="http.proxyPort" value="${proxy.port}" />
  152. </java>
  153. </target>
  154. <target name="test-examples-11" depends="init-harness-available"
  155. description="run examples under JDK 1.1">
  156. <property name="j11.home"
  157. location="${java11.home}"/>
  158. <property name="java11.command"
  159. location="${java11.home}/bin/java"/>
  160. <property name="java11.classes.zip"
  161. location="${java11.home}/lib/classes.zip"/>
  162. <antcall target="do-run-harness">
  163. <param name="suite.filename" value="ajcTestsExamples"/>
  164. <param name="harness.args" value="-1.1"/>
  165. <param name="harness.suffix" value="-run11"/>
  166. <param name="harness.jvmline"
  167. value="-Djavarun.fork=true -Djavarun.java=${java11.command} -Djavarun.java.home=${j11.home} -Djavarun.bootclasspath=${java11.classes.zip}"/>
  168. </antcall>
  169. </target>
  170. <target name="build-testing" depends="init-release-properties"
  171. unless="build-testing.done"
  172. description="build aspectj tests using Java max.vm=${max.vm}">
  173. <antcall target="clean-jars"/>
  174. <build-aspectj vm="${max.vm}" target="build-testing-jars"/>
  175. <property name="build-testing.done" value="true"/>
  176. </target>
  177. <target name="harness-tests" depends="build-testing">
  178. <!-- we could use harness variants, e.g., "-emacssym-",
  179. but separating runs puts each variant in a different
  180. output file, which makes them easier to analyze.
  181. -->
  182. <antcall target="init-harness-available"/>
  183. <antcall target="do-run-harness">
  184. <param name="suite.filename" value="ajcHarnessTests"/>
  185. <param name="harness.args" value="-ajctestSkipKeywords=expect-fail"/>
  186. <param name="harness.suffix" value="-pass"/>
  187. </antcall>
  188. <antcall target="do-run-harness">
  189. <param name="suite.filename" value="ajcTests"/>
  190. <param name="harness.args" value=""/>
  191. <param name="harness.suffix" value=""/>
  192. </antcall>
  193. <!--
  194. skip variants for now
  195. <antcall target="do-run-harness">
  196. <param name="suite.filename" value="ajcTests"/>
  197. <param name="harness.args" value="-emacssym"/>
  198. <param name="harness.suffix" value="-emacssym"/>
  199. </antcall>
  200. <antcall target="do-run-harness">
  201. <param name="suite.filename" value="ajcTests"/>
  202. <param name="harness.args" value="-ajctaskCompiler -ajctestSkipKeywords=knownLimitation-ajctaskCompiler"/>
  203. <param name="harness.suffix" value="-ajctaskCompiler"/>
  204. </antcall>
  205. <antcall target="do-run-harness">
  206. <param name="suite.filename" value="ajcTestsExamples"/>
  207. <param name="harness.args" value=""/>
  208. <param name="harness.suffix" value=""/>
  209. </antcall>
  210. <antcall target="do-run-harness">
  211. <param name="suite.filename" value="ajcTestsExamples"/>
  212. <param name="harness.args" value="-ajctaskCompiler"/>
  213. <param name="harness.suffix" value="-ajctaskCompiler"/>
  214. </antcall>
  215. -->
  216. <!-- AJDE compiler hangs when done - unclose swing thread?
  217. <antcall target="do-run-harness">
  218. <param name="suite.filename" value="ajcTests"/>
  219. <param name="harness.args" value="-ajdeCompiler -ajctestSkipKeywords=knownLimitations-ajdeCompiler"/>
  220. <param name="harness.suffix" value="-ajdeCompiler"/>
  221. </antcall>
  222. -->
  223. </target>
  224. </project>