[419113] Configuration for surefire test runner

Signed-off-by: Mickael Istria <mistria@redhat.com>
Change-Id: I2ec69e92a8b8cab4af406ee7983564abbba77ebd
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/pom.xml b/tests/org.eclipse.wst.jsdt.core.tests.compiler/pom.xml
index 8f1463a..fc5c962 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/pom.xml
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/pom.xml
@@ -8,6 +8,7 @@
  
   Contributors:
     Thanh Ha (Eclipse Foundation) - initial implementation
+    Mickael Istria (Red Hat Inc.) - 419113 Enable tests with Tycho
 -->
 
 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
@@ -23,5 +24,10 @@
   <groupId>org.eclipse.webtools.jsdt</groupId>
   <artifactId>org.eclipse.wst.jsdt.core.tests.compiler</artifactId>
   <version>1.0.700-SNAPSHOT</version>
-  <packaging>eclipse-plugin</packaging>
+  <packaging>eclipse-test-plugin</packaging>
+  
+  <properties>
+  	<testSuite>${project.artifactId}</testSuite>
+  	<testClass>org.eclipse.wst.jsdt.core.tests.compiler.JSDTCompilerTests</testClass>
+  </properties>
 </project>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/pom.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/pom.xml
index 0e26e5a..77cf03a 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/pom.xml
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/pom.xml
@@ -8,6 +8,7 @@
  
   Contributors:
     Thanh Ha (Eclipse Foundation) - initial implementation
+    Mickael Istria (Red Hat Inc.) - 419113 Enable tests with Tycho
 -->
 
 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
@@ -23,5 +24,10 @@
   <groupId>org.eclipse.webtools.jsdt</groupId>
   <artifactId>org.eclipse.wst.jsdt.core.tests.model</artifactId>
   <version>1.0.600-SNAPSHOT</version>
-  <packaging>eclipse-plugin</packaging>
+  <packaging>eclipse-test-plugin</packaging>
+  
+  <properties>
+  	<testSuite>${project.artifactId}</testSuite>
+  	<testClass>org.eclipse.wst.jsdt.core.tests.RunJSDTCoreTests</testClass>
+  </properties>
 </project>
diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.jsdt.debug.core.tests/META-INF/MANIFEST.MF
index b6ee144..7db7285 100644
--- a/tests/org.eclipse.wst.jsdt.debug.core.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.jsdt.debug.core.tests/META-INF/MANIFEST.MF
@@ -14,7 +14,8 @@
  org.eclipse.debug.ui,
  org.eclipse.wst.jsdt.core,
  org.eclipse.core.resources,
- org.eclipse.debug.core
+ org.eclipse.debug.core,
+ org.eclipse.wst.jsdt.debug.ui
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-ActivationPolicy: lazy
 Export-Package: org.eclipse.wst.debug.core.tests;x-internal:=true,
diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/pom.xml b/tests/org.eclipse.wst.jsdt.debug.core.tests/pom.xml
index 43cc324..9856bb4 100644
--- a/tests/org.eclipse.wst.jsdt.debug.core.tests/pom.xml
+++ b/tests/org.eclipse.wst.jsdt.debug.core.tests/pom.xml
@@ -8,6 +8,7 @@
  
   Contributors:
     Thanh Ha (Eclipse Foundation) - initial implementation
+    Mickael Istria (Red Hat Inc.) - 419113 Enable tests with Tycho
 -->
 
 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
@@ -23,5 +24,30 @@
   <groupId>org.eclipse.webtools.jsdt</groupId>
   <artifactId>org.eclipse.wst.jsdt.debug.core.tests</artifactId>
   <version>1.0.300-SNAPSHOT</version>
-  <packaging>eclipse-plugin</packaging>
+  <packaging>eclipse-test-plugin</packaging>
+  
+  <properties>
+  	<testSuite>${project.artifactId}</testSuite>
+  	<testClass>org.eclipse.wst.debug.core.tests.JavaScriptDebugTestSuite</testClass>
+  </properties>
+  
+  <build>
+  	<plugins>
+  		<plugin>
+  			<groupId>org.eclipse.tycho</groupId>
+  			<artifactId>tycho-surefire-plugin</artifactId>
+  			<configuration>
+  				<useUIHarness>true</useUIHarness>
+  				<useUIThread>true</useUIThread>
+				<dependencies>
+					<dependency>
+						<type>p2-installable-unit</type>
+						<artifactId>org.eclipse.equinox.event</artifactId>
+						<version>0.0.0</version>
+					</dependency>
+				</dependencies>
+  			</configuration>
+  		</plugin>
+  	</plugins>  
+  </build>
 </project>
diff --git a/tests/org.eclipse.wst.jsdt.debug.rhino.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.jsdt.debug.rhino.tests/META-INF/MANIFEST.MF
index 710e252..9ad85d1 100644
--- a/tests/org.eclipse.wst.jsdt.debug.rhino.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.jsdt.debug.rhino.tests/META-INF/MANIFEST.MF
@@ -9,7 +9,8 @@
  org.eclipse.wst.jsdt.debug.rhino,
  org.eclipse.wst.jsdt.debug.rhino.debugger,
  org.mozilla.javascript;bundle-version="1.7.2",
- org.eclipse.wst.jsdt.debug.transport
+ org.eclipse.wst.jsdt.debug.transport,
+ org.eclipse.jface.text
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Vendor: %Bundle-Vendor
 Export-Package: org.eclipse.wst.jsdt.debug.rhino.tests;x-internal:=true
diff --git a/tests/org.eclipse.wst.jsdt.debug.rhino.tests/pom.xml b/tests/org.eclipse.wst.jsdt.debug.rhino.tests/pom.xml
index 2e62c7f..f7b1050 100644
--- a/tests/org.eclipse.wst.jsdt.debug.rhino.tests/pom.xml
+++ b/tests/org.eclipse.wst.jsdt.debug.rhino.tests/pom.xml
@@ -8,6 +8,7 @@
  
   Contributors:
     Thanh Ha (Eclipse Foundation) - initial implementation
+    Mickael Istria (Red Hat Inc.) - 419113 Enable tests with Tycho
 -->
 
 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
@@ -23,5 +24,10 @@
   <groupId>org.eclipse.webtools.jsdt</groupId>
   <artifactId>org.eclipse.wst.jsdt.debug.rhino.tests</artifactId>
   <version>1.0.400-SNAPSHOT</version>
-  <packaging>eclipse-plugin</packaging>
+  <packaging>eclipse-test-plugin</packaging>
+  
+  <properties>
+  	<testSuite>${project.artifactId}</testSuite>
+  	<testClass>org.eclipse.wst.jsdt.debug.rhino.tests.RhinoDebugTestSuite</testClass>
+  </properties>
 </project>
diff --git a/tests/org.eclipse.wst.jsdt.ui.tests/pom.xml b/tests/org.eclipse.wst.jsdt.ui.tests/pom.xml
index ddb2e66..3897913 100644
--- a/tests/org.eclipse.wst.jsdt.ui.tests/pom.xml
+++ b/tests/org.eclipse.wst.jsdt.ui.tests/pom.xml
@@ -8,6 +8,7 @@
  
   Contributors:
     Thanh Ha (Eclipse Foundation) - initial implementation
+    Mickael Istria (Red Hat Inc.) - 419113 Enable tests with Tycho
 -->
 
 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
@@ -23,5 +24,30 @@
   <groupId>org.eclipse.webtools.jsdt</groupId>
   <artifactId>org.eclipse.wst.jsdt.ui.tests</artifactId>
   <version>1.1.300-SNAPSHOT</version>
-  <packaging>eclipse-plugin</packaging>
+  <packaging>eclipse-test-plugin</packaging>
+  
+  <properties>
+  	<testSuite>${project.artifactId}</testSuite>
+  	<testClass>org.eclipse.wst.jsdt.ui.tests.JSDTUITests</testClass>
+  </properties>
+  
+  <build>
+  	<plugins>
+  		<plugin>
+  			<groupId>org.eclipse.tycho</groupId>
+  			<artifactId>tycho-surefire-plugin</artifactId>
+  			<configuration>
+  				<useUIHarness>true</useUIHarness>
+  				<useUIThread>true</useUIThread>
+				<dependencies>
+					<dependency>
+						<type>p2-installable-unit</type>
+						<artifactId>org.eclipse.equinox.event</artifactId>
+						<version>0.0.0</version>
+					</dependency>
+				</dependencies>
+  			</configuration>
+  		</plugin>
+  	</plugins>
+  </build>
 </project>