From d44e1d010e503ea1cc811ae90238713d170d18ef Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Mon, 10 Aug 2026 16:51:10 +0200 Subject: [PATCH] Run the team UI tests in the Maven build The Maven build only ran AllTeamTests, because the bundle pinned testClass to that suite. AllTeamUITests was built but never executed outside the I-build, which runs it through the ui-test target of test.xml, so nothing guarded the unified diff, compare editor input, mapping and synchronize tests. Drop the pom and configure the bundle through build.properties like the other test bundles of this repository. A bundle can only use one test harness, so both suites now run through a new AllTests suite with the UI harness enabled. Because the symbolic name does not end in .tests, the pomless build would package it as a plain bundle and skip its tests, hence the explicit packaging. The build now runs 62 instead of 22 tests. test.xml keeps its core-test and ui-test split. --- .../build.properties | 6 ++++ .../tests/org.eclipse.team.tests.core/pom.xml | 27 ----------------- .../org/eclipse/team/tests/core/AllTests.java | 29 +++++++++++++++++++ 3 files changed, 35 insertions(+), 27 deletions(-) delete mode 100644 team/tests/org.eclipse.team.tests.core/pom.xml create mode 100644 team/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTests.java diff --git a/team/tests/org.eclipse.team.tests.core/build.properties b/team/tests/org.eclipse.team.tests.core/build.properties index a4f032ff300..39ddad70e88 100644 --- a/team/tests/org.eclipse.team.tests.core/build.properties +++ b/team/tests/org.eclipse.team.tests.core/build.properties @@ -20,3 +20,9 @@ bin.includes = about.html,\ test.xml,\ META-INF/,\ plugin.properties + +# Maven/Tycho pom model adjustments. The bundle name does not end in .tests, so +# the pomless build would treat it as a plain bundle and never run its tests. +pom.model.packaging = eclipse-test-plugin +pom.model.property.testClass = org.eclipse.team.tests.core.AllTests +pom.model.property.tycho.surefire.useUIHarness = true diff --git a/team/tests/org.eclipse.team.tests.core/pom.xml b/team/tests/org.eclipse.team.tests.core/pom.xml deleted file mode 100644 index 67a1001571b..00000000000 --- a/team/tests/org.eclipse.team.tests.core/pom.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - 4.0.0 - - org.eclipse.platform - eclipse.platform.team.tests - 4.41.0-SNAPSHOT - - org.eclipse.team.tests.core - 3.11.100-SNAPSHOT - eclipse-test-plugin - - - ${project.artifactId} - org.eclipse.team.tests.core.AllTeamTests - - diff --git a/team/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTests.java b/team/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTests.java new file mode 100644 index 00000000000..5c74a298a9c --- /dev/null +++ b/team/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTests.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2026 Vogella GmbH 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 + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Lars Vogel - initial implementation + *******************************************************************************/ +package org.eclipse.team.tests.core; + +import org.junit.platform.suite.api.SelectClasses; +import org.junit.platform.suite.api.Suite; + +/** + * Runs every test of this bundle. The Maven build can only run a single suite + * per bundle, while test.xml keeps the core and UI suites apart. + */ +@Suite +@SelectClasses({ // + AllTeamTests.class, // + AllTeamUITests.class, // +}) +public class AllTests { +}