X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/5e4339fa861d8f6aadf5cd731e8c38dd569aa013..7ef8de40e0bcdd931f5a400fd586fee3a1aaaeea:/tests/CMakeLists.txt diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2f9283a8..8fc662c6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,13 +1,3 @@ -set ( CPP_FILES main.cpp - test_conffiles.cpp - test_fee_charge_rules.cpp - test_reconnect_on_tariff_change.cpp - test_disable_session_log.cpp - test_filter_params_log.cpp - ../projects/stargazer/tariff_impl.cpp - ../projects/stargazer/user_impl.cpp - ../projects/stargazer/user_property.cpp ) - set ( THREADS_PREFER_PTHREAD_FLAG ON ) find_package ( Threads REQUIRED ) find_package ( Boost REQUIRED unit_test_framework ) @@ -36,10 +26,35 @@ target_link_libraries ( test_tariff crypto common Boost::unit_test_framework ) target_include_directories ( test_tariff PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ../projects/stargazer ) add_test ( tariff test_tariff ) -add_executable ( tests ${CPP_FILES} ) - -target_link_libraries ( tests conffiles crypto logger scriptexecuter common Threads::Threads ) - -target_include_directories ( tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ../projects/stargazer ) - -add_test ( tests tests ) +add_executable ( test_conffiles test_conffiles.cpp ) +target_link_libraries ( test_conffiles conffiles Boost::unit_test_framework ) +add_test ( stgconffiles test_conffiles ) + +add_executable ( test_fee_charge_rules test_fee_charge_rules.cpp ../projects/stargazer/user_impl.cpp ../projects/stargazer/tariff_impl.cpp ../projects/stargazer/user_property.cpp ) +target_link_libraries ( test_fee_charge_rules logger scriptexecuter common Boost::unit_test_framework Threads::Threads ) +target_include_directories ( test_fee_charge_rules PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ../projects/stargazer ) +add_test ( fee_charge_rules test_fee_charge_rules ) + +add_executable ( test_reconnect_on_tariff_change test_reconnect_on_tariff_change.cpp ../projects/stargazer/user_impl.cpp ../projects/stargazer/tariff_impl.cpp ../projects/stargazer/user_property.cpp ) +target_link_libraries ( test_reconnect_on_tariff_change logger scriptexecuter common Boost::unit_test_framework Threads::Threads ) +target_include_directories ( test_reconnect_on_tariff_change PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ../projects/stargazer ) +add_test ( reconnect_on_tariff_change test_reconnect_on_tariff_change ) + +add_executable ( test_disable_session_log test_disable_session_log.cpp ../projects/stargazer/user_impl.cpp ../projects/stargazer/tariff_impl.cpp ../projects/stargazer/user_property.cpp ) +target_link_libraries ( test_disable_session_log logger scriptexecuter common Boost::unit_test_framework Threads::Threads ) +target_include_directories ( test_disable_session_log PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ../projects/stargazer ) +add_test ( disable_session_log test_disable_session_log ) + +add_executable ( test_filter_params_log test_filter_params_log.cpp ../projects/stargazer/user_impl.cpp ../projects/stargazer/tariff_impl.cpp ../projects/stargazer/user_property.cpp ) +target_link_libraries ( test_filter_params_log logger scriptexecuter common Boost::unit_test_framework Threads::Threads ) +target_include_directories ( test_filter_params_log PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ../projects/stargazer ) +add_test ( filter_params_log test_filter_params_log ) + +add_executable ( test_subscriptions test_subscriptions.cpp ) +target_link_libraries ( test_subscriptions Boost::unit_test_framework ) +add_test ( subscriptions test_subscriptions ) + +add_executable ( test_async_pool test_async_pool.cpp ../projects/stargazer/async_pool.cpp ) +target_include_directories ( test_async_pool PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ../projects/stargazer ) +target_link_libraries ( test_async_pool Boost::unit_test_framework Threads::Threads ) +add_test ( async_pool test_async_pool )