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.

incremental-tests.xml 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <suite>
  2. <!-- Incremental compilation Tests -->
  3. <ajc-test dir="incremental/initialTests/classAdded"
  4. title="expect class added in initial incremental tests"
  5. keywords="incremental-test" >
  6. <compile staging="true"
  7. options="-incremental"
  8. sourceroots="."/>
  9. <run class="main.Main"/>
  10. <inc-compile tag="20" >
  11. <dir-changes added="main.Target"/>
  12. </inc-compile>
  13. <run class="main.Main" skipTester="true"/>
  14. </ajc-test>
  15. <ajc-test dir="incremental/initialTests/classRemoved"
  16. title="expect class removed in initial incremental tests"
  17. keywords="incremental-test" >
  18. <compile staging="true"
  19. options="-incremental"
  20. sourceroots="."/>
  21. <run class="main.Main"/>
  22. <inc-compile tag="20">
  23. <dir-changes removed="main.Target"/>
  24. </inc-compile>
  25. <run class="main.Main"/>
  26. </ajc-test>
  27. <ajc-test dir="incremental/initialTests/classUpdated"
  28. title="expect class updated in initial incremental tests"
  29. keywords="incremental-test" >
  30. <compile staging="true"
  31. options="-incremental"
  32. sourceroots="."/>
  33. <run class="main.Main"/>
  34. <inc-compile tag="20">
  35. <dir-changes updated="main.Main"/>
  36. </inc-compile>
  37. <run class="main.Main"/>
  38. </ajc-test>
  39. <ajc-test dir="incremental/initialTests/sourceAdded"
  40. title="add file with class"
  41. comment="only expecting pickup if sourceroots"
  42. keywords="incremental-test" >
  43. <compile staging="true"
  44. options="-incremental"
  45. sourceroots="."/>
  46. <run class="main.Main"/>
  47. <inc-compile tag="20">
  48. <dir-changes added="main.Target"/>
  49. </inc-compile>
  50. <inc-compile tag="30">
  51. <dir-changes updated="main.Main"/>
  52. </inc-compile>
  53. <run class="main.Main"/>
  54. </ajc-test>
  55. <ajc-test dir="incremental/initialTests/sourceDeleted"
  56. title="delete source file before incremental compile"
  57. comment="build config should permit file deletions for incremental (sourceroots)"
  58. keywords="incremental-test" >
  59. <compile staging="true"
  60. options="-incremental"
  61. sourceroots="."/>
  62. <run class="delete.Main"/>
  63. <inc-compile tag="20">
  64. <dir-changes removed="delete.DeleteMe"/>
  65. <message kind="error" line="6" file="delete/Target.java"/>
  66. </inc-compile>
  67. <inc-compile tag="30"/>
  68. <run class="delete.Main"/>
  69. </ajc-test>
  70. <!-- this test cannot pass with the new AjAttribute.MethodDeclarationLineNumberAttribute
  71. <ajc-test dir="incremental/initialTests/expClasses"
  72. title="expected class tree" >
  73. <compile files="Main.java">
  74. <dir-changes expDir="expected"/>
  75. </compile>
  76. <run class="Main"/>
  77. </ajc-test>
  78. -->
  79. <ajc-test dir="incremental/initialTests/defaultPackage"
  80. title="do everything in default package (sourceroots)"
  81. keywords="incremental-test" >
  82. <compile staging="true"
  83. options="-incremental"
  84. sourceroots="."/>
  85. <run class="Main"/>
  86. <inc-compile tag="20">
  87. <dir-changes added="Target"/>
  88. </inc-compile>
  89. <run class="Target" skipTester="true"/>
  90. <inc-compile tag="30">
  91. <dir-changes updated="Main"/>
  92. </inc-compile>
  93. <run class="Main" skipTester="true"/>
  94. <inc-compile tag="40">
  95. <message kind="error" line="6" file="Main.java"/>
  96. </inc-compile>
  97. <inc-compile tag="50"/>
  98. <run class="Main"/>
  99. </ajc-test>
  100. <ajc-test dir="incremental/defaultPackage"
  101. keywords="incremental-test"
  102. title="change sources in default package">
  103. <compile
  104. staging="true"
  105. options="-incremental"
  106. sourceroots="src"/>
  107. <run class="Main"/>
  108. <inc-compile tag="20"/>
  109. <run class="Main"/>
  110. </ajc-test>
  111. <ajc-test dir="incremental/interPackage"
  112. keywords="incremental-test"
  113. title="change source">
  114. <compile
  115. staging="true"
  116. options="-incremental"
  117. sourceroots="src"/>
  118. <run class="app.Main"/>
  119. <inc-compile tag="20"/>
  120. <run class="app.Main"/>
  121. </ajc-test>
  122. <ajc-test dir="incremental/stringliteral"
  123. keywords="incremental-test"
  124. title="incrementally change only string literal, still expect advice">
  125. <compile staging="true" options="-incremental"
  126. sourceroots="src"/>
  127. <run class="packageOne.Main"
  128. options="in packageOne.Main.main(..),
  129. before main packageOne.Main"/>
  130. <inc-compile tag="20">
  131. <dir-changes updated="packageOne.Main"/>
  132. </inc-compile>
  133. <run class="packageOne.Main"
  134. options="in longer packageOne.Main.main(..),
  135. before main packageOne.Main"/>
  136. </ajc-test>
  137. <ajc-test dir="incremental/initialTests/aspectSourceAdded"
  138. title="add aspect source file and check world is rewoven"
  139. keywords="incremental-test" >
  140. <compile staging="true"
  141. options="-incremental"
  142. sourceroots="."/>
  143. <inc-compile tag="20">
  144. <dir-changes added="Detour"/>
  145. </inc-compile>
  146. <run class="Main"/>
  147. </ajc-test>
  148. <ajc-test dir="incremental/initialTests/classWAroundClosureRemoved"
  149. title="make sure additional classes generated during weave are deleted with src class file"
  150. keywords="incremental-test">
  151. <compile staging="true"
  152. options="-incremental"
  153. sourceroots="."/>
  154. <inc-compile tag="20" >
  155. <dir-changes removed="AdviceOnIntroduced$AjcClosure1"/>
  156. </inc-compile>
  157. </ajc-test>
  158. <ajc-test dir="incremental/full-rebuild"
  159. pr="59895"
  160. title="incremental with aspect-driven full rebuild">
  161. <compile
  162. staging="true"
  163. sourceroots="src"
  164. options="-incremental">
  165. <message kind="error" line="3" file="Aspect.java"/>
  166. </compile>
  167. <inc-compile tag="20">
  168. <message kind="warning" line="3" file="Main.java"/>
  169. </inc-compile>
  170. <run class="Main"/>
  171. </ajc-test>
  172. </suite>