Bug 546468 - Enable releng tools tests for gerrit and nightly builds

Also move tests for releng tools in a separate package.

Change-Id: Ie2a24162d1e00b84d7c88e374c37fdf3370daf28
Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
diff --git a/bundles/org.eclipse.releng.tests/META-INF/MANIFEST.MF b/bundles/org.eclipse.releng.tests/META-INF/MANIFEST.MF
index 2cb6dd5..ee9b16b 100644
--- a/bundles/org.eclipse.releng.tests/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.releng.tests/META-INF/MANIFEST.MF
@@ -12,7 +12,8 @@
  org.eclipse.core.resources,
  org.eclipse.egit.core;bundle-version="3.0.0";resolution:=optional,
  org.eclipse.releng.tools;bundle-version="3.6.100"
-Export-Package: org.eclipse.releng.tests
+Export-Package: org.eclipse.releng.tests,
+ org.eclipse.releng.tests.tools
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Bundle-ClassPath: .
 Automatic-Module-Name: org.eclipse.releng.tests
diff --git a/bundles/org.eclipse.releng.tests/pom.xml b/bundles/org.eclipse.releng.tests/pom.xml
index 123838c..bd5a1f3 100644
--- a/bundles/org.eclipse.releng.tests/pom.xml
+++ b/bundles/org.eclipse.releng.tests/pom.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright (c) 2012, 2016 Eclipse Foundation and others.
+  Copyright (c) 2012, 2019 Eclipse Foundation and others.
   All rights reserved. This program and the accompanying materials
   are made available under the terms of the Eclipse Distribution License v1.0
   which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
   Contributors:
      Igor Fedorenko - initial implementation
      Lars Vogel <Lars.Vogel@vogella.com> - Bug 485612
+     Paul Pazderski - Bug 546468: Enable releng tools tests on automatic builds
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
@@ -24,5 +25,7 @@
   <packaging>eclipse-test-plugin</packaging>
   <properties>
     <code.ignoredWarnings>${tests.ignoredWarnings}</code.ignoredWarnings>
+    <testSuite>${project.artifactId}</testSuite>
+    <testClass>org.eclipse.releng.tests.tools.AllRelengToolsTests</testClass>
   </properties>
 </project>
diff --git a/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/CheckMacSignatures.java b/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/CheckMacSignatures.java
index 73f76dd..a99cb61 100644
--- a/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/CheckMacSignatures.java
+++ b/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/CheckMacSignatures.java
@@ -1,4 +1,16 @@
-
+/*******************************************************************************
+ * Copyright (c) 2016, 2018 David Williams 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:
+ *     David Williams - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.releng.tests;
 
 import java.util.Properties;
diff --git a/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/AdvancedCopyrightCommentTestsJunit4.java b/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/tools/AdvancedCopyrightCommentTestsJunit4.java
similarity index 97%
rename from bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/AdvancedCopyrightCommentTestsJunit4.java
rename to bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/tools/AdvancedCopyrightCommentTestsJunit4.java
index a3f5853..bffe019 100644
--- a/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/AdvancedCopyrightCommentTestsJunit4.java
+++ b/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/tools/AdvancedCopyrightCommentTestsJunit4.java
@@ -1,4 +1,17 @@
-package org.eclipse.releng.tests;
+/*******************************************************************************
+ * Copyright (c) 2014 Leo Ufimtsev 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:
+ *     Leo Ufimtsev - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.releng.tests.tools;
 
 import static org.junit.Assert.assertTrue;
 
diff --git a/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/AllRelengTests.java b/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/tools/AllRelengToolsTests.java
similarity index 79%
rename from bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/AllRelengTests.java
rename to bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/tools/AllRelengToolsTests.java
index bee3709..b041ab5 100644
--- a/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/AllRelengTests.java
+++ b/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/tools/AllRelengToolsTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 Tomasz Zarna and others.
+ * Copyright (c) 2013, 2019 Tomasz Zarna and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -11,7 +11,7 @@
  * Contributors:
  *     Tomasz Zarna <tzarna@gmail.com> - initial API and implementation
  *******************************************************************************/
-package org.eclipse.releng.tests;
+package org.eclipse.releng.tests.tools;
 
 import org.junit.runner.RunWith;
 import org.junit.runners.AllTests;
@@ -19,12 +19,15 @@
 import junit.framework.JUnit4TestAdapter;
 import junit.framework.TestSuite;
 
+/**
+ * Tests for integration and nightly builds.
+ */
 @RunWith(AllTests.class)
-public class AllRelengTests {
+public class AllRelengToolsTests {
 
 	public static TestSuite suite() {
 		TestSuite suite = new TestSuite();
-		suite.addTest(new JUnit4TestAdapter(BuildTests.class));
+		suite.addTest(new JUnit4TestAdapter(AdvancedCopyrightCommentTestsJunit4.class));
 		if (isJGitAvailable())
 			suite.addTest(new JUnit4TestAdapter(GitCopyrightAdapterTest.class));
 		return suite;
diff --git a/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/GitCopyrightAdapterTest.java b/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/tools/GitCopyrightAdapterTest.java
similarity index 98%
rename from bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/GitCopyrightAdapterTest.java
rename to bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/tools/GitCopyrightAdapterTest.java
index c889e96..7c331cf 100644
--- a/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/GitCopyrightAdapterTest.java
+++ b/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/tools/GitCopyrightAdapterTest.java
@@ -11,7 +11,7 @@
  * Contributors:
  *     Tomasz Zarna <tzarna@gmail.com> - initial API and implementation
  *******************************************************************************/
-package org.eclipse.releng.tests;
+package org.eclipse.releng.tests.tools;
 
 import java.io.ByteArrayInputStream;
 import java.io.File;
diff --git a/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/LocalGitRepositoryTestData.java b/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/tools/LocalGitRepositoryTestData.java
similarity index 98%
rename from bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/LocalGitRepositoryTestData.java
rename to bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/tools/LocalGitRepositoryTestData.java
index 39a1f48..b6ce055 100644
--- a/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/LocalGitRepositoryTestData.java
+++ b/bundles/org.eclipse.releng.tests/src/org/eclipse/releng/tests/tools/LocalGitRepositoryTestData.java
@@ -46,7 +46,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-package org.eclipse.releng.tests;
+package org.eclipse.releng.tests.tools;
 
 import java.io.File;
 import java.io.IOException;
diff --git a/bundles/org.eclipse.releng.tests/test.xml b/bundles/org.eclipse.releng.tests/test.xml
index a22ed34..8045778 100644
--- a/bundles/org.eclipse.releng.tests/test.xml
+++ b/bundles/org.eclipse.releng.tests/test.xml
@@ -199,7 +199,7 @@
 	<!-- the tests have been run should go here. -->
   <target
     name="run"
-    depends="init,BuildTests">
+    depends="init,BuildTests,AllRelengToolsTests">
     <ant
       target="collect"
       antfile="${library-file}"
@@ -239,4 +239,30 @@
     </ant>
   </target>
 
+  <target
+    name="AllRelengToolsTests"
+    depends="init,cleanup">
+    <ant
+      target="core-test"
+      antfile="${library-file}"
+      dir="${eclipse-home}">
+      <property
+        name="data-dir"
+        value="${location}" />
+      <property
+        name="plugin-name"
+        value="${plugin-name}" />
+      <property
+        name="classname"
+        value="org.eclipse.releng.tests.tools.AllRelengToolsTests" />
+      <property
+        name="plugin-path"
+        value="${eclipse-home}/plugins/${org.eclipse.releng.tests}" />
+      
+      <property
+        name="vmargs"
+        value="-DdownloadHost=${downloadHost} -DbuildId=${buildId}" />
+    </ant>
+  </target>
+
 </project>
\ No newline at end of file