diff --git a/build.xml b/build.xml
index 9f63ade5217098c6f964dfb5b7e68cb7709daa9e..483d3e2ce91e31e2c7bb23cf6d5ed58768e99ade 100644
--- a/build.xml
+++ b/build.xml
@@ -40,7 +40,7 @@
     <exec command="phpcs --standard=PEAR --extensions=php --report=checkstyle ${srcdir}/module/VuFind/src &gt; ${builddir}/reports/checkstyle.xml" escape="false" />
 
     <!-- PHPUnit -->
-    <exec dir="${srcdir}/tests" command="phpunit -dzend.enable_gc=0 --log-junit ${builddir}/reports/phpunit.xml --coverage-clover ${builddir}/reports/coverage/clover.xml --coverage-html ${builddir}/reports/coverage/" outputProperty="PHPUNITOUTPUT" />
+    <exec dir="${srcdir}/tests" command="VUFIND_LOCAL_DIR=${srcdir}/local phpunit -dzend.enable_gc=0 --log-junit ${builddir}/reports/phpunit.xml --coverage-clover ${builddir}/reports/coverage/clover.xml --coverage-html ${builddir}/reports/coverage/" outputProperty="PHPUNITOUTPUT" />
     <echo message="${PHPUNITOUTPUT}" />
 
   </target>