MACRO( ADD_EXAMPLES_FUNCTIONAL_TESTS example_test_path)
    STRING( REGEX MATCH "^(([^\\/]*)\\/)?(.*)\\.[^.]*$" dummy ${example_test_path} ) # remove py extension
    SET( test_name ${CMAKE_MATCH_3})
    IF( CMAKE_MATCH_2 )
        SET( test_name ${CMAKE_MATCH_2}.${test_name} )
    ENDIF()
    CMAKE_PATH( GET CMAKE_CURRENT_SOURCE_DIR FILENAME tests_folder  )
    SET( test_target test.functional.${tests_folder}.${test_name} )
    SET( sources_under_tests_path ${CMAKE_SOURCE_DIR}/src/hive_fork_manager/doc/examples )
    ADD_TEST( NAME ${test_target}
            COMMAND hive_fork_manager/test_examples.sh ${sources_under_tests_path} ${tests_folder}/${example_test_path} ${setup_scripts_dir_path} ${POSTGRES_PORT}
            WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests/integration/functional
            )
    MESSAGE( STATUS "Added functional examples tests '${test_target}'" )
ENDMACRO()

ADD_TEST( NAME test_update_script
        COMMAND ${PROJECT_SOURCE_DIR}/tests/integration/functional/hive_fork_manager/test_update_script.sh --haf_binaries_dir=${CMAKE_BINARY_DIR}
        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
        )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/schema_test.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/register_table_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/register_table_edit_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/register_table_edit_negative_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/register_table_edit_negative_rowid_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/register_table_drop_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/detach_table_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/attach_table_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/detach_negative_unregistered_table_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/detach_negative_not_empty_shadow_table_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/detach_all_tables_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/detach_all_negative_tables_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/detach_constraint_fk_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/attach_negative_unregistered_table_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/attach_all_tables_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/attach_all_negative_tables_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/drop_registered_table_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/drop_contraint_of_registered_table_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/register_table_no_context_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/register_table_public_schema_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/register_table_to_two_contexts_negative_test.sql )
 ADD_SQL_FUNCTIONAL_TEST(context_rewind/register_table_one_role_creates_context_and_second_add_tables.sql)
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/register_table_non_forking_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/register_table_search_path.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/contexts_limit_eq.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/contexts_limit_gt.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/contexts_limit_less.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/create_context_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/create_context_negative.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/context_next_block_test.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/trigger_on_insert_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/trigger_on_delete_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/trigger_on_update_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/trigger_on_truncate_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/trigger_on_insert_update_delete_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/trigger_on_multi_rows_insert_update_delete_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/trigger_3_tables_on_insert_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/trigger_3_tables_on_update_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/trigger_3_tables_on_delete_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/trigger_3_tables_on_truncate_test.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_insert_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_delete_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_update_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_truncate_test.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_insert_delete_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_insert_next_delete_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_update_delete_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_update_next_delete_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_update_some_rows_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_delete_insert_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_delete_next_insert_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_3_tables_insert_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_3_tables_delete_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_3_tables_update_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_3_tables_truncate_test.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_2_tables_schemas_insert_test.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_2_contexts_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_to_block_num_test.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_constraint_fk_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_constraint_unique_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_constraint_pk_test.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_complex_type_update_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_complex_type_insert_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/back_from_fork_complex_type_delete_test.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/set_irreversible_block_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/set_irreversible_block_negative_test.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/performance_insert_rows_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/performance_back_from_insert_rows_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/performance_delete_rows_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/performance_back_from_delete_rows_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/performance_update_rows_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/performance_back_from_update_rows_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/performance_truncate_rows_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/performance_back_from_truncate_rows_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/performance_insert_rows_one_by_one_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/performance_delete_rows_one_by_one_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( context_rewind/performance_update_rows_one_by_one_test.sql )

 ADD_SQL_FUNCTIONAL_TEST( context_rewind/identifier_validations.sql )

 ADD_SQL_FUNCTIONAL_TEST( hived_api/schema_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/back_from_fork_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/push_block_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/set_irreversible_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/copy_blocks_to_irreversible.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/copy_transactions_to_irreversible_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/copy_operations_to_irreversible_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/copy_signatures_to_irreversible_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/copy_applied_hardforks_to_irreversible_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/remove_obsolete_blocks_with_set_irreversible.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/remove_obsolete_blocks_with_set_irreversible_3_contexts.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/remove_obsolete_blocks_with_set_irreversible_no_contexts.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/end_massive_sync_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/set_irreversible_cleaning_events_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/disable_indexes_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/enable_indexes_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/enable_indexes_compare_saved_statement_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/remove_obsolete_end_massive_sync_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/remove_obsolete_end_massive_sync_with_app_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/set_irreversible_not_copy_reversible_data_from_old_fork_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/set_irreversible_not_copy_reversible_data_from_top_fork_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/set_irreversible_cleaning_old_fork_data_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/removing_inconsistent_irreversibele_data.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/not_removing_inconsistent_irreversibele_data.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/connect_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/copy_accounts_to_irreversible.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/copy_account_operations_to_irreversible.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/disable_indexes_reversible_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/enable_indexes_reversible_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/mark_irreversible_dirty_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/mark_irreversible_not_dirty_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/enable_fk_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/get_block_header_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/get_block_header_2_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/get_block_header_negative_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/get_block_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/get_block_2_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/get_block_3_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/get_block_reversible_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/get_block_range_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/are_any_indexes_missing_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/are_any_indexes_missing_2_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/are_fk_dropped_2_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/are_fk_dropped_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/autodetach.sql )
 ADD_SQL_FUNCTIONAL_TEST( hived_api/connect_test_not_remove_reversible.sql )

 ADD_SQL_FUNCTIONAL_TEST( app_api/create_context_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_remove_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_remove_negative_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_re_create_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_blocks_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_blocks_view_nonforking_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_transactions_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_transactions_view_non_forking_app_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_signatures_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_signatures_view_non_forking_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_operations_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_operations_view_non_forking_test.sql )
#ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_detached_save_block_num.sql )
#ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_detached_save_block_num.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_is_attached.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_is_attached.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_is_attached_negative.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_is_attached_negative.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_detached_get_block_num.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_detached_get_block_num.sql )

 ADD_SQL_FUNCTIONAL_TEST( app_api/app_set_current_block_num.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_get_set_current_block_num_negative.sql )

 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_new_block_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_next_block_process_new_block_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_negative.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_new_block_event_from_2.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_next_block_negative.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_new_block_event_2_contexts.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_BFF_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_BFF_wrong_id.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_group_process_BFF_wrong_id.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_BFF_in_irreversible_range.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_BFF_event_and_other.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_next_block_process_BFF_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_BFF_event_2_contexts.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_SET_IRREVERSIBLE_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_next_block_process_SET_IRREVERSIBLE_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_SET_IRREVERSIBLE_event_2_contexts.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_SET_IRREVERSIBLE_and_BFF_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_move_to_massive.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_attach.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_attach.sql)
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_attach_negative.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_attach_negative.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_detach.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_detach.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_MASSIVE_SYNC_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_fork_and_MASSIVE_SYNC_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_next_block_process_MASSIVE_SYNC_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_squash_MASSIVE_SYNC_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_next_block_process_squash_MASSIVE_SYNC_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_series_of_MASSIVE_SYNC.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_next_block_series_of_MASSIVE_SYNC.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_process_negative_MASSIVE_SYNC_event.sql)
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_non_forking_app.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_next_block_non_forking_app.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_exists.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/register_already_existed_table.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/register_already_existed_table_non_forking.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/register_already_existed_table_context_in_schema.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/register_already_registered_table_negative.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_get_irreversible_block_forking.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_get_irreversible_block_forking.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_get_irreversible_block_non_forking.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_get_irreversible_block_non_forking.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_unregister_table.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_unregister_table_with_dependency.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_blocks_view_nonforking_detach_context_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_blocks_view_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_signatures_view_non_forking_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_signatures_view_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_operations_view_non_forking_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_operations_view_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_transactions_view_non_forking_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_transactions_view_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_applied_hardforks_view_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_applied_hardforks_view_nonforking_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_applied_hardforks_view_nonforking_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_applied_hardforks_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_after_attach.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_next_block_after_attach.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_remove_detached_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/empty_blocks_and_views.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_accounts_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_accounts_view_not_from_1_block_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_accounts_view_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_accounts_view_nonforking_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_accounts_view_nonforking_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_account_operations_view_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_account_operations_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_account_operations_view_nonforking_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/context_account_operations_view_nonforking_detach_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/account_operations_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/accounts_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/blocks_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/transactions_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/signatures_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/operations_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/applied_hardforks_view_test.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_next_block_after_attach_2.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_next_block_after_attach_2.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_detach_after_next_block.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_detach_after_next_block.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/contexts_limit_gt.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_are_attached.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_group_check_sync.sql )

 ADD_SQL_FUNCTIONAL_TEST(app_api/app_context_set_non_forking.sql)
 ADD_SQL_FUNCTIONAL_TEST(app_api/app_contexts_set_non-forking.sql)
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_set_forking.sql )
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_set_forking.sql )
 ADD_SQL_FUNCTIONAL_TEST(app_api/app_contexts_set_non_forking_and_back_and_again.sql)
 ADD_SQL_FUNCTIONAL_TEST( app_api/app_contexts_set_forking_back_and_again.sql )

 ADD_SQL_FUNCTIONAL_TEST( app_api/app_context_create_and_hole_in_events.sql )

 ADD_SQL_FUNCTIONAL_TEST( app_api/operation_id.sql )
 ADD_SQL_FUNCTIONAL_TEST(app_api/vacuum_request.sql)

 ADD_SQL_FUNCTIONAL_TEST( application_loop/validate_stages.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/current_stage.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/current_live_stage.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/loop_commits.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/loop_update_current_stage.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/find_batch.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/end_block_range.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/current_batch.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/two_iterations.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/distance_to_hb_grew.sql)
 ADD_SQL_FUNCTIONAL_TEST( application_loop/two_iterations_no_reanalyzes.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/is_livesync.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/iteration_move_to_massive.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/iteration_move_to_massive2.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/negative.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/non_forking_app.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/process_BFF_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/process_BFF_in_irreversible_range.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/process_BFF_wrong_id.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/process_fork_and_MASSIVE_SYNC_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/process_SET_IRREVERSIBLE_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/process_squash_MASSIVE_SYNC_event.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/override_for_greater_batch.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/override_for_lesser_batch.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/limit.sql )
 ADD_SQL_FUNCTIONAL_TEST( application_loop/iteration_after_limit.sql )


 ADD_SQL_FUNCTIONAL_TEST( scenarios/massive_sync_live_blocks_and_fork.sql )
 ADD_SQL_FUNCTIONAL_TEST( scenarios/massive_sync_live_blocks_and_fork_non_forking_app.sql )

 ADD_SQL_FUNCTIONAL_TEST( state_providers/import_state_provider_negative.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/import_state_provider.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/drop_state_provider.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/accounts_start_state_provider.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/accounts_update_state_provider.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/keyauth_update_state_provider.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/metadata_start_state_provider.sql)
 ADD_SQL_FUNCTIONAL_TEST( state_providers/metadata_update_state_provider.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/metadata_drop_state_provider.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/update_state_provider.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/update_state_provider_attached.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/update_state_provider_negative.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/context_remove_and_state_provider.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/import_state_provider_non_fork.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/import_state_provider_negative_non_context_owner.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/import_state_provider_negative_non_context_owner_create_table.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/switch_state_provider_to_forkable.sql )
 ADD_SQL_FUNCTIONAL_TEST( state_providers/hash.sql )

 ADD_SQL_FUNCTIONAL_TEST( authorization/alice_access_to_bob_negative.sql )
 ADD_SQL_FUNCTIONAL_TEST( authorization/alice_access_events_infrustructure.sql )
 ADD_SQL_FUNCTIONAL_TEST( authorization/hived_access_alice_context_data.sql )
 ADD_SQL_FUNCTIONAL_TEST( authorization/api_protection.sql )
 ADD_SQL_FUNCTIONAL_TEST( authorization/massive_sync_live_blocks_and_fork.sql )
 ADD_SQL_FUNCTIONAL_TEST( authorization/alice_grant_to_hive_applications_group.sql )
 ADD_SQL_FUNCTIONAL_TEST( authorization/hived_to_api_access.sql )
 ADD_SQL_FUNCTIONAL_TEST( authorization/alice_access_to_head_block_views.sql )
 ADD_SQL_FUNCTIONAL_TEST( authorization/alice_cannot_change_context_owner_and_forking.sql)
 ADD_SQL_FUNCTIONAL_TEST( authorization/alice_access_to_bob.sql )
 ADD_SQL_FUNCTIONAL_TEST( authorization/can_impersonate.sql )
 ADD_SQL_FUNCTIONAL_TEST( authorization/alice_impersonal_access_context.sql )

 ADD_EXAMPLES_FUNCTIONAL_TESTS( examples/forking_application.py )
 ADD_EXAMPLES_FUNCTIONAL_TESTS( examples/non_forking_application.py )
 ADD_EXAMPLES_FUNCTIONAL_TESTS( examples/accounts_provider_application.py )
 ADD_EXAMPLES_FUNCTIONAL_TESTS( examples/accounts_provider_non_fork_application.py )

 ADD_SQL_FUNCTIONAL_TEST( shared_lib/get_impacted_accounts.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/get_impacted_balances.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/get_impacted_balances/test_no_virtual_operations.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/get_impacted_balances/test_virtual_operations.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/get_impacted_balances/test_operations_dependent_from_hf01.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/get_impacted_balances/test_not_supported_operations.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/get_impacted_balances/test_false.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/get_legacy_style_operation.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/extract_set_witness_properties.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/operation_to_jsonb_conversion.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/operation_to_jsontext_conversion.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/operation_from_json_conversion.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/operation_to_text_conversion.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/operation_variant_to_specific_operation_type_casts.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/calculate_schema_hash.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/get_vesting_balance/get_vesting_balance.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/convert_to_blocks_range/convert_to_blocks_range.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/convert_to_blocks_range/convert_to_block.sql )
 ADD_SQL_FUNCTIONAL_TEST( shared_lib/test_stack_bug.sql )

 ADD_SQL_FUNCTIONAL_TEST( sanity_check/test_tables_and_sequences_properly_flagged_for_dump.sql )

 ADD_SQL_FUNCTIONAL_TEST(deprecated/attach_detach_with_function/app_context_attach.sql)
 ADD_SQL_FUNCTIONAL_TEST(deprecated/attach_detach_with_function/app_context_attach_negative.sql)
 ADD_SQL_FUNCTIONAL_TEST(deprecated/attach_detach_with_function/app_context_is_attached.sql)
 ADD_SQL_FUNCTIONAL_TEST(deprecated/attach_detach_with_function/app_context_is_attached_negative.sql)
 ADD_SQL_FUNCTIONAL_TEST(deprecated/attach_detach_with_function/app_contexts_group_attach.sql)
 ADD_SQL_FUNCTIONAL_TEST(deprecated/attach_detach_with_function/app_contexts_group_attach_negative.sql)
 ADD_SQL_FUNCTIONAL_TEST(deprecated/attach_detach_with_function/app_contexts_group_is_attached.sql)
 ADD_SQL_FUNCTIONAL_TEST(deprecated/attach_detach_with_function/app_contexts_group_is_attached_negative.sql)
 ADD_SQL_FUNCTIONAL_TEST(deprecated/attach_detach_with_function/app_contexts_group_next_block_after_attach.sql)
 ADD_SQL_FUNCTIONAL_TEST(deprecated/attach_detach_with_function/app_next_block_after_attach.sql)
 ADD_SQL_FUNCTIONAL_TEST(deprecated/attach_detach_with_function/api_protection.sql )

 ADD_SQL_FUNCTIONAL_TEST(application_log/attach_context.sql)
 ADD_SQL_FUNCTIONAL_TEST(application_log/change_stage.sql)
 ADD_SQL_FUNCTIONAL_TEST(application_log/create_context.sql)
 ADD_SQL_FUNCTIONAL_TEST(application_log/detach_context.sql)
 ADD_SQL_FUNCTIONAL_TEST(application_log/hive_log_contexts_on_no_stage_app.sql)
 ADD_SQL_FUNCTIONAL_TEST(application_log/hive_log_contexts_simple.sql)
 ADD_SQL_FUNCTIONAL_TEST(application_log/remove_context.sql)


