diff --git a/CMakeLists.txt b/CMakeLists.txt
index 122179ad413d770454c54412f98687d0eb1da08c..9890271b149df0c35d908aef5305a7b4fedf8a21 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -146,7 +146,6 @@ ELSE(DEFINED PackageOnly)
   add_subdirectory(rdbms)
   add_subdirectory(scheduler)
   add_subdirectory(tapeserver)
-  add_subdirectory(tests)
   
   #Generate version information
   configure_file(${PROJECT_SOURCE_DIR}/version.hpp.in
@@ -178,8 +177,16 @@ endif (${COMPILE_PACKAGING} STREQUAL "1")
 configure_file(tests/valgrind.suppr tests/valgrind.suppr COPYONLY)
 configure_file(tests/helgrind.suppr tests/helgrind.suppr COPYONLY)
 set(VALGRIND valgrind)
-set(VALGRIND_OPTS --track-fds=yes --leak-check=full --demangle=yes --gen-suppressions=all --show-reachable=yes --error-exitcode=1 --suppressions=tests/valgrind.suppr)
-set(HELGRIND_OPTS -v --demangle=yes --gen-suppressions=all --num-callers=25 --conflict-cache-size=30000000 --error-exitcode=1 --suppressions=tests/helgrind.suppr --sim-hints=no-nptl-pthread-stackcache)
+set(VALGRIND_OPTS "--track-fds=yes --leak-check=full --demangle=yes --gen-suppressions=all --show-reachable=yes --error-exitcode=1")
+set(VALGRIND_OPTS_W_SUPPR ${VALGRIND_OPTS} --suppressions=tests/valgrind.suppr)
+
+set(HELGRIND_OPTS "-v --demangle=yes --gen-suppressions=all --num-callers=25 --conflict-cache-size=30000000 --error-exitcode=1  --sim-hints=no-nptl-pthread-stackcache")
+set(HELGRIND_OPTS_W_SUPPR ${HELGRIND_OPTS} --suppressions=tests/helgrind.suppr)
+
+IF(NOT DEFINED PackageOnly)
+  add_subdirectory(tests)
+ENDIF(NOT DEFINED PackageOnly)
+
 add_custom_target(fullunittests
   tests/cta-unitTests
   COMMAND tests/cta-unitTests-multiProcess
diff --git a/tests/cta-valgrindUnitTests.sh.in b/tests/cta-valgrindUnitTests.sh.in
index b65af459392372df77d78c5925c2f7694dd98e61..6e9fc6262c360ec8625374bd9d5ced91a550a605 100644
--- a/tests/cta-valgrindUnitTests.sh.in
+++ b/tests/cta-valgrindUnitTests.sh.in
@@ -5,18 +5,16 @@ set -e
 
 /usr/bin/cta-unitTests-multiProcess
 
-valgrind --track-fds=yes --leak-check=full --demangle=yes --gen-suppressions=all --show-reachable=yes \
-  --error-exitcode=1 --suppressions=/usr/share/cta-@CTA_VERSION@/unittest/valgrind.suppr              \
+valgrind @VALGRIND_OPTS@ --suppressions=/usr/share/cta-@CTA_VERSION@/unittest/valgrind.suppr         \
   /usr/bin/cta-unitTests
 
-valgrind --tool=helgrind -v --demangle=yes --gen-suppressions=all --conflict-cache-size=10000000      \
-  --error-exitcode=1 --suppressions=/usr/share/cta-@CTA_VERSION@/unittest/helgrind.suppr              \
+valgrind --tool=helgrind @HELGRIND_OPTS@                                                             \
+  --suppressions=/usr/share/cta-@CTA_VERSION@/unittest/helgrind.suppr                                \
   /usr/bin/cta-unitTests
 
-valgrind --track-fds=yes --leak-check=full --demangle=yes --gen-suppressions=all --show-reachable=yes \
-  --error-exitcode=1 --suppressions=/usr/share/cta-@CTA_VERSION@/unittest/valgrind.suppr              \
+valgrind @VALGRIND_OPTS@ --suppressions=/usr/share/cta-@CTA_VERSION@/unittest/valgrind.suppr         \
   --child-silent-after-fork=yes /usr/bin/cta-unitTests-multiProcess
 
-valgrind --tool=helgrind -v --demangle=yes --gen-suppressions=all --conflict-cache-size=10000000      \
-  --error-exitcode=1 --suppressions=/usr/share/cta-@CTA_VERSION@/unittest/helgrind.suppr              \
+valgrind --tool=helgrind @HELGRIND_OPTS@                                                             \
+  --suppressions=/usr/share/cta-@CTA_VERSION@/unittest/helgrind.suppr                                \
   /usr/bin/cta-unitTests-multiProcess