diff --git a/org.eclipse.xtext.releng.simrel.tests/.classpath b/org.eclipse.xtext.releng.simrel.tests/.classpath deleted file mode 100644 index f1d7ba28d9f..00000000000 --- a/org.eclipse.xtext.releng.simrel.tests/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.xtext.releng.simrel.tests/.project b/org.eclipse.xtext.releng.simrel.tests/.project deleted file mode 100644 index 056366c39c6..00000000000 --- a/org.eclipse.xtext.releng.simrel.tests/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.xtext.releng.simrel.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/org.eclipse.xtext.releng.simrel.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.xtext.releng.simrel.tests/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 049e42fd35f..00000000000 --- a/org.eclipse.xtext.releng.simrel.tests/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -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 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=11 diff --git a/org.eclipse.xtext.releng.simrel.tests/META-INF/MANIFEST.MF b/org.eclipse.xtext.releng.simrel.tests/META-INF/MANIFEST.MF deleted file mode 100644 index 30859a2adc4..00000000000 --- a/org.eclipse.xtext.releng.simrel.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,14 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: SimRel Tests -Bundle-SymbolicName: org.eclipse.xtext.releng.simrel.tests -Bundle-Version: 2.30.0.qualifier -Require-Bundle: org.eclipse.cbi.p2repo.analyzers;bundle-version="2.0.0", - org.eclipse.cbi.p2repo.analyzers.common;bundle-version="2.0.0", - org.junit;bundle-version="4.12.0", - org.eclipse.equinox.p2.core;bundle-version="2.0.0", - org.eclipse.core.runtime -Bundle-Vendor: Eclipse Xtext -Bundle-RequiredExecutionEnvironment: JavaSE-11 -Automatic-Module-Name: org.eclipse.xtext.releng.simrel.tests -Export-Package: org.eclipse.xtext.releng.simrel.tests;x-internal:=true diff --git a/org.eclipse.xtext.releng.simrel.tests/build.properties b/org.eclipse.xtext.releng.simrel.tests/build.properties deleted file mode 100644 index b107977f4ed..00000000000 --- a/org.eclipse.xtext.releng.simrel.tests/build.properties +++ /dev/null @@ -1,3 +0,0 @@ -source.. = src/ -bin.includes = META-INF/,\ - . diff --git a/org.eclipse.xtext.releng.simrel.tests/pom.xml b/org.eclipse.xtext.releng.simrel.tests/pom.xml deleted file mode 100644 index b738082dcc0..00000000000 --- a/org.eclipse.xtext.releng.simrel.tests/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - 4.0.0 - - org.eclipse.xtext - org.eclipse.xtext.releng.simrel.tests - 2.33.0-SNAPSHOT - eclipse-test-plugin - - - 2.7.5 - - ${project.build.directory} - 11 - 11 - - - - - - org.eclipse.tycho - tycho-maven-plugin - ${tycho-version} - true - - - org.eclipse.tycho - tycho-surefire-plugin - ${tycho-version} - - org.eclipse.xtext.releng.simrel.tests.RepositoryTest - - ${reportRepoDir} - ${reportOutputDir} - - - - - - - - - cbi-analyzer - p2 - https://download.eclipse.org/cbi/updates/analyzers/4.7 - - - eclipse-updates - p2 - https://download.eclipse.org/eclipse/updates/4.7/R-4.7.3-201803010715 - - - - diff --git a/org.eclipse.xtext.releng.simrel.tests/src/org/eclipse/xtext/releng/simrel/tests/RepositoryTest.java b/org.eclipse.xtext.releng.simrel.tests/src/org/eclipse/xtext/releng/simrel/tests/RepositoryTest.java deleted file mode 100644 index cf942388bc2..00000000000 --- a/org.eclipse.xtext.releng.simrel.tests/src/org/eclipse/xtext/releng/simrel/tests/RepositoryTest.java +++ /dev/null @@ -1,205 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2018 itemis AG (http://www.itemis.eu) and others. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ -package org.eclipse.xtext.releng.simrel.tests; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.net.URISyntaxException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Set; - -import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.equinox.p2.core.ProvisionException; -import org.eclipse.cbi.p2repo.analyzers.BuildRepoTests; -import org.eclipse.cbi.p2repo.analyzers.RepoTestsConfiguration; -import org.eclipse.cbi.p2repo.analyzers.jars.BREETest; -import org.eclipse.cbi.p2repo.analyzers.jars.ESTest; -import org.eclipse.cbi.p2repo.analyzers.jars.SignerTest; -import org.eclipse.cbi.p2repo.analyzers.jars.TestLayoutTest; -import org.eclipse.cbi.p2repo.analyzers.jars.VersionTest; -import org.eclipse.cbi.p2repo.analyzers.repos.FeatureDisplayableDataChecker; -import org.eclipse.cbi.p2repo.analyzers.repos.FeatureNameLengths; -import org.eclipse.cbi.p2repo.analyzers.repos.IUNameChecker; -import org.eclipse.cbi.p2repo.analyzers.repos.IUVersionCheckToReference; -import org.eclipse.cbi.p2repo.analyzers.repos.ProviderNameChecker; -import org.eclipse.cbi.p2repo.analyzers.repos.TestRepo; -import org.eclipse.cbi.p2repo.analyzers.repos.VersionChecking; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * JUnit TestCase which runs all the available checks as Junit Plugin Tests - *

- * Copied from org.eclipse.cbi.p2repo.analyzers.RepositoryTest. Could not use - * original class since it is not exported and causes NCDFE. - *

- * - * @author Dennis Huebner - * - */ -public class RepositoryTest { - private static final RepoTestsConfiguration CONF_FROM_SYSTEM_PROPERTIES = RepoTestsConfiguration - .createFromSystemProperties(); - private static final String SKIP_CHECKER_PROP_NAME = "skipChecker"; - private static final Set SKIPPED_CHECKER = new HashSet(); - private static String dirToTest; - private static String repoToTest; - private static String refRepoDir; - - @BeforeClass - public static final void beforeClass() { - BuildRepoTests tests = new BuildRepoTests(CONF_FROM_SYSTEM_PROPERTIES); - String directoryToCheck = tests.getDirectoryToCheck(); - if (directoryToCheck == null) { - System.err.println("Repository directory was not specified. Use -" - + RepoTestsConfiguration.REPORT_REPO_DIR_PARAM + "=/dir/location to pass the repository location"); - } - if (System.getProperty("DUMP_ENV_PROPS", null) != null) { - for (Entry entry : System.getProperties().entrySet()) - System.out.println(entry.getKey() + "=" + entry.getValue()); - } - dirToTest = directoryToCheck; - repoToTest = "file://" + directoryToCheck; - refRepoDir = tests.getDirectoryToCheckForReference(); - - String skipCheckerProp = System.getProperty(SKIP_CHECKER_PROP_NAME); - if (skipCheckerProp != null) { - String[] split = skipCheckerProp.split(";"); - for (String checkerName : split) { - SKIPPED_CHECKER.add(checkerName); - System.out.println("Checker " + checkerName + " will be skipped."); - } - } - } - - @AfterClass - public static final void afterClass() { - String output = new BuildRepoTests(CONF_FROM_SYSTEM_PROPERTIES).getReportOutputDirectory(); - System.out.println("See reports in:" + output); - } - - @Test - public void testVersionUniqness() - throws ProvisionException, OperationCanceledException, URISyntaxException, IOException { - VersionChecking checker = new VersionChecking(CONF_FROM_SYSTEM_PROPERTIES); - if (configureChecker(checker)) { - assertTrue("Unique Versions used in repository", !checker.testVersionUniqness()); - } - } - - @Test - public void testIUNames() throws ProvisionException, OperationCanceledException, URISyntaxException, IOException { - IUNameChecker checker = new IUNameChecker(CONF_FROM_SYSTEM_PROPERTIES); - if (configureChecker(checker)) { - assertTrue("Correct feature names", !checker.testFeatureNames()); - assertTrue("Correct bundle names", !checker.testBundleNames()); - } - } - - @Test - public void testProviderName() - throws ProvisionException, OperationCanceledException, URISyntaxException, IOException { - ProviderNameChecker checker = new ProviderNameChecker(CONF_FROM_SYSTEM_PROPERTIES); - if (configureChecker(checker)) { - assertTrue("Correct provider names", !checker.testProviderNames()); - } - } - - @Test - public void testFeatureDisplayableData() - throws ProvisionException, OperationCanceledException, URISyntaxException, IOException { - FeatureDisplayableDataChecker checker = new FeatureDisplayableDataChecker(CONF_FROM_SYSTEM_PROPERTIES); - if (configureChecker(checker)) { - assertTrue("Correct displayable data (checkLicenseConsistency,checkCopyrights,checkDescriptions)", - !checker.testDisplayableData()); - } - } - - @Test - public void testFeatureNameLengths() - throws ProvisionException, OperationCanceledException, URISyntaxException, IOException { - FeatureNameLengths checker = new FeatureNameLengths(CONF_FROM_SYSTEM_PROPERTIES); - if (configureChecker(checker)) { - assertFalse("FeatureDirectoryLengths is <=" + FeatureNameLengths.MAX_CRITERIA, - checker.testFeatureDirectoryLength() > FeatureNameLengths.MAX_CRITERIA); - } - } - - @Test - public void testIUVersionCheckToReference() - throws ProvisionException, OperationCanceledException, URISyntaxException, IOException { - IUVersionCheckToReference checker = new IUVersionCheckToReference(CONF_FROM_SYSTEM_PROPERTIES); - if (configureChecker(checker)) { - if (refRepoDir != null) { - assertTrue("Correct version changes", !checker.checkIUVersionsToReference()); - assertTrue("Correct version changes for features", !checker.checkIUVersionsToReferenceForFeatures()); - } - } - } - - @Test - public void testEclipseSourceReferences() throws OperationCanceledException, IOException { - ESTest checker = new ESTest(CONF_FROM_SYSTEM_PROPERTIES); - if (configureChecker(checker)) { - assertTrue("Correct eclipse source reference", !checker.testESSettingRule()); - } - } - - @Test - public void testBREE() throws OperationCanceledException, IOException { - BREETest checker = new BREETest(CONF_FROM_SYSTEM_PROPERTIES); - if (configureChecker(checker)) { - assertTrue("Correct BREE", !checker.testBREESettingRule()); - } - } - - @Test - public void testSigning() throws OperationCanceledException, IOException { - SignerTest checker = new SignerTest(CONF_FROM_SYSTEM_PROPERTIES); - if (configureChecker(checker)) { - assertTrue("Correct signature", !checker.verifySignatures()); - } - } - - @Test - public void testVersionTest() throws OperationCanceledException, IOException { - VersionTest checker = new VersionTest(CONF_FROM_SYSTEM_PROPERTIES); - if (configureChecker(checker)) { - assertTrue("Correct version pattern", !checker.testVersionsPatterns()); - } - } - - @Test - public void testLayout() throws OperationCanceledException, IOException { - TestLayoutTest checker = new TestLayoutTest(CONF_FROM_SYSTEM_PROPERTIES); - if (configureChecker(checker)) { - assertTrue("Correct files and layout in bundles and features.", !checker.testLayout()); - } - } - - private boolean configureChecker(BuildRepoTests checker) { - checker.setDirectoryToCheck(dirToTest); - if (checker instanceof TestRepo) { - ((TestRepo) checker).setRepoURLToTest(repoToTest); - } - return !skipChecker(checker); - } - - private boolean skipChecker(BuildRepoTests checker) { - if (SKIPPED_CHECKER.size() > 0) { - return SKIPPED_CHECKER.contains(checker.getClass().getSimpleName()); - } - return false; - } - -}