dsoumis commented on code in PR #1146:
URL: https://github.com/apache/tomcat/pull/1146#discussion_r4531138124


##########
build.xml:
##########
@@ -2084,9 +2094,25 @@
     <echo message="Test profile: ${test.profile}"/>
   </target>
 
-  <!-- Set default test.name if no profile specified, using ant's immutability 
feature -->
+  <!-- Set default test.name if no profile or a pattern-based profile is in 
use.
+       Skipped for category-based profiles: test.name is set by 
-test-categories
+       after test-compile completes. -->
   <target name="-test-name-default" depends="-test-profile-init">
-    <property name="test.name" value="**/Test*.java"/>
+    <property name="test.name" value="**/Test*.java" 
unless:set="test.category.class"/>
+  </target>
+
+  <!-- Scan compiled test classes for the category recorded by 
-test-profile-init
+       and populate test.name. Runs after test-compile so that the .class files
+       produced by the annotation processor are available to the scanner. -->
+  <target name="-test-categories" depends="test-compile" 
if="test.category.class">
+    <java classname="org.apache.tomcat.categories.CategoryScanner"
+          outputproperty="test.name"

Review Comment:
   Add `logError="true"`. Without it the forked JVM's stderr is merged into 
`test.name`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to