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

Build o.e.equinox.compendium.tests and o.e.equinox.region.tests #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ Bundle-SymbolicName: org.eclipse.equinox.compendium.tests
Bundle-Version: 1.2.400.qualifier
Bundle-Activator: org.eclipse.equinox.compendium.tests.Activator
Require-Bundle: org.eclipse.core.runtime,
org.junit;bundle-version="4.12.0"
org.junit;bundle-version="4.12.0",
org.eclipse.equinox.coordinator,
org.eclipse.equinox.useradmin,
org.eclipse.equinox.event,
org.eclipse.equinox.metatype,
org.apache.felix.scr
Import-Package: org.eclipse.equinox.metatype;version="1.2.0",
org.eclipse.equinox.metatype.impl;version="1.2.0",
org.eclipse.osgi.tests.bundles,
Expand Down
3 changes: 0 additions & 3 deletions bundles/org.eclipse.equinox.compendium.tests/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,3 @@ jars.compile.order = bundle_tests/metatype/metatype.tb1.jar,\
bundle_tests/metatype/metatype.tb10.jar,\
bundle_tests/metatype/metatype.extendable.tb1.jar,\
bundle_tests/metatype/metatype.getMinMax.tb1.jar

# Maven properties, see https://github.com/eclipse/tycho/wiki/Tycho-Pomless
pom.model.property.skipTests = true
Original file line number Diff line number Diff line change
Expand Up @@ -13,79 +13,30 @@
*******************************************************************************/
package org.eclipse.equinox.compendium.tests;

import org.eclipse.core.runtime.Platform;
import org.osgi.framework.*;
import org.osgi.service.packageadmin.PackageAdmin;
import org.osgi.util.tracker.ServiceTracker;

/**
* The activator class controls the plug-in life cycle
*/
@SuppressWarnings("deprecation") // PackageAdmin
public class Activator implements BundleActivator {
public static String BUNDLE_COORDINATOR = "org.eclipse.equinox.coordinator"; //$NON-NLS-1$
public static String BUNDLE_EVENT = "org.eclipse.equinox.event"; //$NON-NLS-1$
public static String BUNDLE_METATYPE = "org.eclipse.equinox.metatype"; //$NON-NLS-1$
public static String BUNDLE_USERADMIN = "org.eclipse.equinox.useradmin"; //$NON-NLS-1$

private static Activator plugin;
private static BundleContext context;

private ServiceTracker packageAdminTracker;

/*
* (non-Javadoc)
*
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext bc) throws Exception {
plugin = this;
packageAdminTracker = new ServiceTracker(bc, PackageAdmin.class.getName(), null);
packageAdminTracker.open();
Activator.context = bc;
}

/*
* (non-Javadoc)
*
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext bc) throws Exception {
if (packageAdminTracker != null) {
packageAdminTracker.close();
packageAdminTracker = null;
}
plugin = null;
FrameworkUtil.getBundle(org.apache.felix.scr.info.ScrInfo.class).start();
}

private static Activator getDefault() {
return plugin;
public void stop(BundleContext bc) throws Exception { // no-op
}

public static synchronized BundleContext getBundleContext() {
return context;
public static BundleContext getBundleContext() {
return FrameworkUtil.getBundle(Activator.class).getBundleContext();
}

public static synchronized Bundle getBundle(String symbolicName) {
PackageAdmin packageAdmin = Activator.getDefault().getPackageAdmin();
if (packageAdmin == null)
return null;

Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
if (bundles == null)
return null;
for (Bundle bundle : bundles) {
if ((bundle.getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
return bundle;
}
}
return null;
}

private PackageAdmin getPackageAdmin() {
if (packageAdminTracker == null) {
return null;
}
return (PackageAdmin) packageAdminTracker.getService();
public static Bundle getBundle(String symbolicName) {
return Platform.getBundle(symbolicName);
}

}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Equinox Region Tests
Bundle-SymbolicName: org.eclipse.equinox.region.tests
Bundle-Version: 1.6.200.qualifier
Bundle-Version: 1.6.300.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-17
Import-Package: junit.framework;version="4.8.1",
org.aspectj.internal.lang.annotation;version="[1.6.3,2.0.0)";resolution:=optional,
org.aspectj.lang;version="[1.6.3,2.0.0)";resolution:=optional,
org.aspectj.lang.annotation;version="[1.6.3,2.0.0)";resolution:=optional,
org.aspectj.lang.reflect;version="[1.6.3,2.0.0)";resolution:=optional,
org.aspectj.runtime.internal;version="[1.6.3,2.0.0)";resolution:=optional,
org.aspectj.runtime.reflect;version="[1.6.3,2.0.0)";resolution:=optional,
org.eclipse.core.runtime;version="3.7.0",
org.eclipse.core.tests.harness,
org.eclipse.equinox.region;version="1.1.0",
Expand Down
2 changes: 2 additions & 0 deletions bundles/org.eclipse.equinox.region.tests/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ jars.compile.order = bundle_tests/PackageProvider1.jar,\

src.includes = about.html

# Maven properties, see https://github.com/eclipse/tycho/wiki/Tycho-Pomless
pom.model.property.testClass = org.eclipse.equinox.region.tests.AllTests
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
import java.util.Iterator;
import org.eclipse.equinox.region.*;
import org.eclipse.equinox.region.RegionDigraph.FilteredRegion;
import org.junit.Before;
import org.junit.Test;
import org.junit.*;
import org.osgi.framework.*;

@Ignore
public class BundleIdBasedRegionTests {

private static final String OTHER_REGION_NAME = "other";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.junit.*;
import org.osgi.framework.*;

@Ignore
public class StandardRegionDigraphPeristenceTests {

private RegionDigraph digraph;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
import org.eclipse.equinox.region.RegionDigraph.FilteredRegion;
import org.eclipse.virgo.teststubs.osgi.framework.StubBundle;
import org.eclipse.virgo.teststubs.osgi.framework.StubBundleContext;
import org.junit.Before;
import org.junit.Test;
import org.junit.*;
import org.osgi.framework.*;

@Ignore
public class StandardRegionDigraphTests {

private RegionDigraph digraph;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
import org.eclipse.equinox.region.RegionFilter;
import org.eclipse.equinox.region.RegionFilterBuilder;
import org.eclipse.virgo.teststubs.osgi.framework.*;
import org.junit.Before;
import org.junit.Test;
import org.junit.*;
import org.osgi.framework.*;
import org.osgi.framework.wiring.BundleCapability;
import org.osgi.framework.wiring.BundleRevision;

@Ignore
public class StandardRegionFilterTests {

private static final String BUNDLE_SYMBOLIC_NAME = "A";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.osgi.framework.*;
import org.osgi.framework.hooks.bundle.CollisionHook;

@Ignore
public class RegionBundleCollisionHookTests {

private static final String BUNDLE_X = "X";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.osgi.framework.*;
import org.osgi.framework.hooks.bundle.EventHook;

@Ignore
public class RegionBundleEventHookTests {

private static final String BUNDLE_X = "X";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.osgi.framework.*;
import org.osgi.framework.hooks.bundle.FindHook;

@Ignore
public class RegionBundleFindHookTests {

private static final String BUNDLE_X = "X";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.osgi.resource.Capability;
import org.osgi.resource.Requirement;

@Ignore
public class RegionResolverHookTests {

private static final String PACKAGE_A = "package.a";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
/**
* This testcase was based on {@link RegionBundleFindHookTests}.
*/
@Ignore
@SuppressWarnings("deprecation") // EventHook, RegionFilter.VISIBLE_SERVICE_NAMESPACE
public class RegionServiceEventHookTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
/**
* This testcase was based on {@link RegionBundleFindHookTests}.
*/
@Ignore
@SuppressWarnings("deprecation") // RegionFilter.VISIBLE_SERVICE_NAMESPACE
public class RegionServiceFindHookTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
import javax.management.*;
import org.eclipse.equinox.region.*;
import org.eclipse.equinox.region.RegionDigraph.FilteredRegion;
import org.junit.Rule;
import org.junit.Test;
import org.junit.*;
import org.junit.rules.TestName;
import org.osgi.framework.*;
import org.osgi.framework.hooks.bundle.CollisionHook;
Expand All @@ -40,6 +39,7 @@
import org.osgi.framework.wiring.*;
import org.osgi.util.tracker.ServiceTracker;

@Ignore
@SuppressWarnings("deprecation") // RegionFilter.VISIBLE_SERVICE_NAMESPACE
public class RegionSystemTests extends AbstractRegionSystemTest {

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@
<module>bundles/org.eclipse.equinox.bidi.tests</module>
<module>bundles/org.eclipse.equinox.cm.test</module>
<module>bundles/org.eclipse.equinox.common.tests</module>

<module>bundles/org.eclipse.equinox.compendium.tests</module>

<module>bundles/org.eclipse.equinox.ds.tests</module>
<module>bundles/org.eclipse.equinox.preferences.tests</module>
<!-- removed until the dependency on aspectj is removed. see bug 470000
<module>bundles/org.eclipse.equinox.region.tests</module>
-->

<module>bundles/org.eclipse.equinox.security.tests</module>
<module>bundles/org.eclipse.equinox.app</module>
<module>bundles/org.eclipse.equinox.preferences</module>
Expand Down
Loading