Exclude line and function from coverage measurement 46/79646/3 accepted/tizen/common/20160713.050508 accepted/tizen/ivi/20160712.091233 accepted/tizen/mobile/20160712.091252 accepted/tizen/tv/20160712.091230 accepted/tizen/wearable/20160712.091249 submit/tizen/20160712.081629
authorHyunho Kang <hhstark.kang@samsung.com>
Tue, 12 Jul 2016 07:38:40 +0000 (16:38 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Tue, 12 Jul 2016 08:00:16 +0000 (01:00 -0700)
Change-Id: Idac4cf86460c00f82f7057c98c35586fa67f1bd0
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
src/widget_conf.c
src/widget_instance.c
src/widget_service.c

index 9ce33641e7786044f4e34ef90234d057b3698bb5..d9ec629172059e53d80fc4abd8a17b211cfd25a9 100644 (file)
@@ -272,6 +272,7 @@ static struct info {
        .search_input_node = 0,
 };
 
+/* LCOV_EXCL_START */
 static void visibility_change_delay_handler(char *buffer)
 {
        if (sscanf(buffer, "%lf", &s_conf.visibility_change_delay) != 1) {
@@ -2131,5 +2132,6 @@ EAPI const int const widget_conf_enable_resource_lock(void)
 {
        return s_conf.flags.field.enable_resource_lock;
 }
+/* LCOV_EXCL_STOP */
 
 /* End of a file */
index fd0cbfe50680ed2809fea9c8d8f7dfc8bb5d67da..0b6e91bd065be1f0245ecdfe9f079f42891f2d06 100644 (file)
@@ -716,6 +716,7 @@ static int __widget_handler(const char *viewer_id, aul_app_com_result_e e, bundl
        return 0;
 }
 
+/* LCOV_EXCL_START */
 static int __fault_handler(int pid, void *data)
 {
        GList *iter;
@@ -735,6 +736,7 @@ static int __fault_handler(int pid, void *data)
 
        return 0;
 }
+/* LCOV_EXCL_STOP */
 
 EAPI int widget_instance_init(const char *viewer_id)
 {
index 85b4bbf38238e0946b7e4f9b880aa9d0c078b6d0..0b720b210e0cd9a3c004052c305328beee22c5b6 100644 (file)
@@ -154,8 +154,10 @@ static sqlite3 *_open_db(uid_t uid)
 
        ret = sqlite3_open_v2(path, &db, SQLITE_OPEN_READONLY, NULL);
        if (ret != SQLITE_OK) {
+               /* LCOV_EXCL_START */
                _E("failed to open widget db: %d", ret);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        return db;
@@ -296,9 +298,11 @@ static int _get_widget_supported_sizes(const char *widget_id, uid_t uid,
 
        ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
        if (ret != SQLITE_OK) {
+               /* LCOV_EXCL_START */
                _E("prepare error: %s", sqlite3_errmsg(db));
                sqlite3_close_v2(db);
                return WIDGET_ERROR_FAULT;
+               /* LCOV_EXCL_STOP */
        }
 
        sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);
@@ -435,9 +439,11 @@ static int _get_widget_list(const char *pkgid, uid_t uid, GList **list)
 
        ret = sqlite3_prepare_v2(db, query_buf, strlen(query_buf), &stmt, NULL);
        if (ret != SQLITE_OK) {
+               /* LCOV_EXCL_START */
                _E("prepare error: %s", sqlite3_errmsg(db));
                sqlite3_close_v2(db);
                return WIDGET_ERROR_FAULT;
+               /* LCOV_EXCL_STOP */
        }
 
        if (pkgid != NULL)
@@ -446,8 +452,10 @@ static int _get_widget_list(const char *pkgid, uid_t uid, GList **list)
        while (sqlite3_step(stmt) == SQLITE_ROW) {
                item = calloc(1, sizeof(struct widget_list_item));
                if (item == NULL) {
+                       /* LCOV_EXCL_START */
                        _E("out of memory");
                        return WIDGET_ERROR_OUT_OF_MEMORY;
+                       /* LCOV_EXCL_STOP */
                }
 
                _get_column_str(stmt, 0, &item->classid);
@@ -559,10 +567,12 @@ static char *_get_main_app_id(const char *widget_id, uid_t uid)
 
        ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
        if (ret != SQLITE_OK) {
+               /* LCOV_EXCL_START */
                _E("prepare error: %s", sqlite3_errmsg(db));
                sqlite3_close_v2(db);
                set_last_result(WIDGET_ERROR_FAULT);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);
@@ -714,10 +724,12 @@ static char *_get_app_id_of_setup_app(const char *widget_id, uid_t uid)
 
        ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
        if (ret != SQLITE_OK) {
+               /* LCOV_EXCL_START */
                _E("prepare error: %s", sqlite3_errmsg(db));
                sqlite3_close_v2(db);
                set_last_result(WIDGET_ERROR_FAULT);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);
@@ -928,10 +940,12 @@ static char *_get_preview_image_path(const char *widget_id, int width,
 
        ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
        if (ret != SQLITE_OK) {
+               /* LCOV_EXCL_START */
                _E("prepare error: %s", sqlite3_errmsg(db));
                sqlite3_close_v2(db);
                set_last_result(WIDGET_ERROR_FAULT);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);
@@ -1022,10 +1036,12 @@ static char *_get_icon(const char *widget_id, const char *lang, uid_t uid)
 
        ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
        if (ret != SQLITE_OK) {
+               /* LCOV_EXCL_START */
                _E("prepare error: %s", sqlite3_errmsg(db));
                sqlite3_close_v2(db);
                set_last_result(WIDGET_ERROR_FAULT);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);
@@ -1105,10 +1121,12 @@ static char *_get_name(const char *widget_id, const char *lang, uid_t uid)
 
        ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
        if (ret != SQLITE_OK) {
+               /* LCOV_EXCL_START */
                _E("step error: %s", sqlite3_errmsg(db));
                sqlite3_close_v2(db);
                set_last_result(WIDGET_ERROR_FAULT);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);
@@ -1217,10 +1235,12 @@ static char *_get_widget_id(const char *appid, uid_t uid)
 
        ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
        if (ret != SQLITE_OK) {
+               /* LCOV_EXCL_START */
                _E("prepare error: %s", sqlite3_errmsg(db));
                sqlite3_close_v2(db);
                set_last_result(WIDGET_ERROR_FAULT);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        sqlite3_bind_text(stmt, 1, appid, -1, SQLITE_STATIC);
@@ -1291,10 +1311,12 @@ static char *_get_package_id(const char *widget_id, uid_t uid)
 
        ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
        if (ret != SQLITE_OK) {
+               /* LCOV_EXCL_START */
                _E("prepare error: %s", sqlite3_errmsg(db));
                sqlite3_close_v2(db);
                set_last_result(WIDGET_ERROR_FAULT);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);