mirror of
https://github.com/latentPrion/cppbessot.git
synced 2026-06-23 15:18:37 +00:00
Add tests db DB_TARGET for tests
This commit is contained in:
@@ -3,10 +3,12 @@ function(_cppbessot_db_action_test_common_args out_var test_name script_name)
|
||||
"-DCPPBESSOT_TEST_NAME=${test_name}"
|
||||
"-DCPPBESSOT_TEST_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}"
|
||||
"-DCPPBESSOT_TEST_MODULE_SOURCE_DIR=${PROJECT_SOURCE_DIR}"
|
||||
"-DCPPBESSOT_DB_ACTION_TEST_PGSQL_ADMIN_CONNSTR=${CPPBESSOT_DB_ACTION_TEST_PGSQL_ADMIN_CONNSTR}"
|
||||
"-DCPPBESSOT_DB_PGSQL_DEV_CONNSTR=${CPPBESSOT_DB_PGSQL_DEV_CONNSTR}"
|
||||
"-DCPPBESSOT_DB_PGSQL_PROD_CONNSTR=${CPPBESSOT_DB_PGSQL_PROD_CONNSTR}"
|
||||
"-DCPPBESSOT_DB_PGSQL_PRODDEV_CONNSTR=${CPPBESSOT_DB_PGSQL_PRODDEV_CONNSTR}"
|
||||
"-DCPPBESSOT_DB_PGSQL_TESTS_CONNSTR=${CPPBESSOT_DB_PGSQL_TESTS_CONNSTR}"
|
||||
"-DCPPBESSOT_DB_PGSQL_CLONE_PROD_TO_PRODDEV_COMMAND=${CPPBESSOT_DB_PGSQL_CLONE_PROD_TO_PRODDEV_COMMAND}"
|
||||
"-DCPPBESSOT_DB_SQLITE_CLONE_PROD_TO_PRODDEV_COMMAND=${CPPBESSOT_DB_SQLITE_CLONE_PROD_TO_PRODDEV_COMMAND}"
|
||||
"-DCPPBESSOT_DB_ACTION_TEST_SCRIPT=${CMAKE_CURRENT_SOURCE_DIR}/scripts/${script_name}")
|
||||
set(${out_var} "${_args}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
@@ -25,8 +27,8 @@ function(cppbessot_add_real_pgsql_db_action_test test_name script_name)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if("${CPPBESSOT_DB_ACTION_TEST_PGSQL_ADMIN_CONNSTR}" STREQUAL "")
|
||||
message(STATUS "Skipping real PostgreSQL db-action test `${test_name}` because CPPBESSOT_DB_ACTION_TEST_PGSQL_ADMIN_CONNSTR is empty.")
|
||||
if("${CPPBESSOT_DB_PGSQL_PRODDEV_CONNSTR}" STREQUAL "")
|
||||
message(STATUS "Skipping real PostgreSQL db-action test `${test_name}` because CPPBESSOT_DB_PGSQL_PRODDEV_CONNSTR is empty.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
@@ -51,26 +53,27 @@ cppbessot_add_db_action_test(cppbessot_db_action_missing_migrate_with missing_mi
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_missing_migration_dir missing_migration_dir.cmake)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_proddev_createfrom_illegal proddev_createfrom_illegal.cmake)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_sqlite_createfrom sqlite_createfrom.cmake)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_sqlite_tests_createfrom sqlite_tests_createfrom.cmake)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_sqlite_invalid_sql sqlite_invalid_sql.cmake)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_sqlite_migrate sqlite_migrate.cmake)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_sqlite_proddev_stale sqlite_proddev_stale.cmake)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_sqlite_proddev_clone sqlite_proddev_clone.cmake)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_pgsql_createfrom_mock pgsql_createfrom_mock.cmake)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_pgsql_tests_createfrom_mock pgsql_tests_createfrom_mock.cmake)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_pgsql_migrate_order pgsql_migrate_order.cmake)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_pgsql_stale_abort pgsql_stale_abort.cmake)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_backfill_env_no_structural backfill_env_no_structural.cmake)
|
||||
cppbessot_add_real_pgsql_db_action_test(
|
||||
cppbessot_db_action_pgsql_createfrom_real
|
||||
pgsql_createfrom_real.cmake
|
||||
CPPBESSOT_DB_PGSQL_DEV_CONNSTR)
|
||||
CPPBESSOT_DB_PGSQL_PRODDEV_CONNSTR)
|
||||
cppbessot_add_real_pgsql_db_action_test(
|
||||
cppbessot_db_action_pgsql_migrate_real
|
||||
pgsql_migrate_real.cmake
|
||||
CPPBESSOT_DB_PGSQL_DEV_CONNSTR)
|
||||
CPPBESSOT_DB_PGSQL_PRODDEV_CONNSTR)
|
||||
cppbessot_add_real_pgsql_db_action_test(
|
||||
cppbessot_db_action_pgsql_proddev_clone_real
|
||||
pgsql_proddev_clone_real.cmake
|
||||
CPPBESSOT_DB_PGSQL_PROD_CONNSTR
|
||||
CPPBESSOT_DB_PGSQL_PRODDEV_CONNSTR)
|
||||
cppbessot_add_real_pgsql_db_action_test(
|
||||
cppbessot_db_action_pgsql_proddev_stale_real
|
||||
@@ -79,5 +82,5 @@ cppbessot_add_real_pgsql_db_action_test(
|
||||
cppbessot_add_real_pgsql_db_action_test(
|
||||
cppbessot_db_action_pgsql_backfill_real
|
||||
pgsql_backfill_real.cmake
|
||||
CPPBESSOT_DB_PGSQL_DEV_CONNSTR)
|
||||
CPPBESSOT_DB_PGSQL_PRODDEV_CONNSTR)
|
||||
cppbessot_add_db_action_test(cppbessot_db_action_regression regression_targets.cmake)
|
||||
|
||||
Reference in New Issue
Block a user