diff --git a/utilities/filterCompileCommands.py b/utilities/filterCompileCommands.py
index d39a7fac80e997b9cca66ce47a6b2e14eeaa9286..3b0a08e7f932c224ce36d3845425937fadc08057 100755
--- a/utilities/filterCompileCommands.py
+++ b/utilities/filterCompileCommands.py
@@ -4,7 +4,7 @@ import json
 import sys
 
 def compileCommandSelector(x):
-   return not ("extern" in x["file"])
+   return not (("extern" in x["file"]) or ("tests" in x["file"]))
 
 if __name__ == "__main__":
    if (len(sys.argv) != 2):