correcting bug related to db test in CMakeLists.txt