From fb421ab0647b8b8e204b798b9d59b23e7ffc6c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Sat, 23 Sep 2023 10:21:37 +0300 Subject: [PATCH 1/4] Use 2023-09 simrel As default repo in tests. --- tycho-its/projects/api-tools/pom.xml | 2 +- .../projects/document-bundle-plugin/build-help-index/pom.xml | 2 +- .../main/java/org/eclipse/tycho/test/util/EnvironmentUtil.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tycho-its/projects/api-tools/pom.xml b/tycho-its/projects/api-tools/pom.xml index 71c9c3b6f1..f1230b7f92 100644 --- a/tycho-its/projects/api-tools/pom.xml +++ b/tycho-its/projects/api-tools/pom.xml @@ -12,7 +12,7 @@ bundle2 - https://download.eclipse.org/releases/2023-06/ + https://download.eclipse.org/releases/2023-09/ diff --git a/tycho-its/projects/document-bundle-plugin/build-help-index/pom.xml b/tycho-its/projects/document-bundle-plugin/build-help-index/pom.xml index 6723c553fc..202f5c4f85 100644 --- a/tycho-its/projects/document-bundle-plugin/build-help-index/pom.xml +++ b/tycho-its/projects/document-bundle-plugin/build-help-index/pom.xml @@ -6,7 +6,7 @@ 1.0.0-SNAPSHOT eclipse-plugin - https://download.eclipse.org/releases/2023-03/ + https://download.eclipse.org/releases/2023-09/ 4.0.0-SNAPSHOT diff --git a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/util/EnvironmentUtil.java b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/util/EnvironmentUtil.java index cdd7d7bc6c..68fbb9fe16 100644 --- a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/util/EnvironmentUtil.java +++ b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/util/EnvironmentUtil.java @@ -36,7 +36,7 @@ public class EnvironmentUtil { private static final String MAVEN_HOME_INFO = "Maven home:"; - public static final String ECLIPSE_LATEST = "https:////download.eclipse.org/releases/2022-12/"; + public static final String ECLIPSE_LATEST = "https:////download.eclipse.org/releases/2023-09/"; private static final Properties props; From 78134a0b3102accf596b9889a4cc2b813ca7d848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Wed, 27 Sep 2023 09:15:48 +0300 Subject: [PATCH 2/4] Use Hamcrest 2.2 in JUnitClasspathContainerEntry --- .../tycho/model/classpath/JUnitClasspathContainerEntry.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/classpath/JUnitClasspathContainerEntry.java b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/classpath/JUnitClasspathContainerEntry.java index 38a3abd0e2..157e46f1f5 100644 --- a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/classpath/JUnitClasspathContainerEntry.java +++ b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/classpath/JUnitClasspathContainerEntry.java @@ -29,8 +29,8 @@ public interface JUnitClasspathContainerEntry extends ClasspathContainerEntry { static final JUnitBundle JUNIT4_PLUGIN = JUnitBundle.of("org.junit", "[4.13.0,5.0.0)", "org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit"); - static final JUnitBundle HAMCREST_CORE_PLUGIN = JUnitBundle.of("org.hamcrest.core", "[1.1.0,2.0.0)", - "org.apache.servicemix.bundles", "org.apache.servicemix.bundles.hamcrest"); + static final JUnitBundle HAMCREST_CORE_PLUGIN = JUnitBundle.of("org.hamcrest", "[2.0.0,3.0.0)", "org.hamcrest", + "hamcrest"); static final JUnitBundle JUNIT_JUPITER_API_PLUGIN = JUnitBundle.of("junit-jupiter-api", "[5.0.0,6.0.0)", "org.junit.jupiter", "junit-jupiter-api"); From 97ec55c275d33e272bc8092cd4e05bfcd923df52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Wed, 27 Sep 2023 14:16:00 +0300 Subject: [PATCH 3/4] Fix BasicP2RepositoryIntegrationTest with 2023-03 Bundle id changes. Simplified setup a bit while at it to be more like rest of the test suite. --- tycho-its/projects/p2Repository/category.xml | 2 +- tycho-its/projects/p2Repository/pom.xml | 2 +- .../p2Repository/BasicP2RepositoryIntegrationTest.java | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tycho-its/projects/p2Repository/category.xml b/tycho-its/projects/p2Repository/category.xml index 1b42d0704d..019caa94d5 100644 --- a/tycho-its/projects/p2Repository/category.xml +++ b/tycho-its/projects/p2Repository/category.xml @@ -1,7 +1,7 @@ - + diff --git a/tycho-its/projects/p2Repository/pom.xml b/tycho-its/projects/p2Repository/pom.xml index dcdc9146cb..866a556cda 100644 --- a/tycho-its/projects/p2Repository/pom.xml +++ b/tycho-its/projects/p2Repository/pom.xml @@ -43,7 +43,7 @@ test-data-repo p2 - ${test-data-repo} + ${target-platform} diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/BasicP2RepositoryIntegrationTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/BasicP2RepositoryIntegrationTest.java index 39fc5fee9e..845f56564f 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/BasicP2RepositoryIntegrationTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/BasicP2RepositoryIntegrationTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2021 SAP AG and others. + * Copyright (c) 2012, 2023 SAP AG and others. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -38,8 +38,7 @@ public class BasicP2RepositoryIntegrationTest extends AbstractTychoIntegrationTe @BeforeClass public static void executeBuild() throws Exception { - verifier = new BasicP2RepositoryIntegrationTest().getVerifier("/p2Repository", false); - verifier.addCliOption("-Dtest-data-repo=" + ResourceUtil.P2Repositories.ECLIPSE_LATEST.toString()); + verifier = new BasicP2RepositoryIntegrationTest().getVerifier("/p2Repository", true); verifier.executeGoal("verify"); verifier.verifyErrorFreeLog(); p2Repo = P2RepositoryTool.forEclipseRepositoryModule(new File(verifier.getBasedir())); @@ -48,7 +47,7 @@ public static void executeBuild() throws Exception { @Test public void test381377BundleInclusion() { // check that (separately!) included bundle is there - assertTrue(p2Repo.getBundleArtifact("com.sun.el", "2.2.0.v201303151357").isFile()); + assertTrue(p2Repo.getBundleArtifact("com.sun.el.javax.el", "3.0.0").isFile()); } @Test From abdbb108aaf42bb73c4db4c24883ae0511e1e240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Wed, 27 Sep 2023 15:28:16 +0300 Subject: [PATCH 4/4] Fix CustomProfileIntegrationTest with 2023-09 Add JavaSE-17 osgi.ee capability to allow resolving. Simplify test setup while at it. --- tycho-its/projects/eeProfile.custom/build/pom.xml | 2 +- tycho-its/projects/eeProfile.custom/repository/content.xml | 1 + .../tycho/test/eeProfile/CustomProfileIntegrationTest.java | 5 ++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tycho-its/projects/eeProfile.custom/build/pom.xml b/tycho-its/projects/eeProfile.custom/build/pom.xml index 14d46ce6d5..8b831db758 100644 --- a/tycho-its/projects/eeProfile.custom/build/pom.xml +++ b/tycho-its/projects/eeProfile.custom/build/pom.xml @@ -46,7 +46,7 @@ repo-with-test-runtime - ${test-runtime-repo} + ${target-platform} p2 diff --git a/tycho-its/projects/eeProfile.custom/repository/content.xml b/tycho-its/projects/eeProfile.custom/repository/content.xml index f9389ae5c3..2fae91d1fd 100644 --- a/tycho-its/projects/eeProfile.custom/repository/content.xml +++ b/tycho-its/projects/eeProfile.custom/repository/content.xml @@ -212,6 +212,7 @@ + diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/eeProfile/CustomProfileIntegrationTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/eeProfile/CustomProfileIntegrationTest.java index e6184248cd..915211f536 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/eeProfile/CustomProfileIntegrationTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/eeProfile/CustomProfileIntegrationTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 SAP AG and others. + * Copyright (c) 2012, 2023 SAP AG and others. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -27,14 +27,13 @@ public class CustomProfileIntegrationTest extends AbstractTychoIntegrationTest { @Test public void testBuildWithCustomProfile() throws Exception { // reactor with a test bundle importing javax.activation;version="1.1.0" - Verifier verifier = getVerifier("eeProfile.custom/build", false); + Verifier verifier = getVerifier("eeProfile.custom/build", true); // repository where the custom EE is the only provider of // javax.activation;version="1.1.0" verifier.setSystemProperty("custom-profile-repo", ResourceUtil.resolveTestResource("projects/eeProfile.custom/repository").toURI().toString()); - verifier.setSystemProperty("test-runtime-repo", ResourceUtil.P2Repositories.ECLIPSE_LATEST.toString()); verifier.executeGoal("verify"); verifier.verifyErrorFreeLog();