diff --git a/build.xml b/build.xml
index 8747a9a..00afed0 100644
--- a/build.xml
+++ b/build.xml
@@ -54,10 +54,10 @@
   <property name="optimize" value="true"/>
   <property name="javac.target" value="1.2"/>
   <property name="javac.source" value="1.2"/>
-  <property name="junit.fork" value="false"/>
+  <property name="junit.fork" value="true"/>
   <property name="junit.filtertrace" value="off"/>
   <property name="junit.summary" value="no"/>
-  <property name="test.haltonfailure" value="yes"/>
+  <property name="test.haltonfailure" value="no"/>
   <property name="junit.forkmode" value="once"/>
   <property name="unfiltered.files" value="**/*.gif,**/*.jpg,**/*.ico,**/*.pdf,**/*.zip"/>
 
@@ -97,6 +97,14 @@
          Set the paths used in the build
        ===================================================================
   -->
+  <!-- directory that contains emma.jar and emma_ant.jar: -->
+  <property name="emma.dir" value="${env.EMMA_HOME}" />
+
+  <path id="emma.lib" >
+    <pathelement location="${emma.dir}/emma.jar" />
+    <pathelement location="${emma.dir}/emma_ant.jar" />
+  </path>
+
   <path id="classpath">
   </path>
 
@@ -110,6 +118,7 @@
     <pathelement location="${tests.dir}"/>
     <pathelement location="${tests.etc.dir}"/>
     <path refid="classpath"/>
+    <path refid="emma.lib"/>
   </path>
 
   <!-- turn this path into a string which is passed to the tests -->
@@ -1407,6 +1416,19 @@
          Compile testcases
        ===================================================================
   -->
+  <taskdef resource="emma_ant.properties" classpathref="emma.lib" />
+
+  <target name="emma" depends="dump-info,compile-tests">
+    <emma>
+      <instr mode="overwrite">
+        <instrpath>
+          <pathelement location="${build.classes}"/>
+          <pathelement location="${build.tests}"/>
+        </instrpath>
+      </instr>
+    </emma>
+  </target>
+
   <target name="compile-tests" depends="build" if="junit.present">
     <mkdir dir="${build.tests}"/>
 
