Extract set_up_database() and build_test_library()