Update TC
authorSung-jae Park <nicesj.park@samsung.com>
Fri, 3 Jan 2014 00:22:53 +0000 (09:22 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Fri, 3 Jan 2014 05:25:56 +0000 (14:25 +0900)
Change-Id: I93858a6dfd770ab5da52a528dd0c5f73afe94ff8

TC/TETware/tetware-target/bin/grw [changed mode: 0644->0755]
TC/TETware/tetware-target/bin/tcc [changed mode: 0644->0755]
TC/build.sh [changed mode: 0644->0755]
TC/config
TC/push.sh [changed mode: 0644->0755]
TC/run.sh [changed mode: 0644->0755]
TC/testcase/Makefile
TC/testcase/tet_captured [deleted file]
TC/testcase/utc_livebox.c

old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index c24eebc..099cbb3 100644 (file)
--- a/TC/config
+++ b/TC/config
@@ -1,3 +1,3 @@
 PKG_NAME=livebox
-TET_INSTALL_HOST_PATH=/var/tmp/dts_fw/TC/TETware
-TET_INSTALL_TARGET_PATH=/opt/home/$PKG_NAME/TETware
+TET_INSTALL_HOST_PATH=/home/developer/private/$PKG_NAME/TC/TETware
+TET_INSTALL_TARGET_PATH=/home/developer/private/$PKG_NAME/TC/TETware
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 811d781..df6033d 100644 (file)
@@ -6,12 +6,20 @@ C_FILES = $(shell ls *.c)
        
 PKGS = $(PKG_NAME)
 PKGS += glib-2.0
+PKGS += livebox-service
+PKGS += evas
+PKGS += ecore
+PKGS += elementary
+PKGS += dlog
+#PKGS += provider
 LDFLAGS = `pkg-config --libs $(PKGS)`
 LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
 LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
 LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
 
 CFLAGS = -I. `pkg-config --cflags $(PKGS)`
+CFLAGS += -DTIZEN_ENGINEER_MODE
+CFLAGS += -DTIZEN_DEBUG_ENABLE
 CFLAGS += -I$(TET_ROOT)/inc/tet3
 CFLAGS += -Wall
 
diff --git a/TC/testcase/tet_captured b/TC/testcase/tet_captured
deleted file mode 100644 (file)
index 2098802..0000000
+++ /dev/null
@@ -1 +0,0 @@
-make: `utc_telephony_sim' is up to date.
index 2983b59..d318a7b 100644 (file)
 #include <tet_api.h>
 #include <stdlib.h>
 
+#define LOG_TAG "LIVEBOX_TC"
+
 #include <livebox-service.h>
 #include <livebox-errno.h>
 #include <livebox.h>
+#include <dlog.h>
 
 enum {
        POSITIVE_TC_IDX = 0x01,
@@ -47,120 +50,180 @@ void (*tet_cleanup)(void) = cleanup;
 #define DUMMY_INVALID_ID "/usr/share/live_magazine/com.samsung.dummy.png"
 #define DUMMY_PKGNAME "com.samsung.dummy"
 
-static void utc_livebox_desc_open_n
+static void utc_livebox_desc_open_n(void)
 {
+       LOGD("");
        struct livebox_desc *handle;
 
        handle = livebox_desc_open(DUMMY_INVALID_ID, 0);
+       if (handle) {
+               (void)livebox_desc_close(handle);
+       }
         dts_check_eq("livebox_desc_open", handle, NULL, "Must return NULL in case of invalid id is used"); 
 }
 
-static void utc_livebox_desc_open_p
+static void utc_livebox_desc_open_p(void)
 {
+       LOGD("");
        struct livebox_desc *handle;
 
        handle = livebox_desc_open(DUMMY_ID, 0);
-        dts_check_ne("livebox_desc_open", ret, NULL, "Must return valid handle"); 
+        dts_check_ne("livebox_desc_open", handle, NULL, "Must return valid handle"); 
 }
 
-static void utc_livebox_desc_close_n
+static void utc_livebox_desc_close_n(void)
 {
+       LOGD("");
        int ret;
 
        ret = livebox_desc_close(NULL);
        dts_check_eq("livebox_desc_close", ret, LB_STATUS_ERROR_INVALID, "Must returns LB_STATUS_ERROR_INVALID");
 }
 
-static void utc_livebox_desc_close_p
+static void utc_livebox_desc_close_p(void)
 {
+       LOGD("");
        struct livebox_desc *handle;
        int ret;
 
        handle = livebox_desc_open(DUMMY_ID, 0);
+       if (!handle) {
+               dts_check_ne("livebox_desc_close", handle, NULL, "Failed to create a handle");
+               return;
+       }
+
        ret = livebox_desc_close(handle);
        dts_check_eq("livebox_desc_close", ret, LB_STATUS_SUCCESS, "Must returns LB_STATUS_SUCCESS");
 }
 
-static void utc_livebox_desc_set_category_n
+static void utc_livebox_desc_set_category_n(void)
 {
+       LOGD("");
        int ret;
        ret = livebox_desc_set_category(NULL, NULL, NULL);
 
        dts_check_eq("livebox_desc_set_category", ret, LB_STATUS_ERROR_INVALID, "Invalid parameter used, LB_STATUS_ERROR_INVALID should be returned");
 }
 
-static void utc_livebox_desc_set_category_p
+static void utc_livebox_desc_set_category_p(void)
 {
+       LOGD("");
        struct livebox_desc *handle;
        int ret;
 
        handle = livebox_desc_open(DUMMY_ID, 0);
+       if (!handle) {
+               dts_check_ne("livebox_desc_set_category", handle, NULL, "Failed to create a handle");
+               return;
+       }
 
        ret = livebox_desc_set_category(handle, NULL, "New Category");
+       (void)livebox_desc_close(handle);
        dts_check_eq("livebox_desc_set_category", ret, LB_STATUS_SUCCESS, "LB_STATUS_SUCCESS should be returned\n");
 }
 
-static void utc_livebox_desc_set_id_n
+static void utc_livebox_desc_set_id_n(void)
 {
+       LOGD("");
        struct livebox_desc *handle;
        int ret;
 
        handle = livebox_desc_open(DUMMY_ID, 0);
+       if (!handle) {
+               dts_check_ne("livebox_desc_set_id", handle, NULL, "Failed to create a handle");
+               return;
+       }
        ret = livebox_desc_set_id(handle, -1, NULL);
+       (void)livebox_desc_close(handle);
        dts_check_eq("livebox_desc_set_id", ret, LB_STATUS_ERROR_NOT_EXIST, "LB_STATUS_ERROR_NOT_EXIST should be returned\n");
 }
 
-static void utc_livebox_desc_set_id_p
+static void utc_livebox_desc_set_id_p(void)
 {
+       LOGD("");
        struct livebox_desc *handle;
        int ret;
        int idx;
 
        handle = livebox_desc_open(DUMMY_ID, 0);
+       if (!handle) {
+               dts_check_ne("livebox_desc_set_id", handle, NULL, "Failed to create a handle");
+               return;
+       }
        idx = livebox_desc_add_block(handle, NULL, LB_DESC_TYPE_SCRIPT, "swallow,part", "/usr/apps/com.samsung.test-app/res/edje/test.edj", "test,group");
+       if (idx < 0) {
+               dts_check_ge("livebox_desc_set_id", idx, 0, "Failed to add a desc block");
+               (void)livebox_desc_close(handle);
+               return;
+       }
+
        ret = livebox_desc_set_id(handle, idx, "new,id");
+       (void)livebox_desc_close(handle);
        dts_check_eq("livebox_desc_set_id", ret, LB_STATUS_SUCCESS, "LB_STATUS_SUCCESS should be returned\n");
 }
 
-static void utc_livebox_desc_add_block_n
+static void utc_livebox_desc_add_block_n(void)
 {
+       LOGD("");
        int idx;
 
        idx = livebox_desc_add_block(NULL, NULL, LB_DESC_TYPE_SCRIPT, "swallow,part", "/usr/apps/com.samsung.test-app/res/edje/test.edj", "test,group");
        dts_check_eq("livebox_desc_add_block", idx, LB_STATUS_ERROR_INVALID, "LB_STATUS_ERROR_INVALID should be returned\n");
 }
 
-static void utc_livebox_desc_add_block_p
+static void utc_livebox_desc_add_block_p(void)
 {
+       LOGD("");
        struct livebox_desc *handle;
-       int ret;
        int idx;
 
        handle = livebox_desc_open(DUMMY_ID, 0);
+       if (!handle) {
+               dts_check_ne("livebox_desc_add_block", handle, NULL, "Failed to create a handle");
+               return;
+       }
+
        idx = livebox_desc_add_block(handle, NULL, LB_DESC_TYPE_SCRIPT, "swallow,part", "/usr/apps/com.samsung.test-app/res/edje/test.edj", "test,group");
        dts_check_ge("livebox_desc_add_block", idx, 0, "idx should not be less than 0\n");
+       (void)livebox_desc_close(handle);
 }
 
-static void utc_livebox_desc_del_block_n
+static void utc_livebox_desc_del_block_n(void)
 {
+       LOGD("");
        struct livebox_desc *handle;
        int ret;
 
        handle = livebox_desc_open(DUMMY_ID, 0);
+       if (!handle) {
+               dts_check_ne("livebox_desc_del_block", handle, NULL, "Failed to create a handle");
+               return;
+       }
 
        ret = livebox_desc_del_block(handle, 0);
        dts_check_eq("livebox_desc_del_block", ret, LB_STATUS_ERROR_NOT_EXIST, "Block is not found, LB_STATUS_ERROR_NOT_EXIST should be returned\n");
 }
 
-static void utc_livebox_desc_del_block_p
+static void utc_livebox_desc_del_block_p(void)
 {
+       LOGD("");
        struct livebox_desc *handle;
        int idx;
        int ret;
 
        handle = livebox_desc_open(DUMMY_ID, 0);
+       if (handle == NULL) {
+               dts_check_ne("livebox_desc_del_block", handle, NULL, "Failed to create desc handle");
+               return;
+       }
        idx = livebox_desc_add_block(handle, NULL, LB_DESC_TYPE_SCRIPT, "swallow,part", "/usr/apps/com.samsung.test-app/res/edje/test.edj", "test,group");
+       if (idx < 0) {
+               dts_check_ge("livebox_desc_del_block", idx, 0, "Failed to add a desc block");
+               (void)livebox_desc_close(handle);
+               return;
+       }
        ret = livebox_desc_del_block(handle, idx);
+       (void)livebox_desc_close(handle);
        dts_check_eq("livebox_desc_del_block", ret, LB_STATUS_SUCCESS, "del_block should returns LB_STATUS_SUCCESS\n");
 }
 
@@ -173,250 +236,298 @@ int livebox_trigger_update_monitor(const char *id, int is_pd)
        return LB_STATUS_SUCCESS;
 }
 
-static void utc_livebox_content_is_updated_n
+static void utc_livebox_content_is_updated_n(void)
 {
+       LOGD("");
        int ret;
 
        ret = livebox_content_is_updated(NULL, 0);
        dts_check_eq("livebox_content_is_updated", ret, LB_STATUS_ERROR_INVALID, "should returns LB_STATUS_ERROR_INVALID\n");
 }
 
-static void utc_livebox_content_is_updated_p
+static void utc_livebox_content_is_updated_p(void)
 {
+       LOGD("");
        int ret;
        ret = livebox_content_is_updated(DUMMY_ID, 0);
        dts_check_eq("livebox_content_is_updated", ret, LB_STATUS_SUCCESS, "should returns LB_STATUS_SUCCESS\n");
 }
 
-static void utc_livebox_request_close_pd_n
+static void utc_livebox_request_close_pd_n(void)
 {
+       LOGD("");
        int ret;
 
        ret = livebox_request_close_pd(DUMMY_PKGNAME, DUMMY_ID, LB_STATUS_SUCCESS);
        dts_check_eq("livebox_request_close_pd", ret, LB_STATUS_ERROR_INVALID, "should returns LB_STATUS_ERROR_INVALID\n");
 }
 
-static void utc_livebox_request_close_pd_p
+static void utc_livebox_request_close_pd_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_request_close_pd", "pass negative test");
 }
 
-static void utc_livebox_request_update_n
+static void utc_livebox_request_update_n(void)
 {
+       LOGD("");
        int ret;
        ret = livebox_request_update(NULL);
-       dts_check_eq("livebox_request_update", ret, LB_STATUS_ERROR_INVALID, "should returns LB_STATUS_ERROR_INVALID\n");
+       dts_check_eq("livebox_request_update", ret, LB_STATUS_ERROR_INVALID, "should returns LB_STATUS_ERROR_INVALID");
 }
 
-static void utc_livebox_request_update_p
+static void utc_livebox_request_update_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_request_update", "pass negative test");
 }
 
-static void utc_livebox_util_nl2br_n
+static void utc_livebox_util_nl2br_n(void)
 {
+       LOGD("");
        char *nl2br;
 
        nl2br = livebox_util_nl2br(NULL);
        dts_check_eq("livebox_util_nl2br", nl2br, NULL, "should returns NULL\n");
 }
 
-static void utc_livebox_util_nl2br_p
+static void utc_livebox_util_nl2br_p(void)
 {
+       LOGD("");
        char *nl2br;
        nl2br = livebox_util_nl2br("hello\nworld");
-       dts_check_str_eq("livebox_util_nl2br", nl2br, "hello<br>world", "should returns \"hello<br>world\"\n");
+       LOGD("[%s]", nl2br);
+       dts_check_str_eq("livebox_util_nl2br", nl2br, "hello<br>world", "should returns \"hello<br>world\"");
+       LOGD("");
 }
 
-static void utc_livebox_acquire_buffer_n
+static void utc_livebox_acquire_buffer_n(void)
 {
+       LOGD("");
        struct livebox_buffer *handle;
 
        handle = livebox_acquire_buffer(NULL, 0, 720, 200, NULL, NULL);
        dts_check_eq("livebox_acquire_buffer", handle, NULL, "should returns NULL\n");
 }
 
-static void utc_livebox_acquire_buffer_p
+static void utc_livebox_acquire_buffer_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_acquire_buffer", "pass positive test");
 }
 
-static void utc_livebox_acquire_buffer_NEW_n
+static void utc_livebox_acquire_buffer_NEW_n(void)
 {
+       LOGD("");
        struct livebox_buffer *handle;
 
        handle = livebox_acquire_buffer_NEW(NULL, 0, 720, 200, NULL, NULL);
        dts_check_eq("livebox_acquire_buffer_NEW", handle, NULL, "should returns NULL\n");
 }
 
-static void utc_livebox_acquire_buffer_NEW_p
+static void utc_livebox_acquire_buffer_NEW_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_acquire_buffer_NEW", "pass positive test");
 }
 
 
-static void utc_livebox_pixmap_id_n
+static void utc_livebox_pixmap_id_n(void)
 {
+       LOGD("");
        unsigned long pixmap;
 
        pixmap = livebox_pixmap_id(NULL);
        dts_check_eq("livebox_pixmap_id", pixmap, 0, "should returns 0\n");
 }
 
-static void utc_livebox_pixmap_id_p
+static void utc_livebox_pixmap_id_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_pixmap_id", "pass positive test");
 }
 
-static void utc_livebox_ref_buffer_n
+static void utc_livebox_ref_buffer_n(void)
 {
+       LOGD("");
        void *ret;
        ret = livebox_ref_buffer(NULL);
        dts_check_eq("livebox_ref_buffer", ret, NULL, "should returns NULL\n");
 }
 
-static void utc_livebox_ref_buffer_p
+static void utc_livebox_ref_buffer_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_ref_buffer", "pass positive test");
 }
 
-static void utc_livebox_sync_buffer_n
+static void utc_livebox_sync_buffer_n(void)
 {
+       LOGD("");
        int ret;
        ret = livebox_sync_buffer(NULL);
        dts_check_eq("livebox_sync_buffer", ret, LB_STATUS_ERROR_INVALID, "should returns LB_STATUS_ERROR_INVALID\n");
 }
 
-static void utc_livebox_sync_buffer_p
+static void utc_livebox_sync_buffer_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_sync_buffer", "pass positive test");
 }
 
-static void utc_livebox_support_hw_buffer_n
+static void utc_livebox_support_hw_buffer_n(void)
 {
+       LOGD("");
        int ret;
        ret = livebox_support_hw_buffer(NULL);
        dts_check_eq("livebox_support_hw_buffer", ret, LB_STATUS_ERROR_INVALID, "should returns LB_STATUS_ERROR_INVALID\n");
 }
 
-static void utc_livebox_support_hw_buffer_p
+static void utc_livebox_support_hw_buffer_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_support_hw_buffer", "pass positive test");
 }
 
-static void utc_livebox_create_hw_buffer_n
+static void utc_livebox_create_hw_buffer_n(void)
 {
+       LOGD("");
        int ret;
        ret = livebox_create_hw_buffer(NULL);
        dts_check_eq("livebox_create_hw_buffer", ret, LB_STATUS_ERROR_INVALID, "should returns LB_STATUS_ERROR_INVALID\n");
 }
 
-static void utc_livebox_create_hw_buffer_p
+static void utc_livebox_create_hw_buffer_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_create_hw_buffer", "pass positive test");
 }
 
-static void utc_livebox_destroy_hw_buffer_n
+static void utc_livebox_destroy_hw_buffer_n(void)
 {
+       LOGD("");
        int ret;
        ret = livebox_destroy_hw_buffer(NULL);
        dts_check_eq("livebox_destroy_hw_buffer", ret, LB_STATUS_ERROR_INVALID, "should returns LB_STATUS_ERROR_INVALID\n");
 }
 
-static void utc_livebox_destroy_hw_buffer_p
+static void utc_livebox_destroy_hw_buffer_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_destroy_hw_buffer", "pass positive test");
 }
 
-static void utc_livebox_buffer_hw_buffer_n
+static void utc_livebox_buffer_hw_buffer_n(void)
 {
-       int ret;
+       LOGD("");
+       void *ret;
        ret = livebox_buffer_hw_buffer(NULL);
-       dts_check_eq("livebox_buffer_hw_buffer", ret, LB_STATUS_ERROR_INVALID, "should returns LB_STATUS_ERROR_INVALID\n");
+       dts_check_eq("livebox_buffer_hw_buffer", ret, NULL, "should returns LB_STATUS_ERROR_INVALID");
 }
 
-static void utc_livebox_buffer_hw_buffer_p
+static void utc_livebox_buffer_hw_buffer_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_buffer_hw_buffer", "pass positive test");
 }
 
-static void utc_livebox_buffer_pre_render_n
+static void utc_livebox_buffer_pre_render_n(void)
 {
+       LOGD("");
        int ret;
        ret = livebox_buffer_pre_render(NULL);
        dts_check_eq("livebox_buffer_pre_render", ret, LB_STATUS_ERROR_INVALID, "should returns LB_STATUS_ERROR_INVALID\n");
 }
 
-static void utc_livebox_buffer_pre_render_p
+static void utc_livebox_buffer_pre_render_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_buffer_pre_render", "pass positive test");
 }
 
-static void utc_livebox_buffer_post_render_n
+static void utc_livebox_buffer_post_render_n(void)
 {
+       LOGD("");
        int ret;
        ret = livebox_buffer_post_render(NULL);
        dts_check_eq("livebox_buffer_post_render", ret, LB_STATUS_ERROR_INVALID, "should returns LB_STATUS_ERROR_INVALID\n");
 }
 
-static void utc_livebox_buffer_post_render_p
+static void utc_livebox_buffer_post_render_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_buffer_post_render", "pass positive test");
 }
 
-static void utc_livebox_get_evas_object_n
+static void utc_livebox_get_evas_object_n(void)
 {
+       LOGD("");
        Evas_Object *obj;
 
        obj = livebox_get_evas_object(NULL);
        dts_check_eq("livebox_get_evas_object", obj, NULL, "should returns NULL\n");
 }
 
-static void utc_livebox_get_evas_object_p
+static void utc_livebox_get_evas_object_p(void)
 {
+       LOGD("");
        /*!
         * \note
         * Unable to test the positive case
         */
+       dts_pass("livebox_get_evas_object", "pass positve test");
 }
 
 struct tet_testlist tet_testlist[] = {
@@ -465,6 +576,8 @@ struct tet_testlist tet_testlist[] = {
        { utc_livebox_buffer_hw_buffer_p, POSITIVE_TC_IDX },
        { utc_livebox_buffer_pre_render_n, NEGATIVE_TC_IDX },
        { utc_livebox_buffer_pre_render_p, POSITIVE_TC_IDX },
+       { utc_livebox_buffer_post_render_n, NEGATIVE_TC_IDX },
+       { utc_livebox_buffer_post_render_p, POSITIVE_TC_IDX },
        { utc_livebox_get_evas_object_n, NEGATIVE_TC_IDX },
        { utc_livebox_get_evas_object_p, POSITIVE_TC_IDX },