From 60a8642fc0159cd680c79753c66d6ff245812e98 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 18 Oct 2019 21:07:48 +0900 Subject: [PATCH] Add exclude selection of coverage Change-Id: I7e000f62fb33b4eb5d4445014ab9092b5de9a619 Signed-off-by: Jihoon Kim --- client/ma.c | 6 ++++++ client/ma_client.c | 24 ++++++++++++++++++++++++ client/ma_dbus.c | 5 ++++- common/ma_config_mgr.c | 6 +++--- common/multi_assistant_settings.c | 2 ++ 5 files changed, 39 insertions(+), 4 deletions(-) diff --git a/client/ma.c b/client/ma.c index ae5ff0b..c4aa5d5 100644 --- a/client/ma.c +++ b/client/ma.c @@ -514,6 +514,7 @@ static void __ma_notify_state_changed(void * data) } } +//LCOV_EXCL_START int __ma_cb_active_state_changed(int state) { ma_active_state_changed_cb callback = NULL; @@ -815,6 +816,7 @@ int __ma_cb_preprocessing_result_received(bool result) return 0; } +//LCOV_EXCL_STOP int ma_get_state(ma_state_e* state) { @@ -1546,6 +1548,7 @@ int ma_unset_wakeup_engine_command_cb(void) return MA_ERROR_NONE; } +//LCOV_EXCL_START bool __get_assistant_enable_status(const char* app_id, char* assistants) { char* rest = assistants; char* temp = strtok_r(rest, ";", &rest); @@ -1578,6 +1581,7 @@ int __get_assistant_info_cb(const char* app_id, const char* name, SLOG(LOG_DEBUG, TAG_MAC, "[Client DEBUG] get assistant info cb end"); return 0; } +//LCOV_EXCL_STOP int ma_assistant_info_foreach_assistants(ma_assistant_info_list_cb callback, void* user_data) { if (0 != __ma_get_feature_enabled()) { @@ -1950,6 +1954,7 @@ int ma_unset_audio_streaming_data_section_changed_cb(void) return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_set_preprocessing_result_received_cb(ma_preprocessing_result_received_cb callback, void* user_data) { if (0 != __ma_get_feature_enabled()) { @@ -2006,3 +2011,4 @@ int ma_unset_preprocessing_result_received_cb(void) return MA_ERROR_NONE; } +//LCOV_EXCL_STOP diff --git a/client/ma_client.c b/client/ma_client.c index 1c00ea5..be0a7af 100644 --- a/client/ma_client.c +++ b/client/ma_client.c @@ -279,6 +279,7 @@ int ma_client_get_previous_state(ma_h ma, ma_state_e* current_state, ma_state_e* return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_client_set_error(ma_h ma, ma_error_e reason) { ma_client_s* client = __client_get(ma); @@ -302,6 +303,7 @@ int ma_client_get_error(ma_h ma, ma_error_e* reason) return MA_ERROR_NONE; } +//LCOV_EXCL_STOP int ma_client_set_ui_pid(ma_h ma, int pid) { @@ -355,6 +357,7 @@ int ma_client_set_lang_changed_cb(ma_h ma, ma_language_changed_cb callback, void return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_client_get_lang_changed_cb(ma_h ma, ma_language_changed_cb* callback, void** user_data) { ma_client_s* client = __client_get(ma); @@ -367,6 +370,7 @@ int ma_client_get_lang_changed_cb(ma_h ma, ma_language_changed_cb* callback, voi return MA_ERROR_NONE; } +//LCOV_EXCL_STOP int ma_client_set_audio_streaming_cb(ma_h ma, ma_audio_streaming_cb callback, void* user_data) { @@ -381,6 +385,7 @@ int ma_client_set_audio_streaming_cb(ma_h ma, ma_audio_streaming_cb callback, vo return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_client_get_audio_streaming_cb(ma_h ma, ma_audio_streaming_cb* callback, void** user_data) { ma_client_s* client = __client_get(ma); @@ -393,6 +398,7 @@ int ma_client_get_audio_streaming_cb(ma_h ma, ma_audio_streaming_cb* callback, v return MA_ERROR_NONE; } +//LCOV_EXCL_STOP int ma_client_set_error_cb(ma_h ma, ma_error_cb callback, void* user_data) { @@ -407,6 +413,7 @@ int ma_client_set_error_cb(ma_h ma, ma_error_cb callback, void* user_data) return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_client_get_error_cb(ma_h ma, ma_error_cb* callback, void** user_data) { ma_client_s* client = __client_get(ma); @@ -432,6 +439,7 @@ int ma_client_set_client_active_state(ma_h ma, ma_active_state_e state) return MA_ERROR_NONE; } +//LCOV_EXCL_STOP int ma_client_get_client_active_state(ma_h ma, ma_active_state_e* state) { @@ -445,6 +453,7 @@ int ma_client_get_client_active_state(ma_h ma, ma_active_state_e* state) return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_client_get_previous_active_state(ma_h ma, ma_active_state_e* current_state, ma_active_state_e* previous_state) { ma_client_s* client = __client_get(ma); @@ -457,6 +466,7 @@ int ma_client_get_previous_active_state(ma_h ma, ma_active_state_e* current_stat return MA_ERROR_NONE; } +//LCOV_EXCL_STOP int ma_client_set_active_state_changed_cb(ma_h ma, ma_active_state_changed_cb callback, void* user_data) { @@ -471,6 +481,7 @@ int ma_client_set_active_state_changed_cb(ma_h ma, ma_active_state_changed_cb ca return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_client_get_active_state_changed_cb(ma_h ma, ma_active_state_changed_cb* callback, void** user_data) { ma_client_s* client = __client_get(ma); @@ -483,6 +494,7 @@ int ma_client_get_active_state_changed_cb(ma_h ma, ma_active_state_changed_cb* c return MA_ERROR_NONE; } +//LCOV_EXCL_STOP int ma_client_set_wakeup_engine_command_cb(ma_h ma, ma_wakeup_engine_command_cb callback, void* user_data) { @@ -497,6 +509,7 @@ int ma_client_set_wakeup_engine_command_cb(ma_h ma, ma_wakeup_engine_command_cb return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_client_get_wakeup_engine_command_cb(ma_h ma, ma_wakeup_engine_command_cb* callback, void** user_data) { ma_client_s* client = __client_get(ma); @@ -509,6 +522,7 @@ int ma_client_get_wakeup_engine_command_cb(ma_h ma, ma_wakeup_engine_command_cb* return MA_ERROR_NONE; } +//LCOV_EXCL_STOP int ma_client_set_preprocessing_information_changed_cb(ma_h ma, ma_preprocessing_information_changed_cb callback, void* user_data) { @@ -523,6 +537,7 @@ int ma_client_set_preprocessing_information_changed_cb(ma_h ma, ma_preprocessing return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_client_get_preprocessing_information_changed_cb(ma_h ma, ma_preprocessing_information_changed_cb* callback, void** user_data) { ma_client_s* client = __client_get(ma); @@ -535,6 +550,7 @@ int ma_client_get_preprocessing_information_changed_cb(ma_h ma, ma_preprocessing return MA_ERROR_NONE; } +//LCOV_EXCL_STOP int ma_client_set_audio_streaming_data_section_changed_cb(ma_h ma, ma_audio_streaming_data_section_changed_cb callback, void* user_data) { @@ -549,6 +565,7 @@ int ma_client_set_audio_streaming_data_section_changed_cb(ma_h ma, ma_audio_stre return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_client_get_audio_streaming_data_section_changed_cb(ma_h ma, ma_audio_streaming_data_section_changed_cb* callback, void** user_data) { ma_client_s* client = __client_get(ma); @@ -587,6 +604,7 @@ int ma_client_get_preprocessing_result_received_cb(ma_h ma, ma_preprocessing_res return MA_ERROR_NONE; } +//LCOV_EXCL_STOP #ifdef MA_PREPROCESSING_SEQUENTIAL_MODE int ma_client_set_preprocessing_allow_mode(ma_h ma, ma_preprocessing_allow_mode_e mode) @@ -601,6 +619,7 @@ int ma_client_set_preprocessing_allow_mode(ma_h ma, ma_preprocessing_allow_mode_ return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_client_get_preprocessing_allow_mode(ma_h ma, ma_preprocessing_allow_mode_e* mode) { ma_client_s* client = __client_get(ma); @@ -612,6 +631,7 @@ int ma_client_get_preprocessing_allow_mode(ma_h ma, ma_preprocessing_allow_mode_ return MA_ERROR_NONE; } +//LCOV_EXCL_STOP int ma_client_set_audio_streaming_data_type(ma_h ma, ma_audio_streaming_data_type_e type) { @@ -625,6 +645,7 @@ int ma_client_set_audio_streaming_data_type(ma_h ma, ma_audio_streaming_data_typ return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_client_get_audio_streaming_data_type(ma_h ma, ma_audio_streaming_data_type_e* type) { ma_client_s* client = __client_get(ma); @@ -636,6 +657,7 @@ int ma_client_get_audio_streaming_data_type(ma_h ma, ma_audio_streaming_data_typ return MA_ERROR_NONE; } +//LCOV_EXCL_STOP int ma_client_set_preprocessing_result_received(ma_h ma, bool received) { @@ -649,6 +671,7 @@ int ma_client_set_preprocessing_result_received(ma_h ma, bool received) return MA_ERROR_NONE; } +//LCOV_EXCL_START int ma_client_get_preprocessing_result_received(ma_h ma, bool* received) { ma_client_s* client = __client_get(ma); @@ -682,6 +705,7 @@ int ma_client_push_preprocessing_audio_data(ma_h ma, speech_data* data) return MA_ERROR_NONE; } +//LCOV_EXCL_STOP int ma_client_pop_preprocessing_audio_data(ma_h ma, speech_data** data) { diff --git a/client/ma_dbus.c b/client/ma_dbus.c index 5668006..7df74c9 100644 --- a/client/ma_dbus.c +++ b/client/ma_dbus.c @@ -425,6 +425,7 @@ int ma_dbus_close_connection() return 0; } +//LCOV_EXCL_START int ma_dbus_reconnect() { if (!g_conn_sender || !g_conn_listener) { @@ -455,7 +456,9 @@ int ma_dbus_reconnect() SLOG(LOG_DEBUG, TAG_MAC, "[DBUS] Reconnect"); //LCOV_EXCL_LINE } - return 0;} + return 0; +} +//LCOV_EXCL_STOP static int __dbus_check() { diff --git a/common/ma_config_mgr.c b/common/ma_config_mgr.c index b826e21..f2ad3ae 100644 --- a/common/ma_config_mgr.c +++ b/common/ma_config_mgr.c @@ -31,11 +31,12 @@ typedef struct { //static pthread_mutex_t ma_config_mgr_mutex = PTHREAD_MUTEX_INITIALIZER; - +//LCOV_EXCL_START int ma_config_mgr_initialize(int uid) { return 0; } + int ma_config_mgr_deinitialize(int uid) { return 0; @@ -227,7 +228,6 @@ int ma_config_mgr_change_assistant(const char* app_id) return 0; } - int ma_config_mgr_set_lang_cb(int uid, ma_config_lang_changed_cb lang_cb) { return 0; @@ -237,4 +237,4 @@ int ma_config_mgr_unset_lang_cb(int uid) { return 0; } - +//LCOV_EXCL_STOP diff --git a/common/multi_assistant_settings.c b/common/multi_assistant_settings.c index f50ce48..39942f2 100644 --- a/common/multi_assistant_settings.c +++ b/common/multi_assistant_settings.c @@ -19,6 +19,7 @@ #define MAX_LEN 256 +//LCOV_EXCL_START int ma_settings_is_multiple_mode(bool *multiple) { int res; int current_multiple; @@ -191,3 +192,4 @@ int ma_settings_set_default_voice_assistant(const char* app_id) { } return res; } +//LCOV_EXCL_STOP \ No newline at end of file -- 2.34.1