Skip to content

Commit

Permalink
Build o.e.equinox.compendium.tests and o.e.equinox.region.tests
Browse files Browse the repository at this point in the history
Disable currently failing RegionTests.
  • Loading branch information
HannesWell committed Jun 22, 2023
1 parent 2114e74 commit a146913
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 86 deletions.
2 changes: 1 addition & 1 deletion bundles/org.eclipse.equinox.compendium.tests/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" output="bundle_tests/metatype/getMinMax.tb1" path="bundles_src/metatype/getMinMax.tb1"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" output="bundle_tests/metatype/tb1" path="bundles_src/metatype/tb1"/>
<classpathentry kind="src" output="bundle_tests/metatype/tb2" path="bundles_src/metatype/tb2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=ignore
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand All @@ -26,6 +26,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
Expand Down Expand Up @@ -53,6 +54,7 @@ org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
Expand All @@ -74,7 +76,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
Expand All @@ -96,7 +99,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assertion_message=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16
Expand Down Expand Up @@ -227,7 +229,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
Expand Down Expand Up @@ -301,7 +302,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert
org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
Expand Down Expand Up @@ -461,7 +461,6 @@ org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true
org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.equinox.compendium.tests
Bundle-Version: 1.2.300.qualifier
Bundle-Activator: org.eclipse.equinox.compendium.tests.Activator
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
org.junit;bundle-version="4.12.0"
Eclipse-LazyStart: true
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 All @@ -16,7 +21,7 @@ Import-Package: org.eclipse.equinox.metatype;version="1.2.0",
org.osgi.service.metatype;version="1.2",
org.osgi.service.packageadmin;version="1.2.0",
org.osgi.service.useradmin;version="1.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Localization: plugin
Bundle-Vendor: %bundleVendor
Automatic-Module-Name: org.eclipse.equinox.compendium.tests
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
*******************************************************************************/
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
Expand All @@ -26,63 +25,18 @@ public class Activator implements BundleActivator {
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);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public void tearDown() throws Exception {
Activator.getBundle(Activator.BUNDLE_USERADMIN).stop();
}

@SuppressWarnings("unchecked")
private void createUser1() {
User user = (User) userAdmin.createRole("testUserCreate1", Role.USER); //$NON-NLS-1$
assertNotNull(user);
Expand All @@ -144,19 +143,18 @@ private void removeUser1Silently() {
}
}

@SuppressWarnings("unchecked")
private void createUser2() {
User user = (User) userAdmin.createRole("testUserCreate2", Role.USER); //$NON-NLS-1$
assertNotNull(user);
assertEquals("testUserCreate2", user.getName()); //$NON-NLS-1$
assertTrue(user.getType() == Role.USER);
user.getProperties().put("test1", "valu"); //$NON-NLS-1$ //$NON-NLS-2$
user.getProperties().put("test2", "xxxyyyzzz"); //$NON-NLS-1$ //$NON-NLS-2$
user.getProperties().put("test3", new byte[] {1, 2, 3}); //$NON-NLS-1$
user.getProperties().put("test3", new byte[] { 1, 2, 3 }); //$NON-NLS-1$

user.getCredentials().put("test1", "valu"); //$NON-NLS-1$ //$NON-NLS-2$
user.getCredentials().put("test2", "xxxyyyzzz"); //$NON-NLS-1$ //$NON-NLS-2$
user.getCredentials().put("test3", new byte[] {1, 2, 3}); //$NON-NLS-1$
user.getCredentials().put("test3", new byte[] { 1, 2, 3 }); //$NON-NLS-1$
}

private void removeUser2() {
Expand Down
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.0.qualifier
Bundle-Version: 1.6.100.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
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.tests.harness;resolution:=optional,
org.eclipse.equinox.region;version="1.1.0",
org.eclipse.osgi.service.urlconversion;version="1.0.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
public class RegionServiceEventHookTests {

private static final String BUNDLE_X = "X";
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
public class RegionServiceFindHookTests {

private static final String BUNDLE_X = "X";
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
public class RegionSystemTests extends AbstractRegionSystemTest {

@Rule
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,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

0 comments on commit a146913

Please sign in to comment.