Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OSGi test classpath support #1619

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

laeubi
Copy link
Contributor

@laeubi laeubi commented Feb 16, 2025

Similar to what we have for OSGi annotations, PDE should have OSGi Testing Support as it is a great library for testing OSGi applications. The most hindering thing in this regard is that it is rater complex to setup until one can make the first steps.

This now adds a new classpath contributor that detects if a PDE project is already using JUNIT classpath container and then adds OSGi test dependencies automatically as test dependencies if they are part of the target platform or alternatively from the running platform.

See

Requires:

Similar to what we have for OSGi annotations, PDE should have OSGi
Testing Support as it is a great library for testing OSGi applications.
The most hindering thing in this regard is that it is rater complex to
setup until one can make the first steps.

This now adds a new classpath contributor that detects if a PDE project
is already using JUNIT classpath container and then adds OSGi test
dependencies automatically as test dependencies if they are part of the
target platform or alternatively from the running platform.

See eclipse-pde#877
@@ -28,6 +28,13 @@
<import plugin="org.bndtools.templates.template"/>
<import plugin="biz.aQute.repository"/>
<import plugin="bndtools.jareditor"/>
<import plugin="org.osgi.test.common"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably become a dedicated feature for easier inclusion in other target platforms and to have an opt-in.

Copy link

Test Results

 42 files   -    243   42 suites   - 243   13s ⏱️ - 48m 15s
 50 tests  -  3 558   50 ✅  -  3 482  0 💤  -  76  0 ❌ ±0 
216 runs   - 10 800  216 ✅  - 10 569  0 💤  - 231  0 ❌ ±0 

Results for commit b54cb7b. ± Comparison against base commit 975f72b.

This pull request removes 3558 tests.
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_importPackage
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_includeFragments
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_includeFragmentsProvidingPackages
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_includeNonTestFragments
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_includeOptional
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_requireBundle
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_requireBundle2
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_requireDifferentVersions
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.DependencyManagerTest ‑ testFindRequirementsClosure_requiredCapability
AllPDETests org.eclipse.pde.core.tests.internal.AllPDECoreTests org.eclipse.pde.core.tests.internal.WorkspaceModelManagerTest ‑ testBundleRootHandling_bundleRootChangedFromDefaultToOthersAndReverse
…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant