diff --git a/Reconstruction/Jet/JetRec/CMakeLists.txt b/Reconstruction/Jet/JetRec/CMakeLists.txt
index c37361923ea85d8f008a887adafc6276e62abed3..c551d427310a8cdb17f5ed94374db1972f580ae6 100644
--- a/Reconstruction/Jet/JetRec/CMakeLists.txt
+++ b/Reconstruction/Jet/JetRec/CMakeLists.txt
@@ -87,7 +87,7 @@ atlas_add_test(JetClustererTest
     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS}
     LINK_LIBRARIES ${ROOT_LIBRARIES} ${GTEST_LIBRARIES} JetRecLib )
 
-if ( NOT GENERATIONBASE AND NOT XAOD_STANDALONE )
+if ( NOT GENERATIONBASE AND NOT XAOD_STANDALONE AND NOT XAOD_ANALYSIS )
    atlas_add_test(JetRecAlg_Test SCRIPT share/JetRecAlgTestCfg.py )
 endif()
 
diff --git a/Reconstruction/Jet/JetReclustering/CMakeLists.txt b/Reconstruction/Jet/JetReclustering/CMakeLists.txt
index 2290702cc364831799bd6265306777f7e12b19e5..2e8550ea5b07382221121f6998f4b9cebc10fd18 100644
--- a/Reconstruction/Jet/JetReclustering/CMakeLists.txt
+++ b/Reconstruction/Jet/JetReclustering/CMakeLists.txt
@@ -34,7 +34,7 @@ atlas_add_dictionary( JetReclusteringDict
    LINK_LIBRARIES JetReclusteringLib )
 
 # Test(s) in the package:
-if( NOT XAOD_STANDALONE )
+if( NOT XAOD_STANDALONE AND NOT XAOD_ANALYSIS )
    atlas_add_test( ut_JetReclusteringTool_test
       SOURCES test/ut_JetReclusteringTool_test.cxx
       LINK_LIBRARIES xAODRootAccess AsgTools JetInterface xAODJet