From b29ccc2dc18170dab71d29a1edbf2e06df17aed8 Mon Sep 17 00:00:00 2001 From: leerang song Date: Fri, 22 Feb 2013 15:53:36 +0900 Subject: [PATCH] [Release] wrt-commons_0.2.99 --- 3rdparty/minizip/miniunz.c | 1 + build/encryption/CMakeLists.txt | 3 +- build/encryption/libs/libcal.a | Bin 4734 -> 0 bytes build/encryption/libs/libcal.arm.a | Bin 5566 -> 0 bytes build/encryption/libs/libcal.i586.a | Bin 5496 -> 0 bytes debian/changelog | 12 ++ modules/dbus/config.cmake | 1 + modules/dbus/include/dpl/dbus/connection.h | 2 +- modules/dbus/include/dpl/dbus/glib_util.h | 30 ++++ .../encryption/src/resource_decryption.cpp | 8 +- .../encryption/src/resource_encryption.cpp | 7 +- .../dao/security_origin_dao.cpp | 58 ++++++- .../dao/security_origin_dao_types.cpp | 9 +- .../security-origin-dao/security_origin_dao.h | 5 +- .../security_origin_dao_types.h | 3 + .../orm/security_origin_db | 11 +- modules/widget_dao/dao/widget_dao.cpp | 11 +- .../dpl/wrt-dao-ro/config_parser_data.h | 1 - .../dpl/wrt-dao-ro/widget_dao_read_only.h | 3 - packaging/wrt-commons.spec | 17 +- tests/CMakeLists.txt | 9 +- tests/common/include/glib_interface.h | 32 ++++ tests/common/src/loop_control.cpp | 4 +- tests/{dpl => }/core/CMakeLists.txt | 42 ++--- tests/{dpl => }/core/DESCRIPTION | 0 tests/{dpl => }/core/data/sample.zip | Bin tests/{dpl => }/core/main.cpp | 0 tests/{dpl => }/core/test_address.cpp | 0 tests/{dpl => }/core/test_binary_queue.cpp | 0 tests/{dpl => }/core/test_fast_delegate.cpp | 0 tests/{dpl => }/core/test_foreach.cpp | 0 .../core/test_log_unhandled_exception.cpp | 0 tests/{dpl => }/core/test_once.cpp | 0 tests/{dpl => }/core/test_scoped_array.cpp | 0 tests/{dpl => }/core/test_scoped_close.cpp | 0 tests/{dpl => }/core/test_scoped_fclose.cpp | 0 tests/{dpl => }/core/test_scoped_free.cpp | 0 tests/{dpl => }/core/test_scoped_ptr.cpp | 0 tests/{dpl => }/core/test_semaphore.cpp | 0 tests/{dpl => }/core/test_serialization.cpp | 0 tests/{dpl => }/core/test_shared_ptr.cpp | 0 tests/{dpl => }/core/test_string.cpp | 0 tests/{dpl => }/core/test_thread.cpp | 0 tests/{dpl => }/core/test_type_list.cpp | 0 tests/{dpl => }/core/test_zip_input.cpp | 0 tests/dao/CMakeLists.txt | 3 +- tests/{dpl => }/db/CMakeLists.txt | 10 +- tests/{dpl => }/db/main.cpp | 0 tests/{dpl => }/db/orm/CMakeLists.txt | 0 tests/{dpl => }/db/orm/dpl_orm_test_db | 0 .../db/orm/dpl_orm_test_db_definitions | 0 .../db/orm/dpl_orm_test_db_sql_generator.h | 0 .../orm/dpl_orm_test_db_sql_generator.h.gch | Bin .../{dpl => }/db/orm/generator_dpl_orm_test.h | 0 tests/{dpl => }/db/test_orm.cpp | 0 tests/{dpl => }/db/test_sql_connection.cpp | 0 tests/{dpl => }/dbus/CMakeLists.txt | 16 +- .../data/org.tizen.DBusTestService.service | 3 + tests/{dpl => }/dbus/dbus_test.cpp | 0 tests/{dpl => }/dbus/dbus_test.h | 0 tests/{dpl => }/dbus/main.cpp | 0 tests/{dpl => }/dbus/test_cases.cpp | 0 tests/{dpl => }/dbus/test_service.cpp | 0 tests/dpl/CMakeLists.txt | 29 ---- tests/dpl/README | 13 -- tests/dpl/core/.swp | Bin 12288 -> 0 bytes .../data/org.tizen.DBusTestService.service | 3 - tests/{dpl => }/event/CMakeLists.txt | 12 +- tests/{dpl => }/event/main.cpp | 0 tests/{dpl => }/event/test_controller.cpp | 0 tests/{dpl => }/event/test_event_support.cpp | 0 tests/{dpl => }/event/test_ic_delegate.cpp | 0 tests/{dpl => }/event/test_property.cpp | 0 .../CMakeLists.txt | 6 +- .../files/CMakeLists.txt | 0 .../files/one | 0 .../files/two | 0 .../dpl/wrt-dao-ro/common_dao_types.h | 0 .../dpl/wrt-dao-rw/widget_dao.h | 0 .../mockup_src/widget_dao.cpp | 0 .../test_localization.cpp | 0 .../test_suite01.cpp | 0 tests/localizationTagsProvider/CMakeLists.txt | 42 +++++ .../Localization_testcases.cpp | 162 ++++++++++++++++++ tests/localizationTagsProvider/README | 13 ++ .../tests_miscunit.cpp | 33 ++++ tests/{dpl => }/test/CMakeLists.txt | 6 +- tests/{dpl => }/test/main.cpp | 0 tests/{dpl => }/test/runner_child.cpp | 0 tests/{dpl => }/unused/test_caller.cpp | 0 tests/{dpl => }/unused/test_crypto_hash.cpp | 0 tests/{dpl => }/unused/test_message_queue.cpp | 0 tests/{dpl => }/unused/test_shm.cpp | 0 .../{dpl => }/unused/test_sql_connection.cpp | 0 tests/{dpl => }/unused/test_task.cpp | 0 tests/{dpl => }/utils/CMakeLists.txt | 10 +- tests/{dpl => }/utils/bash_utils.cpp | 0 tests/{dpl => }/utils/main.cpp | 0 tests/{dpl => }/utils/widget_version.cpp | 0 tests/{dpl => }/utils/wrt_utility.cpp | 0 100 files changed, 486 insertions(+), 144 deletions(-) delete mode 100755 build/encryption/libs/libcal.a delete mode 100755 build/encryption/libs/libcal.arm.a delete mode 100755 build/encryption/libs/libcal.i586.a create mode 100644 modules/dbus/include/dpl/dbus/glib_util.h create mode 100644 tests/common/include/glib_interface.h rename tests/{dpl => }/core/CMakeLists.txt (55%) rename tests/{dpl => }/core/DESCRIPTION (100%) rename tests/{dpl => }/core/data/sample.zip (100%) rename tests/{dpl => }/core/main.cpp (100%) rename tests/{dpl => }/core/test_address.cpp (100%) rename tests/{dpl => }/core/test_binary_queue.cpp (100%) rename tests/{dpl => }/core/test_fast_delegate.cpp (100%) rename tests/{dpl => }/core/test_foreach.cpp (100%) rename tests/{dpl => }/core/test_log_unhandled_exception.cpp (100%) rename tests/{dpl => }/core/test_once.cpp (100%) rename tests/{dpl => }/core/test_scoped_array.cpp (100%) rename tests/{dpl => }/core/test_scoped_close.cpp (100%) rename tests/{dpl => }/core/test_scoped_fclose.cpp (100%) rename tests/{dpl => }/core/test_scoped_free.cpp (100%) rename tests/{dpl => }/core/test_scoped_ptr.cpp (100%) rename tests/{dpl => }/core/test_semaphore.cpp (100%) rename tests/{dpl => }/core/test_serialization.cpp (100%) rename tests/{dpl => }/core/test_shared_ptr.cpp (100%) rename tests/{dpl => }/core/test_string.cpp (100%) rename tests/{dpl => }/core/test_thread.cpp (100%) rename tests/{dpl => }/core/test_type_list.cpp (100%) rename tests/{dpl => }/core/test_zip_input.cpp (100%) rename tests/{dpl => }/db/CMakeLists.txt (86%) rename tests/{dpl => }/db/main.cpp (100%) rename tests/{dpl => }/db/orm/CMakeLists.txt (100%) rename tests/{dpl => }/db/orm/dpl_orm_test_db (100%) rename tests/{dpl => }/db/orm/dpl_orm_test_db_definitions (100%) rename tests/{dpl => }/db/orm/dpl_orm_test_db_sql_generator.h (100%) rename tests/{dpl => }/db/orm/dpl_orm_test_db_sql_generator.h.gch (100%) rename tests/{dpl => }/db/orm/generator_dpl_orm_test.h (100%) rename tests/{dpl => }/db/test_orm.cpp (100%) rename tests/{dpl => }/db/test_sql_connection.cpp (100%) rename tests/{dpl => }/dbus/CMakeLists.txt (83%) create mode 100644 tests/dbus/data/org.tizen.DBusTestService.service rename tests/{dpl => }/dbus/dbus_test.cpp (100%) rename tests/{dpl => }/dbus/dbus_test.h (100%) rename tests/{dpl => }/dbus/main.cpp (100%) rename tests/{dpl => }/dbus/test_cases.cpp (100%) rename tests/{dpl => }/dbus/test_service.cpp (100%) delete mode 100644 tests/dpl/CMakeLists.txt delete mode 100644 tests/dpl/README delete mode 100644 tests/dpl/core/.swp delete mode 100644 tests/dpl/dbus/data/org.tizen.DBusTestService.service rename tests/{dpl => }/event/CMakeLists.txt (78%) rename tests/{dpl => }/event/main.cpp (100%) rename tests/{dpl => }/event/test_controller.cpp (100%) rename tests/{dpl => }/event/test_event_support.cpp (100%) rename tests/{dpl => }/event/test_ic_delegate.cpp (100%) rename tests/{dpl => }/event/test_property.cpp (100%) rename tests/{dpl/localization => files_localization}/CMakeLists.txt (90%) rename tests/{dpl/localization => files_localization}/files/CMakeLists.txt (100%) rename tests/{dpl/localization => files_localization}/files/one (100%) rename tests/{dpl/localization => files_localization}/files/two (100%) rename tests/{dpl/localization => files_localization}/mockup_include/dpl/wrt-dao-ro/common_dao_types.h (100%) rename tests/{dpl/localization => files_localization}/mockup_include/dpl/wrt-dao-rw/widget_dao.h (100%) rename tests/{dpl/localization => files_localization}/mockup_src/widget_dao.cpp (100%) rename tests/{dpl/localization => files_localization}/test_localization.cpp (100%) rename tests/{dpl/localization => files_localization}/test_suite01.cpp (100%) create mode 100644 tests/localizationTagsProvider/CMakeLists.txt create mode 100644 tests/localizationTagsProvider/Localization_testcases.cpp create mode 100644 tests/localizationTagsProvider/README create mode 100644 tests/localizationTagsProvider/tests_miscunit.cpp rename tests/{dpl => }/test/CMakeLists.txt (88%) rename tests/{dpl => }/test/main.cpp (100%) rename tests/{dpl => }/test/runner_child.cpp (100%) rename tests/{dpl => }/unused/test_caller.cpp (100%) rename tests/{dpl => }/unused/test_crypto_hash.cpp (100%) rename tests/{dpl => }/unused/test_message_queue.cpp (100%) rename tests/{dpl => }/unused/test_shm.cpp (100%) rename tests/{dpl => }/unused/test_sql_connection.cpp (100%) rename tests/{dpl => }/unused/test_task.cpp (100%) rename tests/{dpl => }/utils/CMakeLists.txt (83%) rename tests/{dpl => }/utils/bash_utils.cpp (100%) rename tests/{dpl => }/utils/main.cpp (100%) rename tests/{dpl => }/utils/widget_version.cpp (100%) rename tests/{dpl => }/utils/wrt_utility.cpp (100%) diff --git a/3rdparty/minizip/miniunz.c b/3rdparty/minizip/miniunz.c index 233e52d..c8c4904 100644 --- a/3rdparty/minizip/miniunz.c +++ b/3rdparty/minizip/miniunz.c @@ -37,6 +37,7 @@ #ifdef unix # include # include +# include #else # include # include diff --git a/build/encryption/CMakeLists.txt b/build/encryption/CMakeLists.txt index bf38cae..7949864 100644 --- a/build/encryption/CMakeLists.txt +++ b/build/encryption/CMakeLists.txt @@ -54,7 +54,8 @@ TARGET_LINK_LIBRARIES(${TARGET_DPL_ENCRYPTION} ${TARGET_DPL_EFL} ) -TARGET_LINK_LIBRARIES(${TARGET_DPL_ENCRYPTION} -L./libs -lcal) +TARGET_LINK_LIBRARIES(${TARGET_DPL_ENCRYPTION} "-ldukgenerator" ) +TARGET_LINK_LIBRARIES(${TARGET_DPL_ENCRYPTION} "-lcryptsvc" ) # Target library properties SET_TARGET_PROPERTIES(${TARGET_DPL_ENCRYPTION} PROPERTIES diff --git a/build/encryption/libs/libcal.a b/build/encryption/libs/libcal.a deleted file mode 100755 index 8400c5f506fe1ad1915fb18189265b512ac85fe1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4734 zcmbtXU5r~t6`r}*-o3l_I{TB~=BEyuw4vFxo$O|_O`{~+v`HMcX((z{Dui=w-`zE_ zuZ^#rWLp9fQfVs@5D)!9Dgr@U9*Ts3NC+qrg1$vOK#Rl^DnESygrMS~Nc@!V8=vvs zO&&ln+IzqAopa{Q%$ak?v%8P_?aIor;e2*|J1}!-u248!n7cchEf`b$oy{Jcv;G%` zl~NkdM@x_0UGeLcZr$$$=PR|EQuSIHnp~yT$~8GcFY4Uk*~5?v1%&Ls=VoWK+1W$$ zyk@;)GJ}9+gTRgI%eFh#tahfL5si0=)(&w3|t#&?%`wy^&soWN~61;||$? zN)7iNQ*=y;BZAN|t#xsN`jOqLIFZK)nVdeJ?#7nB$72P2}>9Q9JWAk-YDShCI%Y>?Y%^B25rw+Kypchb65=&1J; zt=oid^v;mpCUmR!2TV4xUFZ&Pj(v9s&3ey~?h?AkyTHD;3*G1aj@GQuDeoVo@6+Fc zlQUWHo+jO+zia5M_Ztp$hpcGc8z#L==uvMs>6CsPeVoY?-YRK9A2akm@1LXx^rE4s zyc?XxLCs}5lc&8ETIcjn4L##AM&h{stZ_c?U8eIH{k)-%diT;=6#5bGL!@VgUhtl! z^9O`hy%$Lr^_g{uO^)9FO1B%$i z)HvB|uNsy}CCPr&+hI=)Btqy160aag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&-(D2g?>BGcr0hJ~6p{$4>g8BJhcb`xQEYJVfLM zLLU?XWH#K_n9(eOW+{&2yWM&rN%1K{VEuI41Oc}zthW*Z>+Qz69)g;*cpU4x2(kSb zR4$9l>^vI{B-w2WUTUs;vgH*)c#>VWIyVQI)uZIeaWK}eJAK40R||`vEPK)=ufFKl z1?!(QH$Af-qQHaDOoyon8fR=8o&YKlEYwM(1h!{V_ZzKpQxvPMeA(~B<{%C4l<)eL zqG&8s>&+zZa=jMLyx}*M`#q>G->o(4!ksI7^9`lUx8~fu*FeBv;(@mAWAO}l;Fe>_ zsjXX+s@6p9SfzBb6G?E> zcm($*hO&>!hawMJ=k0UR2fDHeTu-USnI)_O*sKS*V5GWVPBpnTsiN2PL@M8CK=kvi zdDqM5>;5T`qD!DDRpzQ;jyv23ud*v+kEF&;XDmPLS!?Ah-ja{looLXh%Q~#{>Rx4@ zZoz=d8AcGPLUn1$N5Q5l)ux|9LWdhoY^X?OZ@oF?HJkNPzSUel&|DounG zYSE>Axl`fm&0KoxpyyN8wDL-!_Tx$@*q?q5KD>{~)ngiXA3otm8{1ZV=>Na`_`orJ zAgXwmDClNvd%=xN)4d>kewb!#d^-!T<6*4h1Reog2XkQ7aVuog2cqbUqF+d1#9Lqs z$9s2Gur9{q`b@mLA+ygYK5Ro6jP-3A{b*m(X!M)mcixbYjd?Y5p!s?DB`N4;Y^TA) z^LsBeKaOwa_ZVc;harBBczmFmW^8NHTtmq4j+_TO%Z(2Z^96u@%v{;ruhQ=c;-ywdfEPlPdG2DLV4jYHItVWkV9oI z-a))BGZ<_}B!(jg2aP-0X_mO0)A%cmZ)v=!kwwq(64)5xRT}v&LwbKg zFA?)tr+HHI>orenzEktvL=?r8)*m6_h#u3tps}Ixw8nE9|Hys7JXD?G>vH7zpq-~G Kf}-R7NB$o=EdVC~ diff --git a/build/encryption/libs/libcal.i586.a b/build/encryption/libs/libcal.i586.a deleted file mode 100755 index b02e413dd2ac51d23196f6cfd9d4d491726db729..0000000000000000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HlHBz6lrOL8ZnF$9n|>uqI72@eDT@*4yHrH;kTW zHC7vFEj3!x!xGqBp=LEsqd;k?o!NA-R%C|p!#jzbKZKjj5?xIK$r7ySX0sZnT%fa7 zJYo7H`Jra1j5QUO;4j){vrus>XYls<@dR!*{+nXXYVM`gk%+jpX$J2UcZE2g)8V&q z{*Ez?_VA~Dd}b{9&X1CJdEL1OW)6>z%(#aqC-0p&<{ldvotbd?rOg-Mk%MFR4!TE1 z4~|dna;H8tGUnbpH8Q~AxFY<`qUxyw>9_;jMxmyF?bt9p|LhIHdq(1MGe5E?ct;Ug zgA$tpE($jju_u`a+7lYn8t>6KuJNG8qZ&_YoYPp;ct+!=G%jiUqQ>VnzO3;zjlb0R z2aRuPd`n{oHUQ_jLE|=!LmDSF9@m)HSkuVAGT2}JpapVolJjp0;*T`)S3UXfHU3@W ze>AouhqUw058@pf(;6o<9@CiD$bVMoe@5eD8lTkohQ@zrysGg!5f?UzLYs&)sEder z8#UgkafpcRw@33SB3_t>G=D&2QR69%4{7`}^NsQF+7S}Bw Fri, 22 Feb 2013 14:54:21 +0900 + wrt-commons (0.2.98) unstable; urgency=low * wrt_commons_reset.sh fix diff --git a/modules/dbus/config.cmake b/modules/dbus/config.cmake index 995c071..f2fefde 100644 --- a/modules/dbus/config.cmake +++ b/modules/dbus/config.cmake @@ -40,6 +40,7 @@ SET(DPL_DBUS_HEADERS ${PROJECT_SOURCE_DIR}/modules/dbus/include/dpl/dbus/dbus_server_serialization.h ${PROJECT_SOURCE_DIR}/modules/dbus/include/dpl/dbus/dbus_signature.h ${PROJECT_SOURCE_DIR}/modules/dbus/include/dpl/dbus/dispatcher.h + ${PROJECT_SOURCE_DIR}/modules/dbus/include/dpl/dbus/glib_util.h ${PROJECT_SOURCE_DIR}/modules/dbus/include/dpl/dbus/exception.h ${PROJECT_SOURCE_DIR}/modules/dbus/include/dpl/dbus/interface.h ${PROJECT_SOURCE_DIR}/modules/dbus/include/dpl/dbus/method_proxy.h diff --git a/modules/dbus/include/dpl/dbus/connection.h b/modules/dbus/include/dpl/dbus/connection.h index 92a8ad3..4a455ad 100644 --- a/modules/dbus/include/dpl/dbus/connection.h +++ b/modules/dbus/include/dpl/dbus/connection.h @@ -26,11 +26,11 @@ #include #include #include -#include #include #include #include #include +#include namespace DPL { namespace DBus { diff --git a/modules/dbus/include/dpl/dbus/glib_util.h b/modules/dbus/include/dpl/dbus/glib_util.h new file mode 100644 index 0000000..13206e3 --- /dev/null +++ b/modules/dbus/include/dpl/dbus/glib_util.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * @file glib_util.h + * @author Iwanek Tomasz (t.iwanek@samsung.com) + * @version 1.0 + * @brief This file is the definitions of loop controlling utilities + */ +#ifndef GLIB_UTIL_H +#define GLIB_UTIL_H + +//this header wraps glib headers which generates warnings + +#pragma GCC system_header +#include + +#endif // GLIB_UTIL_H diff --git a/modules/encryption/src/resource_decryption.cpp b/modules/encryption/src/resource_decryption.cpp index 2ec612e..c599e64 100644 --- a/modules/encryption/src/resource_decryption.cpp +++ b/modules/encryption/src/resource_decryption.cpp @@ -26,6 +26,7 @@ #include #include #include +#include namespace { #define BITS_SIZE 128 @@ -52,9 +53,10 @@ void ResourceDecryptor::SetDecryptionKey(std::string userKey) return; } - char **duk = calculate(const_cast(userKey.c_str()), - userKey.size(), KEY_SIZE); - unsigned char *key = reinterpret_cast(*duk); + char* pKey = GetDeviceUniqueKey(const_cast(userKey.c_str()), + userKey.size(), KEY_SIZE); + + unsigned char *key = reinterpret_cast(pKey); if (0 > AES_set_decrypt_key(key, BITS_SIZE, &m_decKey)) { ThrowMsg(ResourceDecryptor::Exception::GetDecKeyFailed, diff --git a/modules/encryption/src/resource_encryption.cpp b/modules/encryption/src/resource_encryption.cpp index 96e90b7..8dc5284 100644 --- a/modules/encryption/src/resource_encryption.cpp +++ b/modules/encryption/src/resource_encryption.cpp @@ -24,6 +24,7 @@ #include #include +#include namespace { #define BITS_SIZE 128 @@ -54,9 +55,9 @@ void ResourceEncryptor::CreateEncryptionKey(std::string userKey) return; } - char **duk = calculate(const_cast(userKey.c_str()), - userKey.size(), KEY_SIZE); - unsigned char *key = reinterpret_cast(*duk); + char* pKey = GetDeviceUniqueKey(const_cast(userKey.c_str()), + userKey.size(), KEY_SIZE); + unsigned char *key = reinterpret_cast(pKey); if (0 > AES_set_encrypt_key(key, BITS_SIZE, &m_encKey)) { ThrowMsg(ResourceEncryptor::Exception::CreateEncKeyFailed, diff --git a/modules/security_origin_dao/dao/security_origin_dao.cpp b/modules/security_origin_dao/dao/security_origin_dao.cpp index 07c816f..8c4874a 100644 --- a/modules/security_origin_dao/dao/security_origin_dao.cpp +++ b/modules/security_origin_dao/dao/security_origin_dao.cpp @@ -54,6 +54,10 @@ DPL::DB::SqlConnection::Flag::Type SECURITY_ORIGIN_DB_TYPE = const char* const SECURITY_ORIGIN_DB_NAME = ".security_origin.db"; const char* const SECURITY_ORIGIN_DB_SQL_PATH = "/usr/share/wrt-engine/security_origin_db.sql"; +const char* const SECURITY_DATABASE_JOURNAL_FILENAME = "-journal"; + +const int WEB_APPLICATION_UID = 5000; +const int WEB_APPLICATION_GUID = 5000; std::string createDatabasePath(const WrtDB::WidgetPkgName &pkgName) { @@ -114,6 +118,23 @@ void checkDatabase(std::string databasePath) SECURITY_ORIGIN_DB_OPTION); con.ExecCommand(ssBuffer.str().c_str()); } + + if(chown(databasePath.c_str(), + WEB_APPLICATION_UID, + WEB_APPLICATION_GUID) != 0) + { + ThrowMsg(SecurityOriginDAO::Exception::DatabaseError, + "Fail to change uid/guid"); + } + std::string databaseJournal = + databasePath + SECURITY_DATABASE_JOURNAL_FILENAME; + if(chown(databaseJournal.c_str(), + WEB_APPLICATION_UID, + WEB_APPLICATION_GUID) != 0) + { + ThrowMsg(SecurityOriginDAO::Exception::DatabaseError, + "Fail to change uid/guid"); + } } SQL_CONNECTION_EXCEPTION_HANDLER_END("Fail to get database Path") } @@ -191,9 +212,30 @@ Result SecurityOriginDAO::getResult( "Failed to get result for security origin") } -void SecurityOriginDAO::setSecurityOriginData( - const SecurityOriginData &securityOriginData, - const Result result) +bool SecurityOriginDAO::isReadOnly(const SecurityOriginData &securityOriginData) +{ + SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN + { + SECURITY_ORIGIN_DB_SELECT(select, SecurityOriginInfo, &m_securityOriginDBInterface); + select->Where( + And(And(And(Equals(securityOriginData.feature), + Equals(securityOriginData.origin.scheme)), + Equals(securityOriginData.origin.host)), + Equals(securityOriginData.origin.port))); + SecurityOriginInfo::Select::RowList rows = select->GetRowList(); + + if (rows.empty()) { + return RESULT_UNKNOWN; + } + SecurityOriginInfo::Row row = rows.front(); + return row.Get_readonly() ? true : false; + } + SQL_CONNECTION_EXCEPTION_HANDLER_END("Fail to get readonly property") +} + +void SecurityOriginDAO::setSecurityOriginData(const SecurityOriginData &securityOriginData, + const Result result, + const bool readOnly) { SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN { @@ -204,6 +246,7 @@ void SecurityOriginDAO::setSecurityOriginData( row.Set_host(securityOriginData.origin.host); row.Set_port(securityOriginData.origin.port); row.Set_result(result); + row.Set_readonly(readOnly ? 1 : 0); if (true == hasResult(securityOriginData)) { SECURITY_ORIGIN_DB_UPDATE(update, @@ -224,6 +267,15 @@ void SecurityOriginDAO::setSecurityOriginData( SQL_CONNECTION_EXCEPTION_HANDLER_END("Fail to set security origin data") } +void SecurityOriginDAO::setPrivilegeSecurityOriginData(const Feature feature) +{ + Origin origin(DPL::FromUTF8String("file"), + DPL::FromUTF8String(""), + 0); + SecurityOriginData data(feature, origin); + setSecurityOriginData(data, RESULT_ALLOW_ALWAYS, true); +} + void SecurityOriginDAO::removeSecurityOriginData( const SecurityOriginData &securityOriginData) { diff --git a/modules/security_origin_dao/dao/security_origin_dao_types.cpp b/modules/security_origin_dao/dao/security_origin_dao_types.cpp index 601b277..639c2b7 100644 --- a/modules/security_origin_dao/dao/security_origin_dao_types.cpp +++ b/modules/security_origin_dao/dao/security_origin_dao_types.cpp @@ -25,4 +25,11 @@ #include #include -namespace SecurityOriginDB {} // namespace SecurityOriginDB \ No newline at end of file +namespace SecurityOriginDB { +const std::map g_W3CPrivilegeTextMap = { + {"http://tizen.org/privilege/location", FEATURE_GEOLOCATION}, + {"http://tizen.org/privilege/notification", FEATURE_WEB_NOTIFICATION}, + {"http://tizen.org/privilege/unlimitedstorage", FEATURE_WEB_DATABASE}, + {"http://tizen.org/privilege/filesystem.write", FEATURE_FILE_SYSTEM_ACCESS} +}; +} // namespace SecurityOriginDB diff --git a/modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao.h b/modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao.h index f9ad12f..9f075ee 100644 --- a/modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao.h +++ b/modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao.h @@ -43,8 +43,11 @@ class SecurityOriginDAO virtual ~SecurityOriginDAO(); SecurityOriginDataList getSecurityOriginDataList(); Result getResult(const SecurityOriginData &securityOriginData); + bool isReadOnly(const SecurityOriginData &securityOriginData); void setSecurityOriginData(const SecurityOriginData &securityOriginData, - const Result result); + const Result result, + const bool readOnly = false); + void setPrivilegeSecurityOriginData(const Feature feature); void removeSecurityOriginData(const SecurityOriginData &securityOriginData); void removeSecurityOriginData(const Result result); diff --git a/modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao_types.h b/modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao_types.h index c517f05..28ead78 100644 --- a/modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao_types.h +++ b/modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao_types.h @@ -26,6 +26,7 @@ #include #include +#include #include namespace SecurityOriginDB { @@ -48,6 +49,8 @@ enum Result RESULT_DENY_ALWAYS }; +extern const std::map g_W3CPrivilegeTextMap; + struct Origin { DPL::String scheme; diff --git a/modules/security_origin_dao/orm/security_origin_db b/modules/security_origin_dao/orm/security_origin_db index cb45aa4..2d9c4f9 100644 --- a/modules/security_origin_dao/orm/security_origin_db +++ b/modules/security_origin_dao/orm/security_origin_db @@ -1,11 +1,12 @@ SQL(BEGIN TRANSACTION;) CREATE_TABLE(SecurityOriginInfo) - COLUMN_NOT_NULL(feature, INT, ) - COLUMN_NOT_NULL(scheme, TEXT,DEFAULT '') - COLUMN_NOT_NULL(host, TEXT,DEFAULT '') - COLUMN_NOT_NULL(port, INT, DEFAULT 0) - COLUMN_NOT_NULL(result, INT, DEFAULT 0) + COLUMN_NOT_NULL(feature, INT, ) + COLUMN_NOT_NULL(scheme, TEXT,DEFAULT '') + COLUMN_NOT_NULL(host, TEXT,DEFAULT '') + COLUMN_NOT_NULL(port, INT, DEFAULT 0) + COLUMN_NOT_NULL(result, INT, DEFAULT 0) + COLUMN_NOT_NULL(readonly, INT, DEFAULT 0) TABLE_CONSTRAINTS(PRIMARY KEY(feature,scheme,host,port)) CREATE_TABLE_END() diff --git a/modules/widget_dao/dao/widget_dao.cpp b/modules/widget_dao/dao/widget_dao.cpp index 6529fd0..65ea027 100644 --- a/modules/widget_dao/dao/widget_dao.cpp +++ b/modules/widget_dao/dao/widget_dao.cpp @@ -380,15 +380,8 @@ DbWidgetHandle WidgetDAO::registerWidgetInfo( row.Set_app_id(*handle); } - if (regInfo.webAppType == APP_TYPE_UNKNOWN && regInfo.type != - APP_TYPE_UNKNOWN) - { - // TODO : regInfo.type is temporary code for security. - // This code will be removed. - row.Set_widget_type(regInfo.type.appType); - } else { - row.Set_widget_type(regInfo.webAppType.appType); - } + row.Set_widget_type(regInfo.webAppType.appType); + row.Set_widget_id(widgetConfigurationInfo.widget_id); row.Set_defaultlocale(widgetConfigurationInfo.defaultlocale); row.Set_widget_version(widgetConfigurationInfo.version); diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h b/modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h index c6ae0bd..f56be55 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h @@ -299,7 +299,6 @@ class ConfigParserData IconsList iconsList; // tizen id / required platform min version for TIZEN webapp - DPL::OptionalString tizenId; DPL::OptionalString tizenMinVersionRequired; DPL::OptionalString tizenPkgId; DPL::OptionalString tizenAppId; diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h index a7cd866..c2b1de2 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h @@ -163,7 +163,6 @@ struct WidgetRegisterInfo {} WidgetType webAppType; - WidgetType type; // TODO : This type will be removed. DPL::OptionalString guid; DPL::OptionalString version; DPL::OptionalString minVersion; @@ -174,8 +173,6 @@ struct WidgetRegisterInfo ConfigParserData configInfo; LocalizationData localizationData; - DPL::OptionalString pkgname; - WidgetPkgName pkgName; TizenPkgId tzPkgid; TizenAppId tzAppid; diff --git a/packaging/wrt-commons.spec b/packaging/wrt-commons.spec index a5a3dd2..412ea1e 100644 --- a/packaging/wrt-commons.spec +++ b/packaging/wrt-commons.spec @@ -1,7 +1,7 @@ -#git:framework/web/wrt-commons wrt-commons 0.2.98 +#git:framework/web/wrt-commons wrt-commons 0.2.99 Name: wrt-commons Summary: Wrt common library -Version: 0.2.98 +Version: 0.2.99 Release: 1 Group: Development/Libraries License: Apache License, Version 2.0 @@ -23,6 +23,9 @@ BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(libiri) BuildRequires: pkgconfig(libidn) +BuildRequires: libcryptsvc-devel +BuildRequires: dukgenerator-devel +Requires: libcryptsvc %description Wrt common library @@ -45,12 +48,6 @@ Wrt common library development headers %build -%ifarch %{ix86} -cp build/encryption/libs/libcal.i586.a build/encryption/libs/libcal.a -%else -cp build/encryption/libs/libcal.arm.a build/encryption/libs/libcal.a -%endif - export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed" cmake . -DVERSION=%{version} \ @@ -142,9 +139,7 @@ echo "[WRT] wrt-commons postinst done ..." %attr(755,root,root) %{_bindir}/wrt_commons_create_clean_db.sh %attr(755,root,root) %{_bindir}/wrt_commons_reset_db.sh %if %{with_tests} - %attr(755,root,root) %{_bindir}/dpl-tests-* - %attr(755,root,root) %{_bindir}/dpl-dbus-test-service - %attr(755,root,root) %{_bindir}/wrt-tests-* + %attr(755,root,root) %{_bindir}/wrt-commons-tests-* %attr(755,root,root) %{_bindir}/wrt_dao_tests_prepare_db.sh %{_datadir}/dbus-1/services/org.tizen.DBusTestService.service /opt/share/wrt/wrt-commons/tests/* diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 40112fe..8ebf885 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -11,8 +11,15 @@ WRT_ADD_INTERNAL_DEPENDENCIES( ${TARGET_DPL_TEST_ENGINE_EFL} ) +ADD_SUBDIRECTORY(core) ADD_SUBDIRECTORY(dao) -ADD_SUBDIRECTORY(dpl) +ADD_SUBDIRECTORY(db) +ADD_SUBDIRECTORY(dbus) +ADD_SUBDIRECTORY(event) +#ADD_SUBDIRECTORY(files_localization) TODO localization mockups need to be fixed +ADD_SUBDIRECTORY(localizationTagsProvider) +ADD_SUBDIRECTORY(utils) +ADD_SUBDIRECTORY(test) # Rollback CXX flags #SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_BACKUP}) \ No newline at end of file diff --git a/tests/common/include/glib_interface.h b/tests/common/include/glib_interface.h new file mode 100644 index 0000000..5629f99 --- /dev/null +++ b/tests/common/include/glib_interface.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * @file glib_interface.h + * @author Iwanek Tomasz (t.iwanek@samsung.com) + * @version 1.0 + * @brief This file is the definitions of loop controlling utilities + */ + +#ifndef GLIB_INTERFACE_H +#define GLIB_INTERFACE_H + +//this header wraps glib headers which generates warnings + +#pragma GCC system_header +#include +#include + +#endif // GLIB_INTERFACE_H diff --git a/tests/common/src/loop_control.cpp b/tests/common/src/loop_control.cpp index 2eb85cb..4855288 100644 --- a/tests/common/src/loop_control.cpp +++ b/tests/common/src/loop_control.cpp @@ -20,14 +20,12 @@ * @brief This is implementation of EFL version of loop control */ +#include #include #include #include -#include -#include - namespace LoopControl { void init_loop(int argc, char *argv[]) { diff --git a/tests/dpl/core/CMakeLists.txt b/tests/core/CMakeLists.txt similarity index 55% rename from tests/dpl/core/CMakeLists.txt rename to tests/core/CMakeLists.txt index 48d2c93..9e7ffa4 100644 --- a/tests/dpl/core/CMakeLists.txt +++ b/tests/core/CMakeLists.txt @@ -26,29 +26,29 @@ # generating proper output files # -SET(TARGET_NAME "dpl-tests-core") +SET(TARGET_NAME "wrt-commons-tests-core") # Set DPL tests sources SET(DPL_TESTS_CORE_SOURCES - ${TESTS_DPL_DIR}/core/main.cpp - ${TESTS_DPL_DIR}/core/test_address.cpp - ${TESTS_DPL_DIR}/core/test_binary_queue.cpp - ${TESTS_DPL_DIR}/core/test_foreach.cpp - ${TESTS_DPL_DIR}/core/test_fast_delegate.cpp - ${TESTS_DPL_DIR}/core/test_log_unhandled_exception.cpp - ${TESTS_DPL_DIR}/core/test_once.cpp - ${TESTS_DPL_DIR}/core/test_serialization.cpp - ${TESTS_DPL_DIR}/core/test_scoped_array.cpp - ${TESTS_DPL_DIR}/core/test_scoped_close.cpp - ${TESTS_DPL_DIR}/core/test_scoped_fclose.cpp - ${TESTS_DPL_DIR}/core/test_scoped_free.cpp - ${TESTS_DPL_DIR}/core/test_scoped_ptr.cpp - ${TESTS_DPL_DIR}/core/test_semaphore.cpp - ${TESTS_DPL_DIR}/core/test_shared_ptr.cpp - ${TESTS_DPL_DIR}/core/test_string.cpp - ${TESTS_DPL_DIR}/core/test_thread.cpp - ${TESTS_DPL_DIR}/core/test_type_list.cpp - ${TESTS_DPL_DIR}/core/test_zip_input.cpp + ${TESTS_DIR}/core/main.cpp + ${TESTS_DIR}/core/test_address.cpp + ${TESTS_DIR}/core/test_binary_queue.cpp + ${TESTS_DIR}/core/test_foreach.cpp + ${TESTS_DIR}/core/test_fast_delegate.cpp + ${TESTS_DIR}/core/test_log_unhandled_exception.cpp + ${TESTS_DIR}/core/test_once.cpp + ${TESTS_DIR}/core/test_serialization.cpp + ${TESTS_DIR}/core/test_scoped_array.cpp + ${TESTS_DIR}/core/test_scoped_close.cpp + ${TESTS_DIR}/core/test_scoped_fclose.cpp + ${TESTS_DIR}/core/test_scoped_free.cpp + ${TESTS_DIR}/core/test_scoped_ptr.cpp + ${TESTS_DIR}/core/test_semaphore.cpp + ${TESTS_DIR}/core/test_shared_ptr.cpp + ${TESTS_DIR}/core/test_string.cpp + ${TESTS_DIR}/core/test_thread.cpp + ${TESTS_DIR}/core/test_type_list.cpp + ${TESTS_DIR}/core/test_zip_input.cpp ) WRT_TEST_ADD_INTERNAL_DEPENDENCIES(${TARGET_NAME} ${TARGET_DPL_EFL}) @@ -56,6 +56,6 @@ WRT_TEST_BUILD(${TARGET_NAME} ${DPL_TESTS_CORE_SOURCES}) WRT_TEST_INSTALL(${TARGET_NAME}) INSTALL(FILES - ${TESTS_DPL_DIR}/core/data/sample.zip + ${TESTS_DIR}/core/data/sample.zip DESTINATION /opt/share/wrt/wrt-commons/tests/core ) diff --git a/tests/dpl/core/DESCRIPTION b/tests/core/DESCRIPTION similarity index 100% rename from tests/dpl/core/DESCRIPTION rename to tests/core/DESCRIPTION diff --git a/tests/dpl/core/data/sample.zip b/tests/core/data/sample.zip similarity index 100% rename from tests/dpl/core/data/sample.zip rename to tests/core/data/sample.zip diff --git a/tests/dpl/core/main.cpp b/tests/core/main.cpp similarity index 100% rename from tests/dpl/core/main.cpp rename to tests/core/main.cpp diff --git a/tests/dpl/core/test_address.cpp b/tests/core/test_address.cpp similarity index 100% rename from tests/dpl/core/test_address.cpp rename to tests/core/test_address.cpp diff --git a/tests/dpl/core/test_binary_queue.cpp b/tests/core/test_binary_queue.cpp similarity index 100% rename from tests/dpl/core/test_binary_queue.cpp rename to tests/core/test_binary_queue.cpp diff --git a/tests/dpl/core/test_fast_delegate.cpp b/tests/core/test_fast_delegate.cpp similarity index 100% rename from tests/dpl/core/test_fast_delegate.cpp rename to tests/core/test_fast_delegate.cpp diff --git a/tests/dpl/core/test_foreach.cpp b/tests/core/test_foreach.cpp similarity index 100% rename from tests/dpl/core/test_foreach.cpp rename to tests/core/test_foreach.cpp diff --git a/tests/dpl/core/test_log_unhandled_exception.cpp b/tests/core/test_log_unhandled_exception.cpp similarity index 100% rename from tests/dpl/core/test_log_unhandled_exception.cpp rename to tests/core/test_log_unhandled_exception.cpp diff --git a/tests/dpl/core/test_once.cpp b/tests/core/test_once.cpp similarity index 100% rename from tests/dpl/core/test_once.cpp rename to tests/core/test_once.cpp diff --git a/tests/dpl/core/test_scoped_array.cpp b/tests/core/test_scoped_array.cpp similarity index 100% rename from tests/dpl/core/test_scoped_array.cpp rename to tests/core/test_scoped_array.cpp diff --git a/tests/dpl/core/test_scoped_close.cpp b/tests/core/test_scoped_close.cpp similarity index 100% rename from tests/dpl/core/test_scoped_close.cpp rename to tests/core/test_scoped_close.cpp diff --git a/tests/dpl/core/test_scoped_fclose.cpp b/tests/core/test_scoped_fclose.cpp similarity index 100% rename from tests/dpl/core/test_scoped_fclose.cpp rename to tests/core/test_scoped_fclose.cpp diff --git a/tests/dpl/core/test_scoped_free.cpp b/tests/core/test_scoped_free.cpp similarity index 100% rename from tests/dpl/core/test_scoped_free.cpp rename to tests/core/test_scoped_free.cpp diff --git a/tests/dpl/core/test_scoped_ptr.cpp b/tests/core/test_scoped_ptr.cpp similarity index 100% rename from tests/dpl/core/test_scoped_ptr.cpp rename to tests/core/test_scoped_ptr.cpp diff --git a/tests/dpl/core/test_semaphore.cpp b/tests/core/test_semaphore.cpp similarity index 100% rename from tests/dpl/core/test_semaphore.cpp rename to tests/core/test_semaphore.cpp diff --git a/tests/dpl/core/test_serialization.cpp b/tests/core/test_serialization.cpp similarity index 100% rename from tests/dpl/core/test_serialization.cpp rename to tests/core/test_serialization.cpp diff --git a/tests/dpl/core/test_shared_ptr.cpp b/tests/core/test_shared_ptr.cpp similarity index 100% rename from tests/dpl/core/test_shared_ptr.cpp rename to tests/core/test_shared_ptr.cpp diff --git a/tests/dpl/core/test_string.cpp b/tests/core/test_string.cpp similarity index 100% rename from tests/dpl/core/test_string.cpp rename to tests/core/test_string.cpp diff --git a/tests/dpl/core/test_thread.cpp b/tests/core/test_thread.cpp similarity index 100% rename from tests/dpl/core/test_thread.cpp rename to tests/core/test_thread.cpp diff --git a/tests/dpl/core/test_type_list.cpp b/tests/core/test_type_list.cpp similarity index 100% rename from tests/dpl/core/test_type_list.cpp rename to tests/core/test_type_list.cpp diff --git a/tests/dpl/core/test_zip_input.cpp b/tests/core/test_zip_input.cpp similarity index 100% rename from tests/dpl/core/test_zip_input.cpp rename to tests/core/test_zip_input.cpp diff --git a/tests/dao/CMakeLists.txt b/tests/dao/CMakeLists.txt index 350431c..4028598 100644 --- a/tests/dao/CMakeLists.txt +++ b/tests/dao/CMakeLists.txt @@ -22,13 +22,12 @@ FILE(GLOB DAO_TESTS_SOURCES "${PROJECT_SOURCE_DIR}/tests/dao/*DAO.cpp") # target wrt-tests-dao -SET(TARGET_DAO_TEST "wrt-tests-dao") +SET(TARGET_DAO_TEST "wrt-commons-tests-dao") WRT_TEST_INCLUDE_DIRECTORIES(${TARGET_DAO_TEST} ${PROJECT_SOURCE_DIR}/modules/support/) WRT_TEST_ADD_INTERNAL_DEPENDENCIES(${TARGET_DAO_TEST} ${TARGET_WRT_DAO_RW_LIB} ${TARGET_CUSTOM_HANDLER_DAO_RW_LIB}) WRT_TEST_BUILD(${TARGET_DAO_TEST} ${DAO_TESTS_SOURCES} tests_dao.cpp) WRT_TEST_INSTALL(${TARGET_DAO_TEST}) - # common installed files INSTALL(PROGRAMS ${PROJECT_SOURCE_DIR}/tests/dao/wrt_dao_tests_prepare_db.sh diff --git a/tests/dpl/db/CMakeLists.txt b/tests/db/CMakeLists.txt similarity index 86% rename from tests/dpl/db/CMakeLists.txt rename to tests/db/CMakeLists.txt index f4b5c22..837679e 100644 --- a/tests/dpl/db/CMakeLists.txt +++ b/tests/db/CMakeLists.txt @@ -26,13 +26,13 @@ # generating proper output files # -SET(TARGET_NAME "dpl-tests-db") +SET(TARGET_NAME "wrt-commons-tests-db") # Set DPL tests sources SET(DPL_TESTS_DB_SOURCES - ${TESTS_DPL_DIR}/db/main.cpp - ${TESTS_DPL_DIR}/db/test_orm.cpp - ${TESTS_DPL_DIR}/db/test_sql_connection.cpp + ${TESTS_DIR}/db/main.cpp + ${TESTS_DIR}/db/test_orm.cpp + ${TESTS_DIR}/db/test_sql_connection.cpp ) ADD_SUBDIRECTORY(orm) @@ -44,6 +44,6 @@ WRT_TEST_BUILD(${TARGET_NAME} ${DPL_TESTS_DB_SOURCES}) WRT_TEST_INSTALL(${TARGET_NAME}) INSTALL(FILES - ${TESTS_DPL_DIR}/db/orm/dpl_orm_test.db + ${TESTS_DIR}/db/orm/dpl_orm_test.db DESTINATION /opt/share/wrt/wrt-commons/tests/db ) diff --git a/tests/dpl/db/main.cpp b/tests/db/main.cpp similarity index 100% rename from tests/dpl/db/main.cpp rename to tests/db/main.cpp diff --git a/tests/dpl/db/orm/CMakeLists.txt b/tests/db/orm/CMakeLists.txt similarity index 100% rename from tests/dpl/db/orm/CMakeLists.txt rename to tests/db/orm/CMakeLists.txt diff --git a/tests/dpl/db/orm/dpl_orm_test_db b/tests/db/orm/dpl_orm_test_db similarity index 100% rename from tests/dpl/db/orm/dpl_orm_test_db rename to tests/db/orm/dpl_orm_test_db diff --git a/tests/dpl/db/orm/dpl_orm_test_db_definitions b/tests/db/orm/dpl_orm_test_db_definitions similarity index 100% rename from tests/dpl/db/orm/dpl_orm_test_db_definitions rename to tests/db/orm/dpl_orm_test_db_definitions diff --git a/tests/dpl/db/orm/dpl_orm_test_db_sql_generator.h b/tests/db/orm/dpl_orm_test_db_sql_generator.h similarity index 100% rename from tests/dpl/db/orm/dpl_orm_test_db_sql_generator.h rename to tests/db/orm/dpl_orm_test_db_sql_generator.h diff --git a/tests/dpl/db/orm/dpl_orm_test_db_sql_generator.h.gch b/tests/db/orm/dpl_orm_test_db_sql_generator.h.gch similarity index 100% rename from tests/dpl/db/orm/dpl_orm_test_db_sql_generator.h.gch rename to tests/db/orm/dpl_orm_test_db_sql_generator.h.gch diff --git a/tests/dpl/db/orm/generator_dpl_orm_test.h b/tests/db/orm/generator_dpl_orm_test.h similarity index 100% rename from tests/dpl/db/orm/generator_dpl_orm_test.h rename to tests/db/orm/generator_dpl_orm_test.h diff --git a/tests/dpl/db/test_orm.cpp b/tests/db/test_orm.cpp similarity index 100% rename from tests/dpl/db/test_orm.cpp rename to tests/db/test_orm.cpp diff --git a/tests/dpl/db/test_sql_connection.cpp b/tests/db/test_sql_connection.cpp similarity index 100% rename from tests/dpl/db/test_sql_connection.cpp rename to tests/db/test_sql_connection.cpp diff --git a/tests/dpl/dbus/CMakeLists.txt b/tests/dbus/CMakeLists.txt similarity index 83% rename from tests/dpl/dbus/CMakeLists.txt rename to tests/dbus/CMakeLists.txt index 066ad79..4a1f338 100644 --- a/tests/dpl/dbus/CMakeLists.txt +++ b/tests/dbus/CMakeLists.txt @@ -20,20 +20,20 @@ INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(DEPENDENCIES gthread-2.0 REQUIRED) +PKG_CHECK_MODULES(DEPENDENCIES gthread-2.0 REQUIRED) -SET(TARGET_DBUS_TESTS "dpl-tests-dbus") -SET(TARGET_DBUS_TEST_SERVICE "dpl-dbus-test-service") +SET(TARGET_DBUS_TESTS "wrt-commons-tests-dbus") +SET(TARGET_DBUS_TEST_SERVICE "wrt-commons-tests-dbus-test-service") SET(DBUS_TESTS_SRCS - ${TESTS_DPL_DIR}/dbus/main.cpp - ${TESTS_DPL_DIR}/dbus/test_cases.cpp - ${TESTS_DPL_DIR}/dbus/dbus_test.cpp + ${TESTS_DIR}/dbus/main.cpp + ${TESTS_DIR}/dbus/test_cases.cpp + ${TESTS_DIR}/dbus/dbus_test.cpp ${TESTS_COMMON_DIR}/src/loop_control.cpp ) SET(DBUS_TEST_SERVICE_SRCS - ${TESTS_DPL_DIR}/dbus/test_service.cpp + ${TESTS_DIR}/dbus/test_service.cpp ${TESTS_COMMON_DIR}/src/loop_control.cpp ) @@ -58,6 +58,6 @@ WRT_TEST_BUILD(${TARGET_DBUS_TEST_SERVICE} ${DBUS_TEST_SERVICE_SRCS}) WRT_TEST_INSTALL(${TARGET_DBUS_TEST_SERVICE}) INSTALL(FILES - ${TESTS_DPL_DIR}/dbus/data/org.tizen.DBusTestService.service + ${TESTS_DIR}/dbus/data/org.tizen.DBusTestService.service DESTINATION /usr/share/dbus-1/services ) diff --git a/tests/dbus/data/org.tizen.DBusTestService.service b/tests/dbus/data/org.tizen.DBusTestService.service new file mode 100644 index 0000000..94b3d67 --- /dev/null +++ b/tests/dbus/data/org.tizen.DBusTestService.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.tizen.DBusTestService +Exec=/usr/bin/wrt-commons-tests-dbus-test-service diff --git a/tests/dpl/dbus/dbus_test.cpp b/tests/dbus/dbus_test.cpp similarity index 100% rename from tests/dpl/dbus/dbus_test.cpp rename to tests/dbus/dbus_test.cpp diff --git a/tests/dpl/dbus/dbus_test.h b/tests/dbus/dbus_test.h similarity index 100% rename from tests/dpl/dbus/dbus_test.h rename to tests/dbus/dbus_test.h diff --git a/tests/dpl/dbus/main.cpp b/tests/dbus/main.cpp similarity index 100% rename from tests/dpl/dbus/main.cpp rename to tests/dbus/main.cpp diff --git a/tests/dpl/dbus/test_cases.cpp b/tests/dbus/test_cases.cpp similarity index 100% rename from tests/dpl/dbus/test_cases.cpp rename to tests/dbus/test_cases.cpp diff --git a/tests/dpl/dbus/test_service.cpp b/tests/dbus/test_service.cpp similarity index 100% rename from tests/dpl/dbus/test_service.cpp rename to tests/dbus/test_service.cpp diff --git a/tests/dpl/CMakeLists.txt b/tests/dpl/CMakeLists.txt deleted file mode 100644 index 1dea774..0000000 --- a/tests/dpl/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# @file CMakeLists.txt -# @author Krzysztof Jackiewicz (k.jackiewicz@samsung.com) -# @version 1.0 -# @brief -# - -SET(TESTS_DPL_DIR "${TESTS_DIR}/dpl") - -ADD_SUBDIRECTORY(core) -ADD_SUBDIRECTORY(db) -ADD_SUBDIRECTORY(dbus) -ADD_SUBDIRECTORY(event) -#ADD_SUBDIRECTORY(localization) TODO localization mockups need to be fixed -ADD_SUBDIRECTORY(utils) -ADD_SUBDIRECTORY(test) diff --git a/tests/dpl/README b/tests/dpl/README deleted file mode 100644 index 6641953..0000000 --- a/tests/dpl/README +++ /dev/null @@ -1,13 +0,0 @@ -Unit tests for dpl library functionality. -There are 6 binaries: dpl-dbus-test-service, dpl-tests-core, dpl-tests-db, -dpl-tests-dbus, dpl-tests-event, dpl-tests-utils. -All binaries are using our test framework - it allows to use different types of -output. Text output shows results on console - green passed. -To run: -1. Install wrt-extra on target -2. Run for f in /usr/bin/dpl-tests-*; do $f --output=text; done - -Automatic: YES -Included in Daily Build: YES (http://build01.sprc.samsung.pl/browse/LINUXNGWAP-INT) -Included in Gerrit Builds: YES (http://build01.sprc.samsung.pl/browse/LINUXNGWAP-GERRIT) -Number of test cases: 151 \ No newline at end of file diff --git a/tests/dpl/core/.swp b/tests/dpl/core/.swp deleted file mode 100644 index e25a05b48227470164a5b546ec0bb135d5e190aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI%ze>YE90%~Ln~N6p0qP%cEBzygqv+yLaH;EY&0U&<^m1MGIE2;hgAC*2+v2bf#IC7bX!#rnCWd7AgCEw=r#0 kM9HK-7KA2Ms=C4l59(+mT%Vs7stBq=N~iLC)IBEn07(a^&j0`b diff --git a/tests/dpl/dbus/data/org.tizen.DBusTestService.service b/tests/dpl/dbus/data/org.tizen.DBusTestService.service deleted file mode 100644 index f024543..0000000 --- a/tests/dpl/dbus/data/org.tizen.DBusTestService.service +++ /dev/null @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=org.tizen.DBusTestService -Exec=/usr/bin/dpl-dbus-test-service diff --git a/tests/dpl/event/CMakeLists.txt b/tests/event/CMakeLists.txt similarity index 78% rename from tests/dpl/event/CMakeLists.txt rename to tests/event/CMakeLists.txt index de3db4a..08fa4fa 100644 --- a/tests/dpl/event/CMakeLists.txt +++ b/tests/event/CMakeLists.txt @@ -26,15 +26,15 @@ # generating proper output files # -SET(TARGET_NAME "dpl-tests-event") +SET(TARGET_NAME "wrt-commons-tests-event") # Set DPL tests sources SET(DPL_TESTS_EVENT_SOURCES - ${TESTS_DPL_DIR}/event/main.cpp - ${TESTS_DPL_DIR}/event/test_controller.cpp - ${TESTS_DPL_DIR}/event/test_event_support.cpp - ${TESTS_DPL_DIR}/event/test_ic_delegate.cpp - ${TESTS_DPL_DIR}/event/test_property.cpp + ${TESTS_DIR}/event/main.cpp + ${TESTS_DIR}/event/test_controller.cpp + ${TESTS_DIR}/event/test_event_support.cpp + ${TESTS_DIR}/event/test_ic_delegate.cpp + ${TESTS_DIR}/event/test_property.cpp ) WRT_TEST_ADD_INTERNAL_DEPENDENCIES(${TARGET_NAME} ${TARGET_DPL_EVENT_EFL}) diff --git a/tests/dpl/event/main.cpp b/tests/event/main.cpp similarity index 100% rename from tests/dpl/event/main.cpp rename to tests/event/main.cpp diff --git a/tests/dpl/event/test_controller.cpp b/tests/event/test_controller.cpp similarity index 100% rename from tests/dpl/event/test_controller.cpp rename to tests/event/test_controller.cpp diff --git a/tests/dpl/event/test_event_support.cpp b/tests/event/test_event_support.cpp similarity index 100% rename from tests/dpl/event/test_event_support.cpp rename to tests/event/test_event_support.cpp diff --git a/tests/dpl/event/test_ic_delegate.cpp b/tests/event/test_ic_delegate.cpp similarity index 100% rename from tests/dpl/event/test_ic_delegate.cpp rename to tests/event/test_ic_delegate.cpp diff --git a/tests/dpl/event/test_property.cpp b/tests/event/test_property.cpp similarity index 100% rename from tests/dpl/event/test_property.cpp rename to tests/event/test_property.cpp diff --git a/tests/dpl/localization/CMakeLists.txt b/tests/files_localization/CMakeLists.txt similarity index 90% rename from tests/dpl/localization/CMakeLists.txt rename to tests/files_localization/CMakeLists.txt index a50727a..37d79c1 100644 --- a/tests/dpl/localization/CMakeLists.txt +++ b/tests/files_localization/CMakeLists.txt @@ -26,11 +26,11 @@ # generating proper output files # -SET(TARGET_LOC "dpl-tests-loc") +SET(TARGET_LOC "wrt-commons-tests-loc") SET(LOC_TESTS_SOURCES - ${DPL_TESTS_DIR}/localization/test_localization.cpp - ${DPL_TESTS_DIR}/localization/test_suite01.cpp + ${TESTS_DIR}/files_localization/test_localization.cpp + ${TESTS_DIR}/files_localization/test_suite01.cpp #${DPL_TESTS_DIR}/localization/mockup_src/widget_dao.cpp #${PROJECT_SOURCE_DIR}/modules/localization/src/localization_utils.cpp #${PROJECT_SOURCE_DIR}/modules/localization/src/w3c_file_localization.cpp diff --git a/tests/dpl/localization/files/CMakeLists.txt b/tests/files_localization/files/CMakeLists.txt similarity index 100% rename from tests/dpl/localization/files/CMakeLists.txt rename to tests/files_localization/files/CMakeLists.txt diff --git a/tests/dpl/localization/files/one b/tests/files_localization/files/one similarity index 100% rename from tests/dpl/localization/files/one rename to tests/files_localization/files/one diff --git a/tests/dpl/localization/files/two b/tests/files_localization/files/two similarity index 100% rename from tests/dpl/localization/files/two rename to tests/files_localization/files/two diff --git a/tests/dpl/localization/mockup_include/dpl/wrt-dao-ro/common_dao_types.h b/tests/files_localization/mockup_include/dpl/wrt-dao-ro/common_dao_types.h similarity index 100% rename from tests/dpl/localization/mockup_include/dpl/wrt-dao-ro/common_dao_types.h rename to tests/files_localization/mockup_include/dpl/wrt-dao-ro/common_dao_types.h diff --git a/tests/dpl/localization/mockup_include/dpl/wrt-dao-rw/widget_dao.h b/tests/files_localization/mockup_include/dpl/wrt-dao-rw/widget_dao.h similarity index 100% rename from tests/dpl/localization/mockup_include/dpl/wrt-dao-rw/widget_dao.h rename to tests/files_localization/mockup_include/dpl/wrt-dao-rw/widget_dao.h diff --git a/tests/dpl/localization/mockup_src/widget_dao.cpp b/tests/files_localization/mockup_src/widget_dao.cpp similarity index 100% rename from tests/dpl/localization/mockup_src/widget_dao.cpp rename to tests/files_localization/mockup_src/widget_dao.cpp diff --git a/tests/dpl/localization/test_localization.cpp b/tests/files_localization/test_localization.cpp similarity index 100% rename from tests/dpl/localization/test_localization.cpp rename to tests/files_localization/test_localization.cpp diff --git a/tests/dpl/localization/test_suite01.cpp b/tests/files_localization/test_suite01.cpp similarity index 100% rename from tests/dpl/localization/test_suite01.cpp rename to tests/files_localization/test_suite01.cpp diff --git a/tests/localizationTagsProvider/CMakeLists.txt b/tests/localizationTagsProvider/CMakeLists.txt new file mode 100644 index 0000000..fb3fee7 --- /dev/null +++ b/tests/localizationTagsProvider/CMakeLists.txt @@ -0,0 +1,42 @@ +# Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# @file CMakeLists.txt +# @author Marcin Kaminski (marcin.ka@samsung.com) +# @author Karol Pawlowski (k.pawlowski@samsung.com) +# @version 1.0 +# @brief +# + +SET(LOCALIZATION_TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + +PKG_CHECK_MODULES(TEST_PKGS + vconf + REQUIRED + ) + +WRT_INCLUDE_DIRECTORIES( + ${TEST_PKGS_INCLUDE_DIRS} + ${PROJECT_SOURCE_DIR}/modules/localization/include + ) + +WRT_LINK_DIRECTORIES(${TEST_PKGS_LIBRARY_DIRS}) +WRT_TARGET_LINK_LIBRARIES(${TEST_PKGS_LIBRARIES}) + +FILE(GLOB LOCALIZATION_TESTS_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*testcases.cpp") + +SET(TARGET_LOCALIZATION_TEST "wrt-commons-tests-localization") +WRT_TEST_BUILD(${TARGET_LOCALIZATION_TEST} ${LOCALIZATION_TESTS_SOURCES} tests_miscunit.cpp) +WRT_TEST_INSTALL(${TARGET_LOCALIZATION_TEST}) + diff --git a/tests/localizationTagsProvider/Localization_testcases.cpp b/tests/localizationTagsProvider/Localization_testcases.cpp new file mode 100644 index 0000000..bd4b003 --- /dev/null +++ b/tests/localizationTagsProvider/Localization_testcases.cpp @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file Localization_testcases.cpp + * @author Marcin Kaminski (marcin.ka@samsung.com) + * @version 1.0 + * @brief This file contains tests for localization related code. + */ + +#include +#include +#include + +#include + +RUNNER_TEST_GROUP_INIT(LanguageTagsProvider) + +RUNNER_TEST(tagsFromSystemLocales) +{ + LogInfo("Generating tags from system locales"); + + char* currlocals = vconf_get_str(VCONFKEY_LANGSET); + LogDebug("Locales fetched from system settings: " << currlocals); + RUNNER_ASSERT_MSG(!!currlocals, "NULL locales received from system"); + int result = vconf_set_str(VCONFKEY_LANGSET, "en_US.UTF-8"); + LogDebug("Returned vconf set execution status: " << result); + RUNNER_ASSERT_MSG(result == 0, "Invalid value returned by vconf_set_str on setting locales"); + + /* Ensure that system locales where fetched */ + LanguageTagsProviderSingleton::Instance().resetLanguageTags(); + LogDebug("Language tags set based on current system locales"); + + LanguageTags ltlist = LanguageTagsProviderSingleton::Instance().getLanguageTags(); + RUNNER_ASSERT_MSG(!ltlist.empty(), "Empty tag list returned"); + + /* Correct list generated from given locales should contain: "en-US", "en" and "" */ + LanguageTags correct; + correct.push_back(L"en-US"); + correct.push_back(L"en"); + correct.push_back(L""); + + RUNNER_ASSERT_MSG( correct==ltlist, "Received and expected language tags lists differ"); + + /* Restore system locales */ + result = vconf_set_str(VCONFKEY_LANGSET, currlocals); + RUNNER_ASSERT_MSG(result == 0, "Invalid value returned by vconf_set_str on restoring locales"); + LogDebug("System locales restored"); +} + +RUNNER_TEST(tagsFromGivenLocales) +{ + LogInfo("Generating tags from given locales"); + + const char *locales1 = "it_IT.UTF-8", *locales2="en_GB"; + + LogDebug("Using locales with codepage: " << locales1); + LanguageTagsProviderSingleton::Instance().setLanguageTagsFromLocales(locales1); + LanguageTags ltlist = LanguageTagsProviderSingleton::Instance().getLanguageTags(); + /* Correct list generated from given locales should contain: "it-IT", "it" and + * two default values: "en" and "" */ + LanguageTags correct; + correct.push_back(L"it-IT"); + correct.push_back(L"it"); + correct.push_back(L""); + RUNNER_ASSERT_MSG(correct==ltlist, "Received and expected language tags lists differ"); + + LogDebug("Using locales without codepage: " << locales2); + LanguageTagsProviderSingleton::Instance().setLanguageTagsFromLocales(locales2); + ltlist = LanguageTagsProviderSingleton::Instance().getLanguageTags(); + correct.clear(); + correct.push_back(L"en-GB"); + correct.push_back(L"en"); + correct.push_back(L""); + RUNNER_ASSERT_MSG(correct==ltlist, "Received and expected language tags lists differ"); +} + +RUNNER_TEST(tagsFromNullLocales) +{ + LogInfo("Generating tags when NULL locales given"); + + LanguageTagsProviderSingleton::Instance().setLanguageTagsFromLocales(NULL); + LanguageTags ltlist = LanguageTagsProviderSingleton::Instance().getLanguageTags(); + /* List with two values "en" and "" should be returned */ + LanguageTags correct; + correct.push_back(L""); + RUNNER_ASSERT_MSG(correct==ltlist, "Received and expected language tags lists differ"); +} + + +RUNNER_TEST(tagsFromGivenTagList) +{ + LogInfo("Copying given tags list"); + + LogDebug("Correct full list (with default values)"); + LanguageTags correct; + correct.push_back(L"de-DE"); + correct.push_back(L"de"); + correct.push_back(L""); + LanguageTagsProviderSingleton::Instance().setLanguageTags(correct); + LanguageTags result = LanguageTagsProviderSingleton::Instance().getLanguageTags(); + RUNNER_ASSERT_MSG(correct==result, "Received and expected language tags lists differ"); + + LogDebug("Tags list without default values)"); + LanguageTags nondef; + nondef.push_back(L"de-DE"); + nondef.push_back(L"de"); + LanguageTagsProviderSingleton::Instance().setLanguageTags(correct); + result = LanguageTagsProviderSingleton::Instance().getLanguageTags(); + + /* Received list should contains elements from input list with default + * values added (as "correct" list has) */ + RUNNER_ASSERT_MSG(!result.empty(), "Empty tags list should never be returned"); + RUNNER_ASSERT_MSG(nondef!=result, "Received list is same as given incomplete one"); + RUNNER_ASSERT_MSG(correct==result, "Received and expected language tags lists differ"); +} + +RUNNER_TEST(tagsFromEmptyList) +{ + LogInfo("Generating tags when empty tag list given"); + + LanguageTags input; + LanguageTagsProviderSingleton::Instance().setLanguageTags(input); + LanguageTags result = LanguageTagsProviderSingleton::Instance().getLanguageTags(); + RUNNER_ASSERT_MSG(!result.empty(), "Empty tags list should never be returned"); +} + +RUNNER_TEST(defaultWidgetLocale) +{ + LogInfo("Adding default widget locales to language tags list"); + + LanguageTags input; + input.push_back(L"de-DE"); + input.push_back(L"de"); + input.push_back(L""); + LanguageTagsProviderSingleton::Instance().setLanguageTags(input); + LanguageTagsProviderSingleton::Instance().addWidgetDefaultLocales(L"it"); + LanguageTags result = LanguageTagsProviderSingleton::Instance().getLanguageTags(); + RUNNER_ASSERT_MSG(result.size() == 4, "4 different language tags expected"); + LanguageTags reference; + reference.push_back(L"de-DE"); + reference.push_back(L"de"); + reference.push_back(L"it"); + reference.push_back(L""); + RUNNER_ASSERT_MSG(result == reference, "Received and expected language tags lists differ"); + LanguageTagsProviderSingleton::Instance().addWidgetDefaultLocales(L"it"); + LanguageTagsProviderSingleton::Instance().addWidgetDefaultLocales(L"de-DE"); + result = LanguageTagsProviderSingleton::Instance().getLanguageTags(); + RUNNER_ASSERT_MSG(result == reference, "Adding already included tag should not change tags list"); +} diff --git a/tests/localizationTagsProvider/README b/tests/localizationTagsProvider/README new file mode 100644 index 0000000..366e961 --- /dev/null +++ b/tests/localizationTagsProvider/README @@ -0,0 +1,13 @@ +Miscellaneous test suite +Unit tests (manifest files, wrt-api). Internal tests for new features in wrt. + +Binary file: wrt-tests-misc. Uses our test framework. Allows to use different +types of output. Text output shows results on console - green passed. +To run: +1. Install wrt-extra on target +2. Run wrt-tests-localization --output=text + +Automatic: YES +Included in Daily Build: NO +Included in Gerrit Builds: NO +Number of test cases: 75 \ No newline at end of file diff --git a/tests/localizationTagsProvider/tests_miscunit.cpp b/tests/localizationTagsProvider/tests_miscunit.cpp new file mode 100644 index 0000000..ba7a1d8 --- /dev/null +++ b/tests/localizationTagsProvider/tests_miscunit.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file tests_miscunit.cpp + * @author Marcin Kaminski (marcin.ka@samsung.com) + * @version 1.0 + * @brief This is main file for miscellaneous unit tests (tests of different + * classes, namespaces and functions). + */ + +#include +#include + +int main (int argc, char *argv[]) +{ + LogInfo("Starting miscellaneous unit tests"); + int status = DPL::Test::TestRunnerSingleton::Instance().ExecTestRunner(argc, argv); + + return status; +} diff --git a/tests/dpl/test/CMakeLists.txt b/tests/test/CMakeLists.txt similarity index 88% rename from tests/dpl/test/CMakeLists.txt rename to tests/test/CMakeLists.txt index 6e34912..1c0bf55 100644 --- a/tests/dpl/test/CMakeLists.txt +++ b/tests/test/CMakeLists.txt @@ -18,12 +18,12 @@ # @brief # -SET(TARGET_NAME "dpl-tests-test") +SET(TARGET_NAME "wrt-commons-tests-test-runner-child") # Set DPL tests sources SET(DPL_TESTS_UTIL_SOURCES - ${TESTS_DPL_DIR}/test/main.cpp - ${TESTS_DPL_DIR}/test/runner_child.cpp + ${TESTS_DIR}/test/main.cpp + ${TESTS_DIR}/test/runner_child.cpp ) #WRT_TEST_ADD_INTERNAL_DEPENDENCIES(${TARGET_NAME} ${TARGET_DPL_UTILS_EFL}) diff --git a/tests/dpl/test/main.cpp b/tests/test/main.cpp similarity index 100% rename from tests/dpl/test/main.cpp rename to tests/test/main.cpp diff --git a/tests/dpl/test/runner_child.cpp b/tests/test/runner_child.cpp similarity index 100% rename from tests/dpl/test/runner_child.cpp rename to tests/test/runner_child.cpp diff --git a/tests/dpl/unused/test_caller.cpp b/tests/unused/test_caller.cpp similarity index 100% rename from tests/dpl/unused/test_caller.cpp rename to tests/unused/test_caller.cpp diff --git a/tests/dpl/unused/test_crypto_hash.cpp b/tests/unused/test_crypto_hash.cpp similarity index 100% rename from tests/dpl/unused/test_crypto_hash.cpp rename to tests/unused/test_crypto_hash.cpp diff --git a/tests/dpl/unused/test_message_queue.cpp b/tests/unused/test_message_queue.cpp similarity index 100% rename from tests/dpl/unused/test_message_queue.cpp rename to tests/unused/test_message_queue.cpp diff --git a/tests/dpl/unused/test_shm.cpp b/tests/unused/test_shm.cpp similarity index 100% rename from tests/dpl/unused/test_shm.cpp rename to tests/unused/test_shm.cpp diff --git a/tests/dpl/unused/test_sql_connection.cpp b/tests/unused/test_sql_connection.cpp similarity index 100% rename from tests/dpl/unused/test_sql_connection.cpp rename to tests/unused/test_sql_connection.cpp diff --git a/tests/dpl/unused/test_task.cpp b/tests/unused/test_task.cpp similarity index 100% rename from tests/dpl/unused/test_task.cpp rename to tests/unused/test_task.cpp diff --git a/tests/dpl/utils/CMakeLists.txt b/tests/utils/CMakeLists.txt similarity index 83% rename from tests/dpl/utils/CMakeLists.txt rename to tests/utils/CMakeLists.txt index b3ce494..9898084 100644 --- a/tests/dpl/utils/CMakeLists.txt +++ b/tests/utils/CMakeLists.txt @@ -18,14 +18,14 @@ # @brief # -SET(TARGET_NAME "dpl-tests-utils") +SET(TARGET_NAME "wrt-commons-tests-utils") # Set DPL tests sources SET(DPL_TESTS_UTIL_SOURCES - ${TESTS_DPL_DIR}/utils/main.cpp - ${TESTS_DPL_DIR}/utils/widget_version.cpp - ${TESTS_DPL_DIR}/utils/bash_utils.cpp - ${TESTS_DPL_DIR}/utils/wrt_utility.cpp + ${TESTS_DIR}/utils/main.cpp + ${TESTS_DIR}/utils/widget_version.cpp + ${TESTS_DIR}/utils/bash_utils.cpp + ${TESTS_DIR}/utils/wrt_utility.cpp ) #WRT_TEST_ADD_INTERNAL_DEPENDENCIES(${TARGET_NAME} ${TARGET_DPL_UTILS_EFL}) diff --git a/tests/dpl/utils/bash_utils.cpp b/tests/utils/bash_utils.cpp similarity index 100% rename from tests/dpl/utils/bash_utils.cpp rename to tests/utils/bash_utils.cpp diff --git a/tests/dpl/utils/main.cpp b/tests/utils/main.cpp similarity index 100% rename from tests/dpl/utils/main.cpp rename to tests/utils/main.cpp diff --git a/tests/dpl/utils/widget_version.cpp b/tests/utils/widget_version.cpp similarity index 100% rename from tests/dpl/utils/widget_version.cpp rename to tests/utils/widget_version.cpp diff --git a/tests/dpl/utils/wrt_utility.cpp b/tests/utils/wrt_utility.cpp similarity index 100% rename from tests/dpl/utils/wrt_utility.cpp rename to tests/utils/wrt_utility.cpp -- 2.34.1