[UTC/ITC][media-content/bluetooth][NonACR][Fixed UTC test case issue in media-content...
authorsatyajit.a <satyajit.a@samsung.com>
Thu, 23 Jun 2016 05:09:15 +0000 (14:09 +0900)
committersatyajit.a <satyajit.a@samsung.com>
Thu, 23 Jun 2016 06:29:06 +0000 (15:29 +0900)
Change-Id: Id6c6c65ea6bdce34d274063267427e8681fa9e18
Signed-off-by: satyajit.a <satyajit.a@samsung.com>
packaging/utc/core-media-content-tests.spec
src/itc/bluetooth/ITs-bluetooth-OPP.c
src/utc/media-content/utc-media-bookmark-delete.c
src/utc/media-content/utc-media-bookmark-insert.c
src/utc/media-content/utc-media-bookmark.c

index 5ac23bc..7a4c0bf 100755 (executable)
@@ -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}/*
index 43ae952..d960b10 100755 (executable)
@@ -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();
index 7cf0391..939c006 100755 (executable)
@@ -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);
index 50033a5..d9f93a0 100755 (executable)
@@ -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);
index 3dc50f9..2cb3734 100755 (executable)
@@ -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);