diff --git a/build.xml b/build.xml
index 9ae1f62..3caa6f3 100644
--- a/build.xml
+++ b/build.xml
@@ -90,6 +90,8 @@
   <property name="manifest.tmp" value="${build.dir}/optional.manifest"/>
   <!-- the absolute path -->
   <property name="build.tests.value" location="${build.tests}"/>
+  <!-- directory that contains emma.jar and emma_ant.jar: -->
+  <property name="emma.dir" value="${env.EMMA_HOME}" />
 
   <!--
        ===================================================================
@@ -103,7 +105,7 @@
   <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="false"/>
@@ -118,6 +120,11 @@
          Set the paths used in the build
        ===================================================================
   -->
+  <path id="emma.lib" >
+    <pathelement location="${emma.dir}/emma.jar" />
+    <pathelement location="${emma.dir}/emma_ant.jar" />
+  </path>
+
   <path id="classpath">
     <fileset dir="lib/optional" includes="*.jar"/>
   </path>
@@ -132,6 +139,7 @@
     <pathelement location="${src.junit}"/>
     <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 -->
@@ -1437,6 +1445,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}"/>
 
@@ -1545,6 +1566,7 @@ see ${build.junit.reports} / ${antunit.reports}
   </target>
 
   <target name="test-init" depends="probe-offline,check_for_optional_packages">
+    <echo message="${tests-classpath.value}"/>
     <macrodef name="test-junit">
       <element name="junit-nested" implicit="true" />
       <sequential>
@@ -1863,7 +1885,7 @@ see ${build.junit.reports} / ${antunit.reports}
       <isset property="antunit.testcase" />
     </condition>
 
-    <property name="antunit.excludes" value="" />
+    <property name="antunit.excludes" value="**/input-test.xml" />
 
     <mkdir dir="${antunit.xml}" />
     <au:antunit xmlns:au="antlib:org.apache.ant.antunit"
