Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorcletavernie2013-07-04 15:11:13 +0000
committercletavernie2013-07-04 15:11:13 +0000
commitaa4ed0cad30ebff2421fafdb20052fa9d6144e46 (patch)
tree2546383da8e2db779b46d8bf7e8eaf2347231c0e /tests
parent929e314b888c28aa2efff2bb5f7f7dd29d2252e0 (diff)
downloadorg.eclipse.papyrus-aa4ed0cad30ebff2421fafdb20052fa9d6144e46.tar.gz
org.eclipse.papyrus-aa4ed0cad30ebff2421fafdb20052fa9d6144e46.tar.xz
org.eclipse.papyrus-aa4ed0cad30ebff2421fafdb20052fa9d6144e46.zip
[Releng] Update the expected plug-in and Java versions for bundle tests
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundleTestsUtils.java16
-rw-r--r--tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java12
2 files changed, 14 insertions, 14 deletions
diff --git a/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundleTestsUtils.java b/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundleTestsUtils.java
index a8905fb8abf..f5a75a6e187 100644
--- a/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundleTestsUtils.java
+++ b/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundleTestsUtils.java
@@ -5,23 +5,18 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.internal.runtime.InternalPlatform;
-import org.eclipse.core.runtime.IBundleGroup;
-import org.eclipse.core.runtime.IBundleGroupProvider;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.osgi.launch.EquinoxFactory;
import org.eclipse.pde.internal.core.PDECore;
import org.eclipse.pde.internal.core.feature.Feature;
import org.eclipse.pde.internal.core.ifeature.IFeature;
-import org.eclipse.pde.internal.core.ifeature.IFeatureChild;
import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
-import org.eclipse.ui.internal.ide.AboutInfo;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
+@SuppressWarnings("restriction")
public class BundleTestsUtils {
// This version number should be changed at each release
- public static final String PAPYRUS_VERSION = "0.9.0"; //$NON-NLS-1$
+ public static final String PAPYRUS_VERSION = "0.10.1"; //$NON-NLS-1$
public static final String INCUBATION = "(Incubation)"; //$NON-NLS-1$
@@ -41,6 +36,10 @@ public class BundleTestsUtils {
public static final String JAVA_VERSION_5 = "J2SE-1.5"; //$NON-NLS-1$
+ public static final String JAVA_VERSION_6 = "JavaSE-1.6"; //$NON-NLS-1$
+
+ public static final String JAVA_VERSION_REGEX = JAVA_VERSION_5 + "|" + JAVA_VERSION_6;
+
public static final String REQUIRE_BUNDLE = "Require-Bundle"; //$NON-NLS-1$
private BundleTestsUtils() {
@@ -61,7 +60,6 @@ public class BundleTestsUtils {
papyrusBundle.add(bundles[i]);
}
}
- EquinoxFactory factory = new EquinoxFactory();
return papyrusBundle;
}
@@ -91,7 +89,7 @@ public class BundleTestsUtils {
for(IFeatureModel iFeatureModel : models2) {
final IFeature feature = iFeatureModel.getFeature();
final String id = feature.getId();
- if(id.startsWith(PAPYRUS_PREFIX)) { //$NON-NLS-1$
+ if(id.startsWith(PAPYRUS_PREFIX)) {
features.add((Feature)feature);
}
}
diff --git a/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java b/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java
index 82fa1dc1979..f0cd8d4ab97 100644
--- a/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java
+++ b/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java
@@ -29,9 +29,11 @@ import org.osgi.framework.Bundle;
public class BundlesTests {
- private static final String REGEX_VERSION_NUMBER = "0\\.10\\.0\\..*";
+ //Transform the version number to the regex format
+ //Adds .* (Valid version numbers are e.g. 0.10.1.qualifier)
+ private static final String REGEX_VERSION_NUMBER = BundleTestsUtils.PAPYRUS_VERSION.replaceAll("\\.", "\\\\.") + "\\..*"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final String REGEX_INCUBATION = ".*\\(Incubation\\)";
+ private static final String REGEX_INCUBATION = ".*\\(Incubation\\)"; //$NON-NLS-1$
@Test
public void featureVersionNumberTest() {
@@ -56,7 +58,7 @@ public class BundlesTests {
*/
@Test
public void incubationTest() {
- testManifestProperty(BundleTestsUtils.BUNDLE_NAME, ".*\\(Incubation\\)", false, false); //$NON-NLS-1$
+ testManifestProperty(BundleTestsUtils.BUNDLE_NAME, REGEX_INCUBATION, false, false);
}
/**
@@ -88,7 +90,7 @@ public class BundlesTests {
*/
@Test
public void javaVersionTest() {
- testManifestProperty(BundleTestsUtils.BUNDLE_REQUIREDEXECUTIONENVIRONMENT, BundleTestsUtils.JAVA_VERSION_5, false, true);
+ testManifestProperty(BundleTestsUtils.BUNDLE_REQUIREDEXECUTIONENVIRONMENT, BundleTestsUtils.JAVA_VERSION_REGEX, false, true);
}
/**
@@ -224,7 +226,7 @@ public class BundlesTests {
String localMessage = null;
for(final String bundle : bundles) {
if(bundle.contains("org.eclipse.papyrus")) { //$NON-NLS-1$
- if(!bundle.contains("bundle-version=" + '"' + "0.10.0" + '"')) { //$NON-NLS-1$ //$NON-NLS-2$
+ if(!bundle.contains("bundle-version=" + '"' + BundleTestsUtils.PAPYRUS_VERSION + '"')) { //$NON-NLS-1$
nb++;
if(localMessage == null) {
localMessage = NLS.bind("{0} incorrect required bundle-version:", current.getSymbolicName()); //$NON-NLS-1$

Back to the top