[cdi-junit] fixed test classpath for ant executions
authorAsier Lostalé <asier.lostale@openbravo.com>
Tue, 16 Jun 2015 14:13:34 +0200
changeset 27138 1efeff756e75
parent 27137 bb9f3baef514
child 27139 94e053aae6c4
[cdi-junit] fixed test classpath for ant executions
src-test/build.xml
--- a/src-test/build.xml	Tue Jun 16 13:26:13 2015 +0200
+++ b/src-test/build.xml	Tue Jun 16 14:13:34 2015 +0200
@@ -32,13 +32,29 @@
   </path>
 
   <path id="test.class.path">
-    <path refid="project.class.path"/>
+    <pathelement path="${build.test}" />
+  	<pathelement path="${build}" />
     <fileset dir="${base.lib}">
-      <include name="**/test/*.jar" />
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${build.core.lib}">
+      <include name="openbravo-core.jar" />
+    </fileset>
+    <fileset dir="${build.trl.lib}">
+      <include name="openbravo-trl.jar" />
+    </fileset>
+    <fileset dir="${build.wad.lib}">
+      <include name="openbravo-wad.jar" />
+    </fileset>
+    <fileset dir="${base.lib}">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${base.db}/lib/">
+      <include name="**/*.jar" />
     </fileset>
     <fileset dir="${base.modules}">
-      <include name="**/test/*.jar" />
-    </fileset> 
+      <include name="*/lib/**" />
+    </fileset>
   </path>
 
   <target name="compile.test" depends="compileSqlc,generate.entities.quick">
@@ -57,7 +73,7 @@
 
   <target name="run.tests" depends="compile.test, copy.xml">
     <junit printsummary="yes" haltonfailure="yes">
-      <classpath refid="project.class.path" />
+      <classpath refid="test.class.path" />
       <formatter type="plain" usefile="no"/>
       <test name="org.openbravo.test.AntTaskTests" haltonfailure="no"/>
     </junit>
@@ -65,7 +81,7 @@
 
   <target name="run.all.tests" depends="compile.test, copy.xml">
     <junit printsummary="yes" haltonfailure="yes">
-      <classpath refid="project.class.path" />
+      <classpath refid="test.class.path" />
       <formatter type="plain" usefile="no"/>
       <test name="org.openbravo.test.AllAntTaskTests" haltonfailure="no" outfile="../src/result">
       <formatter type="xml" />
@@ -75,7 +91,7 @@
 
   <target name="run.quick.tests" depends="compile.test, copy.xml">
     <junit printsummary="yes" haltonfailure="yes">
-      <classpath refid="project.class.path" />
+      <classpath refid="test.class.path" />
       <formatter type="plain" usefile="no"/>
       <test name="org.openbravo.test.AllQuickAntTaskTests" haltonfailure="no"/>
     </junit>
@@ -83,7 +99,7 @@
 
   <target name="run.webservice.tests" depends="compile.test, copy.xml">
     <junit printsummary="yes" haltonfailure="yes">
-      <classpath refid="project.class.path" />
+      <classpath refid="test.class.path" />
       <formatter type="plain" usefile="no"/>
       <test name="org.openbravo.test.AllWebserviceTests" haltonfailure="no" outfile="../src/resultws">
         <formatter type="xml" />