From: satyajit.a Date: Thu, 23 Jun 2016 05:09:15 +0000 (+0900) Subject: [UTC/ITC][media-content/bluetooth][NonACR][Fixed UTC test case issue in media-content... X-Git-Tag: Beta_RC12~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fbe4694bb2a2d88bc78e368b77085d2d928f8b53;p=test%2Ftct%2Fnative%2Fapi.git [UTC/ITC][media-content/bluetooth][NonACR][Fixed UTC test case issue in media-content and itc issue in bluetooth] Change-Id: Id6c6c65ea6bdce34d274063267427e8681fa9e18 Signed-off-by: satyajit.a --- diff --git a/packaging/utc/core-media-content-tests.spec b/packaging/utc/core-media-content-tests.spec index 5ac23bc..7a4c0bf 100755 --- a/packaging/utc/core-media-content-tests.spec +++ b/packaging/utc/core-media-content-tests.spec @@ -68,6 +68,7 @@ cp packaging/utc/%{name}.xml %{buildroot}/usr/share/packages/ mkdir -p %{buildroot}/usr/apps/%{name}/bin mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res + %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0 cp -rf src/utc/media-content/res/mobile/* %{buildroot}%{INTERNAL_STORAGE_PATH}res/ %endif @@ -94,7 +95,7 @@ chsmack -a User::App::Shared %{INTERNAL_STORAGE_PATH}res/test chsmack -a User::App::Shared %{INTERNAL_STORAGE_PATH}res/test/* %postun -rm -rf %{buildroot}%{INTERNAL_STORAGE_PATH}res +rm -rf %{INTERNAL_STORAGE_PATH}/res %files /usr/apps/%{name}/* diff --git a/src/itc/bluetooth/ITs-bluetooth-OPP.c b/src/itc/bluetooth/ITs-bluetooth-OPP.c index 43ae952..d960b10 100755 --- a/src/itc/bluetooth/ITs-bluetooth-OPP.c +++ b/src/itc/bluetooth/ITs-bluetooth-OPP.c @@ -25,6 +25,7 @@ static bool g_bCallbackPushRequested = false; +static const char *g_szDest = "/tmp"; /** * @brief Callback funtions @@ -245,13 +246,8 @@ int ITc_bluetooth_server_OPP_bt_opp_server_initialize_deinitialize_connection_re { START_TEST; int nTimeoutId = 0; - char szFilePath[PATH_LEN] = {0,}; - if ( false == BluetoothGetStorageDownloadsPath(szFilePath)) - { - return 1; - } - int nRetVal = bt_opp_server_initialize_by_connection_request(szFilePath, Bluetooth_bt_opp_server_connection_requested_cb_p, NULL); + int nRetVal = bt_opp_server_initialize_by_connection_request(g_szDest, Bluetooth_bt_opp_server_connection_requested_cb_p, NULL); if ( !g_bBluetoothIsOPPSupported ) { PRINT_RESULT(BT_ERROR_NOT_SUPPORTED, nRetVal, "bt_opp_server_initialize_by_connection_request", BluetoothGetError(nRetVal)); @@ -284,15 +280,8 @@ int ITc_bluetooth_server_OPP_bt_opp_server_set_destination_p(void) { START_TEST; int nTimeoutId = 0; - char szFilePath[PATH_LEN] = {0,}; - - - if ( false == BluetoothGetStorageDownloadsPath(szFilePath)) - { - return 1; - } - int nRetVal = bt_opp_server_initialize_by_connection_request(szFilePath, Bluetooth_bt_opp_server_connection_requested_cb_p, NULL); + int nRetVal = bt_opp_server_initialize_by_connection_request(g_szDest, Bluetooth_bt_opp_server_connection_requested_cb_p, NULL); if ( !g_bBluetoothIsOPPSupported ) { PRINT_RESULT(BT_ERROR_NOT_SUPPORTED, nRetVal, "bt_opp_server_initialize_by_connection_request", BluetoothGetError(nRetVal)); @@ -301,7 +290,7 @@ int ITc_bluetooth_server_OPP_bt_opp_server_set_destination_p(void) PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_opp_server_initialize_by_connection_request", BluetoothGetError(nRetVal)); WAIT(SHORT_DELAY); - nRetVal = bt_opp_server_set_destination(szFilePath); + nRetVal = bt_opp_server_set_destination(g_szDest); PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRetVal, "bt_opp_server_set_destination", BluetoothGetError(nRetVal),bt_opp_server_deinitialize()); nRetVal = bt_opp_server_deinitialize(); diff --git a/src/utc/media-content/utc-media-bookmark-delete.c b/src/utc/media-content/utc-media-bookmark-delete.c index 7cf0391..939c006 100755 --- a/src/utc/media-content/utc-media-bookmark-delete.c +++ b/src/utc/media-content/utc-media-bookmark-delete.c @@ -124,7 +124,10 @@ void utc_media_bookmark_delete_startup(void) return; } - ret = media_bookmark_insert_to_db(g_media_id, 1437008628, img_path); + time_t stTime = {0}; + time(&stTime); + fprintf(stderr, "%s:%d img_path = %s\n", __FILE__, __LINE__, img_path); + ret = media_bookmark_insert_to_db(g_media_id, stTime, img_path); if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, "media_bookmark_insert_to_db failed (code: %d)\n", ret); diff --git a/src/utc/media-content/utc-media-bookmark-insert.c b/src/utc/media-content/utc-media-bookmark-insert.c index 50033a5..d9f93a0 100755 --- a/src/utc/media-content/utc-media-bookmark-insert.c +++ b/src/utc/media-content/utc-media-bookmark-insert.c @@ -187,7 +187,10 @@ int utc_media_bookmark_insert_to_db_p(void) int ret = MEDIA_CONTENT_ERROR_NONE; - ret = media_bookmark_insert_to_db(g_media_id, 1437008628, img_file); + time_t stTime = {0}; + time(&stTime); + fprintf(stderr, "%s:%d img_path = %s\n", __FILE__, __LINE__, img_path); + ret = media_bookmark_insert_to_db(g_media_id, stTime, img_path); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); ret = media_info_foreach_bookmark_from_db(g_media_id, NULL, bookmark_cb, NULL); diff --git a/src/utc/media-content/utc-media-bookmark.c b/src/utc/media-content/utc-media-bookmark.c index 3dc50f9..2cb3734 100755 --- a/src/utc/media-content/utc-media-bookmark.c +++ b/src/utc/media-content/utc-media-bookmark.c @@ -130,7 +130,10 @@ void utc_media_bookmark_startup(void) return; } - ret = media_bookmark_insert_to_db(g_media_id, 1437008628, img_path); + time_t stTime = {0}; + time(&stTime); + fprintf(stderr, "%s:%d img_path = %s\n", __FILE__, __LINE__, img_path); + ret = media_bookmark_insert_to_db(g_media_id, stTime, img_path); if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, "media_bookmark_insert_to_db failed (code: %d)\n", ret);