Add UT for reshaper.db
Fix a bug in build_db_file
Add UT for build_db_file
Add UT for build_db_file with include.
Fix circular dependency bug and add UT.
Remove debugging code.
Fix cursor bug.

This bug will happen when using macro to define a lot of things inside.