diff --git a/build.xml b/build.xml
index 58825ab..f23fae5 100644
--- a/build.xml
+++ b/build.xml
@@ -91,6 +91,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}" />
 
   <!--
        ===================================================================
@@ -119,6 +121,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>
@@ -126,6 +133,7 @@
   <path id="tests-classpath">
     <pathelement location="${build.classes}"/>
     <path refid="classpath"/>
+    <path refid="emma.lib"/>
   </path>
   <path id="tests-runtime-classpath">
     <path refid="tests-classpath"/>
@@ -1399,6 +1407,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}"/>
 
@@ -1507,6 +1528,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>
@@ -1815,7 +1837,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"
