Bug 558330 - Ant tests do not run in Gerrit
Summary: Ant tests do not run in Gerrit
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 4.14   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-15 04:19 EST by Andrey Loskutov CLA
Modified: 2019-12-19 17:01 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2019-12-15 04:19:40 EST
As seen in bug 558324, changes in ant code are green on Gerrit but fail in official build. If I see it right, there are no ant tests executed on Gerrit builds at all.

We should enable that.
Comment 1 Eclipse Genie CLA 2019-12-15 04:39:04 EST
New Gerrit change created: https://git.eclipse.org/r/154543
Comment 2 Andrey Loskutov CLA 2019-12-15 10:21:12 EST
So far I've managed that maven tries to start ant core tests, BUT I'm stopped by maven not finding test classes because of the special test bundle "layout".

The bundle is supposed to produce two jars, and this makes maven unhappy. If I disable second jar generation, maven can find and start tests, but of course they require classes from the second library.
https://ci.eclipse.org/platform/job/eclipse.platform-Gerrit/392/

Any hints how to teach maven where are the test classes if they are compiled NOT into target/classes?

Our ant output (confuses maven test, can't find classes):
https://ci.eclipse.org/platform/job/eclipse.platform-Gerrit/388/console

11:55:40 [INFO] --- tycho-compiler-plugin:1.5.1:compile (default-compile) @ org.eclipse.ant.tests.core ---
11:55:40 [INFO] Compiling 15 source files to /home/jenkins/agent/workspace/eclipse.platform-Gerrit/ant/org.eclipse.ant.tests.core/target/anttestscore.jar-classes
11:55:40 [INFO] Compiling 6 source files to /home/jenkins/agent/workspace/eclipse.platform-Gerrit/ant/org.eclipse.ant.tests.core/target/lib/antTestsSupport.jar-classes

JDT debug output (maven test is found) 
https://ci.eclipse.org/jdt/job/eclipse.jdt.debug-Gerrit/1015/console

15:40:25 [INFO] --- tycho-compiler-plugin:1.5.1:compile (default-compile) @ org.eclipse.jdt.debug.tests ---
15:40:25 [INFO] Compiling 323 source files to /home/jenkins/agent/workspace/eclipse.jdt.debug-Gerrit/org.eclipse.jdt.debug.tests/target/classes

Right now I'm playing with the idea of compiling everything in one library so maven is happy, but I think there should be a better solution.
Comment 3 Alexander Kurtakov CLA 2019-12-19 11:50:54 EST
So is this issue related to Java 11 move or it's a bigger one and happens even with Java 8?
Comment 4 Andrey Loskutov CLA 2019-12-19 12:14:46 EST
(In reply to Alexander Kurtakov from comment #3)
> So is this issue related to Java 11 move or it's a bigger one and happens
> even with Java 8?

Not Java 11 related, they seem never be enabled.
Comment 5 Eclipse Genie CLA 2019-12-19 14:04:20 EST
New Gerrit change created: https://git.eclipse.org/r/154812
Comment 6 Eclipse Genie CLA 2019-12-19 14:42:17 EST
New Gerrit change created: https://git.eclipse.org/r/154816
Comment 9 Alexander Kurtakov CLA 2019-12-19 15:29:03 EST
So ant.tests.ui happen to be easy one but core doesn't look the same. Still better some of the tests than none.
Comment 10 Eclipse Genie CLA 2019-12-19 15:30:09 EST
New Gerrit change created: https://git.eclipse.org/r/154838
Comment 11 Andrey Loskutov CLA 2019-12-19 15:43:25 EST
(In reply to Alexander Kurtakov from comment #9)
> So ant.tests.ui happen to be easy one but core doesn't look the same.

Yes, the support classes (that built into extra jar) can't be found now. Bit at least you've managed to tell maven where the test classes are.

> Still
> better some of the tests than none.

Sure, thanks!
Comment 12 Eclipse Genie CLA 2019-12-19 16:33:45 EST
New Gerrit change created: https://git.eclipse.org/r/154843