Author: dgolovin
Date: 2010-05-26 19:42:11 -0400 (Wed, 26 May 2010)
New Revision: 22350
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/inputs/ant/antTemplate.xml
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/pom.xml
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/core/ant/SimpleAntTest.java
Log:
https://jira.jboss.org/browse/JBDS-1202 problems running tests
fix tycho releated errors in archives.test
archives.core and archives.test should be unpacked
equinox.common plug-in reference should be calculated different way because now it is in
maven repo during the test
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/inputs/ant/antTemplate.xml
===================================================================
---
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/inputs/ant/antTemplate.xml 2010-05-26
22:44:28 UTC (rev 22349)
+++
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/inputs/ant/antTemplate.xml 2010-05-26
23:42:11 UTC (rev 22350)
@@ -1,12 +1,11 @@
<project>
<property name="eclipse.home" location="${UNIT_TEST_ECLIPSE_LOC}"
/>
<property name="archives.home"
location="${UNIT_TEST_ARCHIVES_HOME}"/>
+ <property name="equinox.jar" location="${EQUINOX_JAR}"/>
<property name="example_variable" value="test" />
<path id="generate-archives-classpath">
- <fileset dir="${eclipse.home}">
- <include name="plugins/org.eclipse.equinox.common_*.jar" />
- </fileset>
+ <pathelement location="${equinox.jar}"/>
<fileset dir="${archives.home}">
<include
name="plugins/org.jboss.ide.eclipse.archives.core**/archivescore.jar"
/>
Modified: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/pom.xml
===================================================================
--- trunk/archives/tests/org.jboss.ide.eclipse.archives.test/pom.xml 2010-05-26 22:44:28
UTC (rev 22349)
+++ trunk/archives/tests/org.jboss.ide.eclipse.archives.test/pom.xml 2010-05-26 23:42:11
UTC (rev 22350)
@@ -11,4 +11,19 @@
<artifactId>org.jboss.ide.eclipse.archives.test</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <configuration>
+ <explodedBundles>
+ <bundle>org.jboss.ide.eclipse.archives.core</bundle>
+ <bundle>org.jboss.ide.eclipse.archives.test</bundle>
+ </explodedBundles>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/core/ant/SimpleAntTest.java
===================================================================
---
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/core/ant/SimpleAntTest.java 2010-05-26
22:44:28 UTC (rev 22349)
+++
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/core/ant/SimpleAntTest.java 2010-05-26
23:42:11 UTC (rev 22350)
@@ -22,6 +22,7 @@
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
import org.jboss.ide.eclipse.archives.test.ArchivesTest;
import org.jboss.ide.eclipse.archives.test.core.ant.AntLauncher.IProcessListener;
import org.osgi.framework.Bundle;
@@ -31,6 +32,7 @@
protected static final String ARCHIVES_HOME = "${UNIT_TEST_ARCHIVES_HOME}";
protected static final String PROJECT_NAME = "${UNIT_TEST_PROJECT_NAME}";
protected static final String PROJECT_DIR = "${UNIT_TEST_PROJECT_DIR}";
+ protected static final String EQUINOX_JAR = "${EQUINOX_JAR}";
// if running from runtime workbench, set this to true. otherwise its running in a full
build
private final static boolean RUNTIME_WORKBENCH = false;
@@ -57,8 +59,11 @@
outputFolder = projectLoc.append("output");
String eclipseHome = new File(new
URL(System.getProperty("eclipse.home.location")).toURI()).getAbsolutePath();
-
+ String equinoxJar =
FileLocator.getBundleFile(Platform.getBundle("org.eclipse.equinox.common")).getAbsolutePath();
+ System.out.println(eclipseHome);
+ System.out.println(equinoxJar);
map.put(ECLIPSE_LOC, eclipseHome);
+ map.put(EQUINOX_JAR, equinoxJar);
map.put(PROJECT_NAME, "SimpleAntTest");
map.put(ARCHIVES_HOME, RUNTIME_WORKBENCH ? PLUGIN_LOCATION : eclipseHome);
map.put(PROJECT_DIR, projectLoc.toOSString());