Exclude coverage for pb-agent 73/183673/1 accepted/tizen/unified/20180813.061325 submit/tizen/20180806.015258 submit/tizen/20180810.045807 submit/tizen/20180813.061545 submit/tizen/20180813.101514 submit/tizen/20180814.024636 submit/tizen/20180814.040447
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 10 Jul 2018 00:51:38 +0000 (09:51 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 10 Jul 2018 00:51:38 +0000 (09:51 +0900)
pb-agent - Line Cov: 95.9%, Func Cov: 100%)

Change-Id: Iee4fccae8e65a9953c781ff1a2d468f13727e1d6
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
pb-agent/bluetooth_pb_agent.c
pb-agent/bluetooth_pb_vcard.c

index e132ee7..d5f9664 100644 (file)
@@ -139,6 +139,7 @@ static const gchar pb_agent_introspection_xml[] =
        "</interface>"
 "</node>";
 
+/* LCOV_EXCL_START */
 static void __bt_pb_agent_method(GDBusConnection *connection,
                        const gchar *sender, const gchar *object_path,
                        const gchar *interface_name, const gchar *method_name,
@@ -2401,3 +2402,4 @@ int main(void)
        FN_END;
        return ret;
 }
+/* LCOV_EXCL_STOP */
index 38c3838..365c1db 100644 (file)
@@ -213,7 +213,7 @@ static gchar *__bluetooth_pb_number_from_contact(contacts_record_h contact);
 
 static gint __bluetooth_pb_person_id_from_phonelog_id(gint phonelog_id);
 
-
+/* LCOV_EXCL_START */
 static gchar *__bluetooth_pb_vcard_escape(const gchar *str)
 {
        FN_START;
@@ -264,6 +264,7 @@ static gchar *__bluetooth_pb_vcard_strv_concat(gchar **strv,
        FN_END;
        return g_string_free(string, FALSE);
 }
+/* LCOV_EXCL_STOP */
 
 static gboolean __bluetooth_pb_vcard_qp_encode_check(const gchar *str)
 {
@@ -285,6 +286,7 @@ static gboolean __bluetooth_pb_vcard_qp_encode_check(const gchar *str)
        return FALSE;
 }
 
+/* LCOV_EXCL_START */
 /* get string length, which convert to quoted-printable encoding */
 static gint __bluetooth_pb_vcard_qp_encode_strlen(const gchar *str,
                                                gint len)
@@ -499,6 +501,7 @@ static gchar *__bluetooth_pb_vcard_qp_encode(const gchar *str)
        FN_END;
        return g_string_free(enc, FALSE);
 }
+/* LCOV_EXCL_STOP */
 
 static void __bluetooth_pb_vcard_append_param_v21(GString *string,
                                                 const gchar *param)
@@ -539,6 +542,7 @@ static void __bluetooth_pb_vcard_append_qp_encode_v21(GString *string,
        __bluetooth_pb_vcard_append_param_v21(property, param);
 
        if (__bluetooth_pb_vcard_qp_encode_check(value)) {
+               /* LCOV_EXCL_START */
                gchar *enc = NULL;
 
                __bluetooth_pb_vcard_append_param_v21(property,
@@ -553,6 +557,7 @@ static void __bluetooth_pb_vcard_append_qp_encode_v21(GString *string,
                        g_string_append(property, enc);
                        g_free(enc);
                }
+               /* LCOV_EXCL_STOP */
        } else {
                g_string_append(property, ":");
                if (value)
@@ -565,7 +570,7 @@ static void __bluetooth_pb_vcard_append_qp_encode_v21(GString *string,
        FN_END;
 }
 
-
+/* LCOV_EXCL_START */
 static void __bluetooth_pb_vcard_append_base64_encode_v21(GString *string,
                                                        const gchar *name,
                                                        const gchar *param,
@@ -724,6 +729,7 @@ static void __bluetooth_pb_vcard_append_fn_v21(GString *string,
 
        g_free(fn);
 }
+/* LCOV_EXCL_STOP */
 
 /* image util APIs will be deprecated in Tizen 5.0. So we should replace it to new API
      https://developer.tizen.org/development/guides/native-application/media-and-camera/image-editing#decode
@@ -945,6 +951,7 @@ done:
 }
 #endif
 
+/* LCOV_EXCL_START */
 static void __bluetooth_pb_vcard_append_photo_v21(GString *string,
                                                contacts_record_h person)
 {
@@ -1495,6 +1502,7 @@ static void __bluetooth_pb_vcard_append_uid_v21(GString *string,
        g_free(escaped);
        FN_END;
 }
+/* LCOV_EXCL_STOP */
 
 static void __bluetooth_pb_vcard_append_v30(GString *string,
                                        const gchar *name,
@@ -1521,6 +1529,7 @@ static void __bluetooth_pb_vcard_append_v30(GString *string,
        FN_END;
 }
 
+/* LCOV_EXCL_START */
 static void __bluetooth_pb_vcard_remove_v30(GString *string,
                                        const gchar *property_name)
 {
@@ -1743,7 +1752,7 @@ static gchar *__bluetooth_pb_vcard_real_contact_valist_v21(gint person_id,
        FN_END;
        return g_string_free(str, FALSE);
 }
-
+/* LCOV_EXCL_STOP */
 
 static gchar *__bluetooth_pb_vcard_real_contact_valist_v30(gint person_id,
                                                        gint phonelog_id,
@@ -1768,6 +1777,7 @@ static gchar *__bluetooth_pb_vcard_real_contact_valist_v30(gint person_id,
        if (status != CONTACTS_ERROR_NONE)
                return NULL;
 
+       /* LCOV_EXCL_START */
        status = contacts_vcard_make_from_person(person, &vcard);
 
        if (status != CONTACTS_ERROR_NONE)
@@ -1830,6 +1840,7 @@ static gchar *__bluetooth_pb_vcard_real_contact_valist_v30(gint person_id,
 
        FN_END;
        return vcard;
+       /* LCOV_EXCL_STOP */
 }
 
 
@@ -1883,6 +1894,7 @@ static gchar *__bluetooth_pb_vcard_real_call_v21(gint phonelog_id,
        __bluetooth_pb_vcard_append_qp_encode_v21(str, "TEL", "X-0", number);
        g_free(number);
 
+       /* LCOV_EXCL_START */
        if (((filter == 0) || (filter & VCARD_X_IRMC_CALL_DATETIME))
                        && attr) {
                gchar *datetime = NULL;
@@ -1893,6 +1905,7 @@ static gchar *__bluetooth_pb_vcard_real_call_v21(gint phonelog_id,
                                                        attr, datetime);
                g_free(datetime);
        }
+       /* LCOV_EXCL_STOP */
 
        g_string_append(str, "END:VCARD\r\n");
 
@@ -1900,6 +1913,7 @@ static gchar *__bluetooth_pb_vcard_real_call_v21(gint phonelog_id,
        return g_string_free(str, FALSE);
 }
 
+/* LCOV_EXCL_START */
 static gchar *__bluetooth_pb_vcard_real_call_v30(gint phonelog_id,
                                                guint filter,
                                                const gchar *attr)
@@ -1932,6 +1946,7 @@ static gchar *__bluetooth_pb_vcard_real_call_v30(gint phonelog_id,
        FN_END;
        return g_string_free(str, FALSE);
 }
+/* LCOV_EXCL_STOP */
 
 static gchar *__bluetooth_pb_vcard_real_call(gint phonelog_id,
                                        guint filter,
@@ -1957,6 +1972,7 @@ static gchar *__bluetooth_pb_vcard_real_call(gint phonelog_id,
        return vcard;
 }
 
+/* LCOV_EXCL_START */
 static gchar **__bluetooth_pb_contact_add_field_str(contacts_record_h record,
                                                int *field,
                                                gint field_size)
@@ -2454,6 +2470,7 @@ static gchar *__bluetooth_pb_number_from_contact(contacts_record_h contact)
        FN_END;
        return str;
 }
+/* LCOV_EXCL_STOP */
 
 static gint __bluetooth_pb_person_id_from_phonelog_id(gint phonelog_id)
 {
@@ -2475,6 +2492,7 @@ static gint __bluetooth_pb_person_id_from_phonelog_id(gint phonelog_id)
        if (status != CONTACTS_ERROR_NONE)
                return 0;
 
+       /* LCOV_EXCL_START */
        status = contacts_record_get_int(phone_log,
                        _contacts_phone_log.person_id,
                        &person_id);
@@ -2548,6 +2566,7 @@ done:
 
        FN_END;
        return person_id;
+       /* LCOV_EXCL_STOP */
 }
 
 int _bluetooth_get_contact_addressbook(gint person_id)
@@ -2567,6 +2586,7 @@ int _bluetooth_get_contact_addressbook(gint person_id)
        if (status != CONTACTS_ERROR_NONE)
                return PBAP_ADDRESSBOOK_PHONE; /* Default*/
 
+       /* LCOV_EXCL_START */
        status = contacts_record_get_int(person,
                        _contacts_person.display_contact_id,
                        &contact_id);
@@ -2606,6 +2626,7 @@ int _bluetooth_get_contact_addressbook(gint person_id)
                return PBAP_ADDRESSBOOK_PHONE;
 
        return PBAP_ADDRESSBOOK_SIM;
+       /* LCOV_EXCL_STOP */
 }
 /* API for vcard */
 gchar *_bluetooth_pb_vcard_contact(gint person_id,
@@ -2691,6 +2712,7 @@ gchar *_bluetooth_pb_vcard_call(gint phonelog_id,
        DBG("person_id %d\n", person_id);
 
        if (person_id) {
+               /* LCOV_EXCL_START */
                if (filter == 0 || (filter & VCARD_X_IRMC_CALL_DATETIME)) {
                        gchar *datetime = NULL;
 
@@ -2713,6 +2735,7 @@ gchar *_bluetooth_pb_vcard_call(gint phonelog_id,
                                        filter, format,
                                        NULL);
                }
+               /* LCOV_EXCL_STOP */
        } else
                str = __bluetooth_pb_vcard_real_call(phonelog_id, filter,
                                                                format, attr);
@@ -2737,6 +2760,7 @@ gchar *_bluetooth_pb_fn_from_person_id(gint person_id)
        if (status != CONTACTS_ERROR_NONE)
                return NULL;
 
+       /* LCOV_EXCL_START */
        status = contacts_record_get_str(person,
                        _contacts_person.display_name,
                        &str);
@@ -2748,6 +2772,7 @@ gchar *_bluetooth_pb_fn_from_person_id(gint person_id)
 
        FN_END;
        return str;
+       /* LCOV_EXCL_STOP */
 }
 
 gchar *_bluetooth_pb_name_from_person_id(gint person_id)
@@ -2768,6 +2793,7 @@ gchar *_bluetooth_pb_name_from_person_id(gint person_id)
        if (status != CONTACTS_ERROR_NONE)
                return NULL;
 
+       /* LCOV_EXCL_START */
        status = contacts_record_get_int(person,
                        _contacts_person.display_contact_id,
                        &contact_id);
@@ -2790,6 +2816,7 @@ gchar *_bluetooth_pb_name_from_person_id(gint person_id)
 
        contacts_record_destroy(contact, TRUE);
        contacts_record_destroy(person, TRUE);
+       /* LCOV_EXCL_STOP */
 
        FN_END;
        return str;
@@ -2813,7 +2840,7 @@ gchar *_bluetooth_pb_number_from_person_id(gint person_id)
        if (status != CONTACTS_ERROR_NONE)
                return NULL;
 
-
+       /* LCOV_EXCL_START */
        status = contacts_record_get_int(person,
                        _contacts_person.display_contact_id,
                        &contact_id);
@@ -2836,6 +2863,7 @@ gchar *_bluetooth_pb_number_from_person_id(gint person_id)
 
        contacts_record_destroy(contact, TRUE);
        contacts_record_destroy(person, TRUE);
+       /* LCOV_EXCL_STOP */
 
        FN_END;
        return str;
@@ -2897,6 +2925,7 @@ gchar *_bluetooth_pb_number_from_phonelog_id(gint phonelog_id)
        if (status != CONTACTS_ERROR_NONE)
                return NULL;
 
+       /* LCOV_EXCL_START */
        status = contacts_record_get_str_p(phone_log,
                        _contacts_phone_log.address,
                        &tmp);
@@ -2909,6 +2938,7 @@ gchar *_bluetooth_pb_number_from_phonelog_id(gint phonelog_id)
        str = g_strdup(tmp);
 
        contacts_record_destroy(phone_log, TRUE);
+       /* LCOV_EXCL_STOP */
 
        FN_END;
        return str;
@@ -2922,7 +2952,7 @@ gchar *_bluetooth_pb_owner_name(void)
        name = vconf_get_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR);
 
        if (name == NULL)
-               name = g_strdup("My Name");
+               name = g_strdup("My Name"); /* LCOV_EXCL_LINE */
 
        FN_END;
        return name;