Bug 537108 - Enable all PDE tests to run on Gerrit
Summary: Enable all PDE tests to run on Gerrit
Status: NEW
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.9   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-17 08:09 EDT by Andrey Loskutov CLA
Modified: 2019-01-18 05:32 EST (History)
3 users (show)

See Also:


Attachments
Console output from a gerrit job, containing failures to examine. Failures are marked with <<< Failure. (1.70 MB, text/plain)
2019-01-03 10:55 EST, Simeon Andreev CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2018-07-17 08:09:37 EDT
As seen in bug 453954, we miss test coverage on Gerrit, because not all PDE UI tests are executed, only the minimal working subset (see bug 488036 for details).

We should try to enable more (or all) PDE tests for Gerrit.
Comment 1 Eclipse Genie CLA 2018-07-17 08:12:27 EDT
New Gerrit change created: https://git.eclipse.org/r/126168
Comment 2 Simeon Andreev CLA 2019-01-03 10:55:53 EST
Created attachment 277056 [details]
Console output from a gerrit job, containing failures to examine. Failures are marked with <<< Failure.
Comment 3 Eclipse Genie CLA 2019-01-04 05:02:35 EST
New Gerrit change created: https://git.eclipse.org/r/134644
Comment 4 Simeon Andreev CLA 2019-01-04 05:49:41 EST
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=488036#c20.

If we want to run all tests, we'll at least need to add some plug-ins to the product that runs the tests. If we don't want this, I don't think there is much to do here. Other than specifically excluding the 44 failing tests, so that all other tests run. The efforts for bug 488036 I've checked are fine-grained, but maybe there are tests that can run but are not running.
Comment 5 Simeon Andreev CLA 2019-01-04 10:41:47 EST
From what I see in the extra infos I added to one of the fails, the running Eclipse at least some of the plug-ins that are not found during that fail.

The target installation however, does not. I'm trying to find out how to tell Tycho/Maven to add more plug-ins to that target. I've had no luck in finding out where this is specified... Current plug-ins seem to be:

/jobs/genie.pde/eclipse.pde.ui-Gerrit/workspace/ui/org.eclipse.pde.ui.tests/target/work/plugins/org.apache.ant_1.10.5.v20180808-0324
/jobs/genie.pde/eclipse.pde.ui-Gerrit/workspace/ui/org.eclipse.pde.ui.tests/target/work/plugins/org.eclipse.jdt.debug_3.12.100.v20190102-0820
/jobs/genie.pde/eclipse.pde.ui-Gerrit/workspace/ui/org.eclipse.pde.ui.tests/target/work/plugins/org.eclipse.pde.build_3.10.200.v20181008-0641
Comment 6 Simeon Andreev CLA 2019-01-18 05:32:52 EST
Looks like Tycho will create a test application that has its plug-ins in some .p2 directory. The target test installation is actually empty, with the exception of some "expanded" plug-ins (not exactly sure why those are "expanded", i.e. copied):

org.apache.ant
org.eclipse.jdt.debug
org.eclipse.pde.build

I believe it will be necessary to put all plug-ins and features at the test installation's location:

.../org.eclipse.pde.ui.tests/target/work/plugins/
.../org.eclipse.pde.ui.tests/target/work/features/

I've tried to ensure more copies with <explodedBundles> tag in the pom.xml of the test project, however this doesn't work for e.g. features (also required by the tests) and most source plug-ins. I could get 14 of the 44 excluded tests to pass (on my machine) with this change. This approach also seems more like a workaround than an actual solution.

Mickael suggested using the following:

> try the tycho-surefire-plugin option "p2installed"

With this I'm not sure how to configure the test application itself; it complains about missing bundles which are physically present at plugins/ location:

org.osgi.framework.BundleException: Could not resolve module: org.eclipse.core.runtime [3]
  Unresolved requirement: Require-Bundle: javax.inject; bundle-version="1.0.0"; visibility:="reexport"; resolution:="optional"
  Unresolved requirement: Require-Bundle: org.eclipse.core.jobs; bundle-version="[3.10.0,4.0.0)"; visibility:="reexport"

I'm not entirely sure the effort here is worth running an extra 44 tests (out of 500+ tests), that run on every platform build anyway. The tests can also be executed from the IDE.