Move test codes into ${src root}/test and rename it to smoke_tests.
Change-Id: If1b83fcd255f5d36e20a66e13df3974906525cba
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
FIND_PACKAGE(GTest REQUIRED)
ADD_SUBDIRECTORY(src)
+ADD_SUBDIRECTORY(test)
%{_bindir}/tpk-installer-ut/*
%{_datadir}/tpk-installer-ut/*
%{_libdir}/libtpk-smoke-utils.so*
-%{_includedir}/app-installers/unit_tests/tpk_smoke_utils.h
+%{_includedir}/app-installers/smoke_tests/tpk_smoke_utils.h
%changelog
* Thu Dec 18 2015 Pawel Sikorski <p.sikorski@samsung.com> 0.1-1
ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(tpk)
-ADD_SUBDIRECTORY(unit_tests)
+++ /dev/null
-SET(DESTINATION_DIR tpk-installer-ut)
-SET(TARGET_SMOKE_UTILS smoke-utils)
-
-# Executables
-ADD_EXECUTABLE(${TARGET_SMOKE_TEST}
- smoke_test.cc
-)
-
-ADD_EXECUTABLE(${TARGET_SMOKE_TEST_EXTENSIVE}
- extensive_smoke_test.cc
-)
-
-ADD_EXECUTABLE(${TARGET_SMOKE_TEST_HELPER}
- smoke_test_helper.cc
-)
-
-ADD_EXECUTABLE(${TARGET_MANIFEST_TEST}
- manifest_test.cc
- manifest_test_package.cc
- manifest_test_service_application.cc
- manifest_test_ui_application.cc
- manifest_test_watch_application.cc
- manifest_test_widget_application.cc
-)
-
-ADD_EXECUTABLE(${TARGET_RECOVERY_TEST}
- recovery_test.cc
-)
-
-ADD_LIBRARY(${TARGET_TPK_SMOKE_UTILS} SHARED
- tpk_smoke_utils.cc
-)
-
-TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
-TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST_EXTENSIVE} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
-TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST_HELPER} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
-TARGET_INCLUDE_DIRECTORIES(${TARGET_MANIFEST_TEST} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
-TARGET_INCLUDE_DIRECTORIES(${TARGET_RECOVERY_TEST} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
-
-INSTALL(DIRECTORY test_samples/ DESTINATION ${SHAREDIR}/${DESTINATION_DIR}/test_samples)
-
-APPLY_PKG_CONFIG(${TARGET_SMOKE_TEST} PUBLIC
- Boost
- GTEST
- GUM_DEPS
-)
-APPLY_PKG_CONFIG(${TARGET_SMOKE_TEST_EXTENSIVE} PUBLIC
- Boost
- GTEST
- GUM_DEPS
-)
-APPLY_PKG_CONFIG(${TARGET_MANIFEST_TEST} PUBLIC
- Boost
- GTEST
-)
-APPLY_PKG_CONFIG(${TARGET_RECOVERY_TEST} PUBLIC
- Boost
- GTEST
- GUM_DEPS
-)
-
-# FindGTest module do not sets all needed libraries in GTEST_LIBRARIES and
-# GTest main libraries is still missing, so additional linking of
-# GTEST_MAIN_LIBRARIES is needed.
-TARGET_LINK_LIBRARIES(${TARGET_SMOKE_TEST} PRIVATE ${TARGET_LIBNAME_TPK} ${GTEST_MAIN_LIBRARIES} ${TARGET_SMOKE_UTILS} ${TARGET_TPK_SMOKE_UTILS})
-TARGET_LINK_LIBRARIES(${TARGET_SMOKE_TEST_EXTENSIVE} PRIVATE ${TARGET_LIBNAME_TPK} ${GTEST_MAIN_LIBRARIES} ${TARGET_SMOKE_UTILS} ${TARGET_TPK_SMOKE_UTILS})
-TARGET_LINK_LIBRARIES(${TARGET_SMOKE_TEST_HELPER} PRIVATE ${TARGET_LIBNAME_TPK} ${TARGET_TPK_SMOKE_UTILS})
-TARGET_LINK_LIBRARIES(${TARGET_MANIFEST_TEST} PRIVATE ${TARGET_LIBNAME_TPK} ${GTEST_MAIN_LIBRARIES})
-TARGET_LINK_LIBRARIES(${TARGET_RECOVERY_TEST} PRIVATE ${TARGET_LIBNAME_TPK} ${GTEST_MAIN_LIBRARIES} ${TARGET_SMOKE_UTILS} ${TARGET_TPK_SMOKE_UTILS})
-TARGET_LINK_LIBRARIES(${TARGET_TPK_SMOKE_UTILS} PRIVATE ${TARGET_LIBNAME_TPK} ${TARGET_SMOKE_UTILS})
-
-INSTALL(TARGETS ${TARGET_SMOKE_TEST} DESTINATION ${BINDIR}/${DESTINATION_DIR})
-INSTALL(TARGETS ${TARGET_SMOKE_TEST_EXTENSIVE} DESTINATION ${BINDIR}/${DESTINATION_DIR})
-INSTALL(TARGETS ${TARGET_SMOKE_TEST_HELPER} DESTINATION ${BINDIR}/${DESTINATION_DIR})
-INSTALL(TARGETS ${TARGET_MANIFEST_TEST} DESTINATION ${BINDIR}/${DESTINATION_DIR})
-INSTALL(TARGETS ${TARGET_RECOVERY_TEST} DESTINATION ${BINDIR}/${DESTINATION_DIR})
-INSTALL(TARGETS ${TARGET_TPK_SMOKE_UTILS} DESTINATION ${LIB_INSTALL_DIR})
-INSTALL(FILES tpk_smoke_utils.h DESTINATION ${INCLUDEDIR}/app-installers/unit_tests/)
+++ /dev/null
-// Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include <boost/exception/diagnostic_information.hpp>
-#include <boost/program_options.hpp>
-
-#include <unit_tests/common/smoke_utils.h>
-
-#include <gtest/gtest.h>
-#include <gtest/gtest-death-test.h>
-
-#include "unit_tests/tpk_smoke_utils.h"
-
-namespace bpo = boost::program_options;
-namespace ci = common_installer;
-
-enum class BackupType : int {
- MOVE,
- COPY_AND_REMOVE,
-};
-
-namespace smoke_test {
-
-class SmokeEnvironment : public testing::Environment {
- public:
- explicit SmokeEnvironment(ci::RequestMode mode, bool no_backup,
- BackupType backup_type) :
- request_mode_(mode), no_backup_(no_backup),
- backup_type_(backup_type) {
- }
- void SetUp() override {
- if (request_mode_ == ci::RequestMode::USER) {
- ASSERT_TRUE(AddTestUser(&test_user));
- }
- if (no_backup_)
- return;
- backups_ = SetupBackupDirectories(test_user.uid);
- if (backup_type_ == BackupType::MOVE) {
- for (auto& path : backups_)
- ASSERT_TRUE(BackupPath(path));
- } else if (backup_type_ == BackupType::COPY_AND_REMOVE) {
- for (auto& path : backups_)
- ASSERT_TRUE(BackupPathCopyAndRemove(path));
- }
- }
- void TearDown() override {
- ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL ||
- (request_mode_ == ci::RequestMode::USER &&
- kGlobalUserUid != test_user.uid));
- TpkBackendInterface backend(std::to_string(test_user.uid));
- UninstallAllSmokeApps(request_mode_, test_user.uid, &backend);
- if (request_mode_ == ci::RequestMode::USER) {
- ASSERT_TRUE(DeleteTestUser());
- }
- if (no_backup_)
- return;
- if (backup_type_ == BackupType::MOVE) {
- for (auto& path : backups_)
- ASSERT_TRUE(RestorePath(path));
- } else if (backup_type_ == BackupType::COPY_AND_REMOVE) {
- for (auto& path : backups_)
- ASSERT_TRUE(RestorePathCopyAndRemove(path));
- }
- }
- User test_user;
-
- private:
- ci::RequestMode request_mode_;
- std::vector<bf::path> backups_;
- bool no_backup_;
- BackupType backup_type_;
-};
-
-} // namespace smoke_test
-
-namespace {
-
-smoke_test::SmokeEnvironment *env = nullptr;
-void signalHandler(int signum) {
- env->TearDown();
- exit(signum);
-}
-
-} // namespace
-
-namespace smoke_test {
-
-class SmokeTest : public testing::Test {
- public:
- SmokeTest() : backend(std::to_string(env->test_user.uid)),
- params{PackageType::TPK, false} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
- protected:
- TpkBackendInterface backend;
- TestParameters params;
-};
-
-TEST_F(SmokeTest, DeltaMode_Tpk_Rollback) {
- bf::path path = kSmokePackagesDirectory / "DeltaMode_Tpk_Rollback.tpk";
- bf::path delta_package = kSmokePackagesDirectory /
- "DeltaMode_Tpk_Rollback.delta";
- std::string pkgid = "smoketpk28";
- std::string appid = "smoketpk28.DeltaModeTpk_Rollback";
- std::string exec = "basicdali";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- std::string test_uid_str = std::to_string(params.test_user.uid);
- const char* argv[] =
- {"", "-i", delta_package.c_str(), "-u", test_uid_str.c_str()};
-
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-
- // Check delta modifications
-
- bf::path root_path = ci::GetRootAppPath(params.is_readonly,
- params.test_user.uid);
- EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "DELETED"));
- EXTENDED_ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "ADDED"));
- EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "basicdali"));
- EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" /
- "basicdali.png"));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "res/MODIFIED", "version 1\n", params));
- return true;
- });
-}
-
-TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
- bf::path path = kSmokePackagesDirectory / "RecoveryMode_Tpk_Installation.tpk";
- std::string pkgid = "smokeapp15";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
-
- std::string test_uid_str = std::to_string(params.test_user.uid);
- std::vector<std::string> args =
- {"", "-i", path.c_str(), "-u", test_uid_str.c_str()};
- backend.CrashAfterEachStep(&args, [&](int step) -> bool {
- if (step >= 2) {
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- EXTENDED_ASSERT_FALSE(recovery_file.empty());
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
- EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- }
- return true;
- }, params.pkg_type);
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
-}
-
-TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
- bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update.tpk";
- bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update_2.tpk";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
-
- std::string test_uid_str = std::to_string(params.test_user.uid);
- std::vector<std::string> args =
- {"", "-i", path_new.string(), "-u", test_uid_str.c_str()};
- backend.CrashAfterEachStep(&args, [&](int step) -> bool {
- if (step >= 2) {
- std::string pkgid = "smokeapp16";
- std::string appid = "smokeapp16.RecoveryModeTpkUpdate";
- std::string exec = "native";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- EXTENDED_ASSERT_FALSE(recovery_file.empty());
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-
- EXTENDED_ASSERT_TRUE(
- ValidateFileContentInPackage(pkgid, "VERSION", "1\n", params));
- }
- return true;
- }, params.pkg_type);
-}
-
-#define TEP_TEST_STARTING_BLOCK(NUMBER) \
- bf::path path = kSmokePackagesDirectory / "TEP_Tpk"; \
- path += #NUMBER; \
- path += ".tpk"; \
- bf::path tep1 = kSmokePackagesDirectory / "tep1.tep"; \
- bf::path tep2 = kSmokePackagesDirectory / "tep2.tep"; \
- std::string number = std::to_string(50 + NUMBER - 1); \
- std::string pkgid = std::string("smokeapp") + number; \
- std::string appid = pkgid + ".TEP"; \
- std::string exec = "native"; \
-
-
-TEST_F(SmokeTest, TEP_Tpk_TepInstallTepUpdateRollback) {
- TEP_TEST_STARTING_BLOCK(5)
- ASSERT_EQ(backend.InstallWithTEP(path, tep1), ci::AppInstaller::Result::OK);
- std::string test_uid_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str(),
- "-e", tep1.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "tep/tep1.tep", "tep1\n", params));
- return true;
- });
-}
-
-TEST_F(SmokeTest, TEP_Tpk_NoTepInstallTepUpdateRollback) {
- TEP_TEST_STARTING_BLOCK(6)
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- std::string test_uid_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str(),
- "-e", tep1.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- bf::path root_path = ci::GetRootAppPath(params.is_readonly,
- params.test_user.uid);
- bf::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
- EXTENDED_ASSERT_FALSE(bf::exists(tep_file));
- return true;
- });
-}
-
-TEST_F(SmokeTest, TEP_Tpk_TepInstallNoTepUpdateRollback) {
- TEP_TEST_STARTING_BLOCK(7)
- ASSERT_EQ(backend.InstallWithTEP(path, tep1), ci::AppInstaller::Result::OK);
- std::string test_uid_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "tep/tep1.tep", "tep1\n", params));
- return true;
- });
-}
-
-TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstallTepUpdateRollback) {
- TEP_TEST_STARTING_BLOCK(12)
- ASSERT_EQ(backend.MountInstallWithTEP(path, tep1),
- ci::AppInstaller::Result::OK);
- std::string test_uid_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-w", path.c_str(), "-u", test_uid_str.c_str(),
- "-e", tep2.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "tep/tep1.tep", "tep1\n", params));
- return true;
- });
-}
-
-TEST_F(SmokeTest, TEP_Tpk_Mount_NoTepInstallTepUpdateRollback) {
- TEP_TEST_STARTING_BLOCK(13)
- ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
- std::string test_uid_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-w", path.c_str(), "-u", test_uid_str.c_str(),
- "-e", tep1.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- bf::path root_path = ci::GetRootAppPath(params.is_readonly,
- params.test_user.uid);
- bf::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
- EXTENDED_ASSERT_FALSE(bf::exists(tep_file));
- return true;
- });
-}
-
-TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstallNoTepUpdateRollback) {
- TEP_TEST_STARTING_BLOCK(14)
- ASSERT_EQ(backend.MountInstallWithTEP(path, tep1),
- ci::AppInstaller::Result::OK);
- std::string test_uid_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "tep/tep1.tep", "tep1\n", params));
- return true;
- });
-}
-
-TEST_F(SmokeTest, InstallationMode_Rollback) {
- bf::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.tpk";
- std::string pkgid = "smoketpk34";
- std::string test_uid_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str()};
-
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- return true;
- });
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForDelta) {
- bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.tpk";
- bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Install(path_old));
-
- std::string test_uid_str = std::to_string(params.test_user.uid);
- std::vector<std::string> args =
- {"", "-i", path_new.string(), "-u", test_uid_str.c_str()};
- backend.CrashAfterEachStep(&args, [&](int step) -> bool {
- if (step >= 2) {
- std::string pkgid = "smoketpk35";
- std::string appid = "smoketpk35.RecoveryMode_ForDelta";
- std::string exec = "smoketpk35";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- EXTENDED_ASSERT_FALSE(recovery_file.empty());
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-
- EXTENDED_ASSERT_TRUE(
- ValidateFileContentInPackage(pkgid, "res/MODIFIED", "version 1",
- params));
- bf::path root_path = ci::GetRootAppPath(params.is_readonly,
- params.test_user.uid);
- EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "res/DELETED"));
- EXTENDED_ASSERT_FALSE(bf::exists(root_path / pkgid / "res/ADDED"));
- }
- return true;
- }, params.pkg_type);
-}
-
-TEST_F(SmokeTest, UpdateMode_Rollback) {
- bf::path old_path = kSmokePackagesDirectory / "UpdateMode_Rollback.tpk";
- bf::path new_path = kSmokePackagesDirectory / "UpdateMode_Rollback2.tpk";
- std::string pkgid = "smoketpk36";
- std::string appid = "smoketpk36.UpdateMode_Rollback";
- std::string exec = "smoketpk36";
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Install(old_path));
-
- std::string test_uid_str = std::to_string(params.test_user.uid);
- const char* argv[] =
- {"", "-i", new_path.c_str(), "-u", test_uid_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "res/VERSION", "1", params));
- return true;
- });
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
- bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.tpk";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
-
- std::string test_uid_str = std::to_string(params.test_user.uid);
- std::vector<std::string> args =
- {"", "-w", path.string(), "-u", test_uid_str.c_str()};
- backend.CrashAfterEachStep(&args, [&](int step) -> bool {
- if (step >= 2) {
- std::string pkgid = "smoketpk37";
- std::string appid = "smoketpk37.RecoveryMode_ForMountInstall";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- EXTENDED_ASSERT_FALSE(recovery_file.empty());
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
- EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- }
- return true;
- }, params.pkg_type);
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
- bf::path path_old =
- kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate.tpk";
- bf::path path_new =
- kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate2.tpk";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.MountInstall(path_old));
-
- std::string test_uid_str = std::to_string(params.test_user.uid);
- std::vector<std::string> args =
- {"", "-w", path_new.string(), "-u", test_uid_str.c_str()};
- backend.CrashAfterEachStep(&args, [&](int step) -> bool {
- if (step >= 2) {
- std::string pkgid = "smoketpk38";
- std::string appid = "smoketpk38.RecoveryMode_ForMountUpdate";
- std::string exec = "smoketpk38";
-
- // Filesystem may be mounted after crash
- ScopedTzipInterface poweroff_unmount_interface(pkgid,
- params.test_user.uid);
- poweroff_unmount_interface.Release();
-
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- EXTENDED_ASSERT_FALSE(recovery_file.empty());
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "res/VERSION", "1", params));
- }
- return true;
- }, params.pkg_type);
-}
-
-TEST_F(SmokeTest, MountInstallationMode_Rollback) {
- bf::path path =
- kSmokePackagesDirectory / "MountInstallationMode_Rollback.tpk";
- std::string pkgid = "smoketpk39";
- std::string test_uid_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-w", path.c_str(), "-u", test_uid_str.c_str()};
-
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- return true;
- });
-}
-
-TEST_F(SmokeTest, MountUpdateMode_Rollback) {
- bf::path old_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback.tpk";
- bf::path new_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback2.tpk";
- std::string pkgid = "smoketpk40";
- std::string appid = "smoketpk40.MountUpdateMode_Rollback";
- std::string exec = "smoketpk40";
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.MountInstall(old_path));
- std::string test_uid_str = std::to_string(params.test_user.uid);
- const char* argv[] =
- {"", "-w", new_path.c_str(), "-u", test_uid_str.c_str()};
-
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "res/VERSION", "1", params));
- return true;
- });
-}
-
-} // namespace smoke_test
-
-int main(int argc, char** argv) {
- try {
- bool no_backup = false;
- BackupType backup_type = BackupType::MOVE;
-
- ci::RequestMode request_mode = smoke_test::ParseRequestMode(argc, argv);
- if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
- std::cout << "Skip tests for preload request" << std::endl;
- ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
- }
- testing::InitGoogleTest(&argc, argv);
-
- bpo::options_description options("Allowed options");
- bpo::variables_map opt_map;
- try {
- options.add_options()
- ("help", "display this help message")
- ("no-backup", "Do test without backup")
- ("backup-type", bpo::value<std::string>(), "<move|copy> set test's "
- "backup type \'move\', \'copy and remove\'");
- bpo::store(bpo::parse_command_line(argc, argv, options), opt_map);
- if (opt_map.count("help")) {
- std::cerr << options << std::endl;
- return -1;
- }
-
- if (opt_map.count("no-backup"))
- no_backup = true;
- if (opt_map.count("backup-type")) {
- if (opt_map["backup-type"].as<std::string>() == "move") {
- backup_type = BackupType::MOVE;
- } else if (opt_map["backup-type"].as<std::string>() == "copy") {
- backup_type = BackupType::COPY_AND_REMOVE;
- } else {
- std::cerr << options << std::endl;
- return -1;
- }
- }
- bpo::notify(opt_map);
- } catch (...) {
- std::cerr << "Exception occurred: "
- << boost::current_exception_diagnostic_information()
- << std::endl;
- return -1;
- }
-
- ::env = static_cast<smoke_test::SmokeEnvironment*>(
- testing::AddGlobalTestEnvironment(
- new smoke_test::SmokeEnvironment(request_mode,
- no_backup, backup_type)));
- signal(SIGINT, ::signalHandler);
- signal(SIGSEGV, ::signalHandler);
- return RUN_ALL_TESTS();
- } catch (...) {
- std::cout << "Exception occurred during testing" << std::endl;
- return 1;
- }
-}
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include "unit_tests/manifest_test.h"
-
-#include <cassert>
-
-namespace bf = boost::filesystem;
-namespace ci = common_installer;
-
-namespace {
-
-const char kManifestTestcaseData[] =
- "/usr/share/tpk-installer-ut/test_samples/manifest/";
-
-} // namespace
-
-bool StepParseRunner::Run() {
- PrepareContext();
- ci::configuration::StepParseManifest step(context_.get(),
- ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
- ci::configuration::StepParseManifest::StoreLocation::NORMAL);
- return step.process() == ci::Step::Status::OK;
-}
-
-manifest_x* StepParseRunner::GetManifest() const {
- return context_->manifest_data.get();
-}
-
-bf::path StepParseRunner::GetRootApplicationPath() const {
- return context_->root_application_path.get();
-}
-
-void StepParseRunner::PrepareContext() {
- context_.reset(new ci::InstallerContext());
- context_->root_application_path.set(ci::GetRootAppPath(false, getuid()));
- context_->unpacked_dir_path.set(
- bf::path(kManifestTestcaseData) / dir_suffix_);
-
- // Make sure that there is manifest file for testcase
- assert(bf::exists(context_->unpacked_dir_path.get() / "tizen-manifest.xml")
- && "Failed to stat manifest file");
-}
-
-std::string ManifestTest::GetMyName() const {
- std::string suite =
- testing::UnitTest::GetInstance()->current_test_info()->test_case_name();
- std::string case_name =
- testing::UnitTest::GetInstance()->current_test_info()->name();
- return suite + '.' + case_name;
-}
-
-application_x* GetSingleApp(manifest_x* m) {
- if (!m)
- return nullptr;
- auto apps = GListRange<application_x*>(m->application);
- if (Size(&apps) != 1)
- return nullptr;
- return *apps.begin();
-}
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#ifndef UNIT_TESTS_MANIFEST_TEST_H_
-#define UNIT_TESTS_MANIFEST_TEST_H_
-
-#include <boost/filesystem/path.hpp>
-
-#include <common/installer_context.h>
-#include <common/step/configuration/step_parse_manifest.h>
-#include <common/utils/glist_range.h>
-#include <common/utils/request.h>
-
-#include <glib.h>
-#include <gtest/gtest.h>
-
-#include <memory>
-#include <string>
-
-#define ASSERT_CSTR_EQ(STR1, STR2) \
- ASSERT_EQ(strcmp(STR1, STR2), 0) \
-
-#define ASSERT_CSTR_NE(STR1, STR2) \
- ASSERT_NE(strcmp(STR1, STR2), 0) \
-
-#define ASSERT_IN(ITEM, CONTAINER) \
- ASSERT_NE(std::find(CONTAINER.begin(), CONTAINER.end(), ITEM), \
- CONTAINER.end()); \
-
-template<typename T>
-gint Size(GListRange<T>* range) {
- return std::distance(range->begin(), range->end());
-}
-
-class StepParseRunner {
- public:
- explicit StepParseRunner(const std::string& dir_suffix,
- bool ignore_start_files = true)
- : dir_suffix_(dir_suffix),
- ignore_start_files_(ignore_start_files),
- context_(nullptr) { }
-
- bool Run();
- manifest_x* GetManifest() const;
- boost::filesystem::path GetRootApplicationPath() const;
-
- private:
- void PrepareContext();
-
- std::string dir_suffix_;
- bool ignore_start_files_;
- std::unique_ptr<common_installer::InstallerContext> context_;
-};
-
-class ManifestTest : public testing::Test {
- public:
- std::string GetMyName() const;
-};
-
-application_x* GetSingleApp(manifest_x* m);
-
-#endif // UNIT_TESTS_MANIFEST_TEST_H_
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include "unit_tests/manifest_test.h"
-
-namespace bf = boost::filesystem;
-namespace ci = common_installer;
-
-TEST_F(ManifestTest, ManifestElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->package, "package0id");
- auto apps = GListRange<application_x*>(m->application);
- ASSERT_EQ(Size(&apps), 1);
- application_x* app = *apps.begin();
- ASSERT_CSTR_EQ(app->appid, "package0id.appid");
-}
-
-TEST_F(ManifestTest, ManifestElement_InvalidRootElement) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ManifestElement_DoubleRootElement) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ManifestElement_InstallLocation_Auto) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->installlocation, "auto");
-}
-
-TEST_F(ManifestTest, ManifestElement_InstallLocation_InternalOnly) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->installlocation, "internal-only");
-}
-
-TEST_F(ManifestTest, ManifestElement_InstallLocation_PreferExternal) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->installlocation, "prefer-external");
-}
-
-TEST_F(ManifestTest, ManifestElement_InstallLocation_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->installlocation, "auto");
-}
-
-TEST_F(ManifestTest, ManifestElement_InstallLocation_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ManifestElement_Package_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ManifestElement_Package_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ManifestElement_Type_Tpk) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->type, "tpk");
-}
-
-TEST_F(ManifestTest, ManifestElement_Type_Rpm) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->type, "rpm");
-}
-
-TEST_F(ManifestTest, ManifestElement_Type_Wgt) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->type, "wgt");
-}
-
-TEST_F(ManifestTest, ManifestElement_Type_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ManifestElement_Type_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->type, "tpk");
-}
-
-TEST_F(ManifestTest, ManifestElement_Version_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->version, "1.2.3");
-}
-
-TEST_F(ManifestTest, ManifestElement_Version_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ManifestElement_Version_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ManifestElement_ApiVersion_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->api_version, "3.0");
-}
-
-TEST_F(ManifestTest, ManifestElement_ApiVersion_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ManifestElement_ApiVersion_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, AuthorElement_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto authors = GListRange<author_x*>(m->author);
- ASSERT_EQ(Size(&authors), 0);
-}
-
-TEST_F(ManifestTest, AuthorElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto authors = GListRange<author_x*>(m->author);
- ASSERT_EQ(Size(&authors), 1);
- author_x* author = *authors.begin();
- ASSERT_CSTR_EQ(author->email, "valid@email.com");
- ASSERT_CSTR_EQ(author->href, "http://site.domain.com");
-}
-
-TEST_F(ManifestTest, DescriptionElement_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto descriptions = GListRange<description_x*>(m->description);
- ASSERT_EQ(Size(&descriptions), 0);
-}
-
-TEST_F(ManifestTest, DescriptionElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto descriptions = GListRange<description_x*>(m->description);
- ASSERT_EQ(Size(&descriptions), 1);
- description_x* description = *descriptions.begin();
- ASSERT_CSTR_EQ(description->text, "text");
- ASSERT_CSTR_EQ(description->lang, "en-GB");
-}
-
-TEST_F(ManifestTest, DescriptionElement_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto descriptions = GListRange<description_x*>(m->description);
- ASSERT_EQ(Size(&descriptions), 2);
- description_x* description1 = *descriptions.begin();
- description_x* description2 = *++descriptions.begin();
- ASSERT_CSTR_EQ(description1->text, "text");
- ASSERT_CSTR_EQ(description1->lang, "en-GB");
- ASSERT_CSTR_EQ(description2->text, "text2");
- ASSERT_CSTR_EQ(description2->lang, DEFAULT_LOCALE);
-}
-
-TEST_F(ManifestTest, DescriptionElement_Lang_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, PrivilegesElement_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges = GListRange<privilege_x*>(m->privileges);
- ASSERT_EQ(Size(&privileges), 0);
-}
-
-TEST_F(ManifestTest, PrivilegesElement_None) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges = GListRange<privilege_x*>(m->privileges);
- ASSERT_EQ(Size(&privileges), 0);
-}
-
-TEST_F(ManifestTest, PrivilegesElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges = GListRange<privilege_x*>(m->privileges);
- ASSERT_EQ(Size(&privileges), 1);
- ASSERT_CSTR_EQ((*privileges.begin())->value,
- "http://tizen.org/privilege/application.admin");
-}
-
-TEST_F(ManifestTest, PrivilegesElement_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges = GListRange<privilege_x*>(m->privileges);
- ASSERT_EQ(Size(&privileges), 3);
- ASSERT_CSTR_EQ(((*privileges.begin()))->value,
- "http://tizen.org/privilege/account.read");
- ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
- "http://tizen.org/privilege/application.admin");
- ASSERT_CSTR_EQ(((*++++privileges.begin())->value),
- "http://tizen.org/privilege/appmanager.launch");
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegesElement_Invalid_OverLength) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegesElement_Invalid_NotURI) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegesElement_Invalid_NoPKGID) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegesElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges =
- GListRange<appdefined_privilege_x*>(m->appdefined_privileges);
- ASSERT_EQ(Size(&privileges), 1);
- ASSERT_CSTR_EQ((*privileges.begin())->value,
- "http://package0id/appdefined/test.read");
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegesElement_WithLicenseValid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges =
- GListRange<appdefined_privilege_x*>(m->appdefined_privileges);
- ASSERT_EQ(Size(&privileges), 1);
- ASSERT_CSTR_EQ((*privileges.begin())->value,
- "http://package0id/appdefined/test.read");
- bf::path path(m->root_path);
- path /= "res/cert";
- ASSERT_CSTR_EQ((*privileges.begin())->license, path.c_str());
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegesElement_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges =
- GListRange<appdefined_privilege_x*>(m->appdefined_privileges);
- ASSERT_EQ(Size(&privileges), 2);
- ASSERT_CSTR_EQ(((*privileges.begin()))->value,
- "http://package0id/appdefined/test.read");
- ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
- "http://package0id/appdefined/test.write");
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegesElement_WithLicenseMany) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges =
- GListRange<appdefined_privilege_x*>(m->appdefined_privileges);
- ASSERT_EQ(Size(&privileges), 2);
- ASSERT_CSTR_EQ(((*privileges.begin()))->value,
- "http://package0id/appdefined/test.read");
- bf::path path(m->root_path);
- path /= "res/cert";
- ASSERT_CSTR_EQ(((*privileges.begin()))->license, path.c_str());
- ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
- "http://package0id/appdefined/test.write");
- ASSERT_CSTR_EQ(((*++privileges.begin()))->license, path.c_str());
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges =
- GListRange<appdefined_privilege_x*>(m->provides_appdefined_privileges);
- ASSERT_EQ(Size(&privileges), 0);
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_None) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges =
- GListRange<appdefined_privilege_x*>(m->provides_appdefined_privileges);
- ASSERT_EQ(Size(&privileges), 0);
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_Invalid_OverLength) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_Invalid_NotURI) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_Invalid_NoPKGID) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges =
- GListRange<appdefined_privilege_x*>(m->provides_appdefined_privileges);
- ASSERT_EQ(Size(&privileges), 1);
- ASSERT_CSTR_EQ((*privileges.begin())->value,
- "http://package0id/appdefined/test.read");
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_WithLicenseValid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges =
- GListRange<appdefined_privilege_x*>(m->provides_appdefined_privileges);
- ASSERT_EQ(Size(&privileges), 1);
- ASSERT_CSTR_EQ((*privileges.begin())->value,
- "http://package0id/appdefined/test.read");
- bf::path path(m->root_path);
- path /= "res/cert";
- ASSERT_CSTR_EQ((*privileges.begin())->license, path.c_str());
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges =
- GListRange<appdefined_privilege_x*>(m->provides_appdefined_privileges);
- ASSERT_EQ(Size(&privileges), 2);
- ASSERT_CSTR_EQ(((*privileges.begin()))->value,
- "http://package0id/appdefined/test.read");
- ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
- "http://package0id/appdefined/test.write");
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_WithLicenseMany) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto privileges =
- GListRange<appdefined_privilege_x*>(m->provides_appdefined_privileges);
- ASSERT_EQ(Size(&privileges), 2);
- ASSERT_CSTR_EQ(((*privileges.begin()))->value,
- "http://package0id/appdefined/test.read");
- bf::path path(m->root_path);
- path /= "res/cert";
- ASSERT_CSTR_EQ(((*privileges.begin()))->license, path.c_str());
- ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
- "http://package0id/appdefined/test.write");
- ASSERT_CSTR_EQ(((*++privileges.begin()))->license, path.c_str());
-}
-
-TEST_F(ManifestTest, ProfileElement_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto profiles = GListRange<char*>(m->deviceprofile);
- ASSERT_EQ(Size(&profiles), 0);
-}
-
-TEST_F(ManifestTest, ProfileElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto profiles = GListRange<char*>(m->deviceprofile);
- ASSERT_EQ(Size(&profiles), 1);
- const char* profile = *profiles.begin();
- ASSERT_CSTR_EQ(profile, "mobile");
-}
-
-TEST_F(ManifestTest, ProfileElement_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ProfileElement_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto profiles = GListRange<char*>(m->deviceprofile);
- ASSERT_EQ(Size(&profiles), 2);
- const char* profile1 = *profiles.begin();
- const char* profile2 = *++profiles.begin();
- ASSERT_CSTR_EQ(profile1, "mobile");
- ASSERT_CSTR_EQ(profile2, "wearable");
-}
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include "unit_tests/manifest_test.h"
-
-#include <boost/tuple/tuple.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
-
-#include <vector>
-
-namespace bf = boost::filesystem;
-namespace ci = common_installer;
-
-TEST_F(ManifestTest, ServiceApplicationElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->package, "package0id");
- auto apps = GListRange<application_x*>(m->application);
- ASSERT_EQ(Size(&apps), 1);
- application_x* app = *apps.begin();
- ASSERT_CSTR_EQ(app->appid, "package0id.appid");
- ASSERT_CSTR_EQ(app->component_type, "svcapp");
- ASSERT_CSTR_EQ(app->mainapp, "true");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Appid_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Appid_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Multiple_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->multiple, "false");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Multiple_False) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->multiple, "false");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Multiple_True) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->multiple, "true");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Multiple_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AutoRestart_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->autorestart, "false");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AutoRestart_False) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->autorestart, "false");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AutoRestart_True) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->autorestart, "true");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AutoRestart_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_OnBoot_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->onboot, "false");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_OnBoot_False) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->onboot, "false");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_OnBoot_True) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->onboot, "true");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_OnBoot_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Taskmanage_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->taskmanage, "true");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Taskmanage_False) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->taskmanage, "false");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Taskmanage_True) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->taskmanage, "true");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Taskmanage_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Type_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Type_Capp) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->type, "capp");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Type_Webapp) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->type, "webapp");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Label_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->label);
- ASSERT_EQ(Size(&labels), 0);
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Label_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->label);
- ASSERT_EQ(Size(&labels), 1);
- ASSERT_CSTR_EQ((*labels.begin())->text, "label");
- ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Label_Text_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Label_Lang_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Label_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->label);
- ASSERT_EQ(Size(&labels), 2);
- ASSERT_CSTR_EQ((*labels.begin())->text, "label");
- ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
- ASSERT_CSTR_EQ((*++labels.begin())->text, "label_GB");
- ASSERT_CSTR_EQ((*++labels.begin())->lang, "en-GB");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Label_Many_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Metadata_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->metadata);
- ASSERT_EQ(Size(&labels), 0);
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Metadata_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto metadata = GListRange<metadata_x*>(app->metadata);
- ASSERT_EQ(Size(&metadata), 1);
- ASSERT_CSTR_EQ((*metadata.begin())->key, "key");
- ASSERT_CSTR_EQ((*metadata.begin())->value, "value");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Metadata_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Metadata_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto metadata = GListRange<metadata_x*>(app->metadata);
- ASSERT_EQ(Size(&metadata), 2);
- ASSERT_CSTR_EQ((*metadata.begin())->key, "key1");
- ASSERT_CSTR_EQ((*metadata.begin())->value, "value1");
- ASSERT_CSTR_EQ((*++metadata.begin())->key, "key2");
- ASSERT_CSTR_EQ((*++metadata.begin())->value, "");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_BackgroundCategory_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto bg_categories = GListRange<char*>(app->background_category);
- ASSERT_EQ(Size(&bg_categories), 0);
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_BackgroundCategory_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto bg_categories = GListRange<char*>(app->background_category);
- ASSERT_EQ(Size(&bg_categories), 1);
- ASSERT_CSTR_EQ(*bg_categories.begin(), "bgcategory");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_BackgroundCategory_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_BackgroundCategory_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto bg_categories = GListRange<char*>(app->background_category);
- ASSERT_EQ(Size(&bg_categories), 2);
- ASSERT_CSTR_EQ(*bg_categories.begin(), "bgcategory1");
- ASSERT_CSTR_EQ(*++bg_categories.begin(), "bgcategory2");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_DataControl_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto datacontrols = GListRange<datacontrol_x*>(app->datacontrol);
- ASSERT_EQ(Size(&datacontrols), 0);
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_DataControl_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto datacontrols = GListRange<datacontrol_x*>(app->datacontrol);
- ASSERT_EQ(Size(&datacontrols), 1);
- ASSERT_CSTR_EQ((*datacontrols.begin())->providerid, "providerid");
- ASSERT_CSTR_EQ((*datacontrols.begin())->access, "access");
- ASSERT_CSTR_EQ((*datacontrols.begin())->type, "type");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_DataControl_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto datacontrols = GListRange<datacontrol_x*>(app->datacontrol);
- ASSERT_EQ(Size(&datacontrols), 2);
- ASSERT_CSTR_EQ((*datacontrols.begin())->providerid, "providerid1");
- ASSERT_CSTR_EQ((*datacontrols.begin())->access, "access1");
- ASSERT_CSTR_EQ((*datacontrols.begin())->type, "type1");
- ASSERT_CSTR_EQ((*++datacontrols.begin())->providerid, "providerid2");
- ASSERT_CSTR_EQ((*++datacontrols.begin())->access, "access2");
- ASSERT_CSTR_EQ((*++datacontrols.begin())->type, "type2");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 0);
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Operation_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 0);
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Operation_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest,
- ServiceApplicationElement_AppControl_Operation_Invalid_NotURI) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Mime_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Uri_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 1);
- ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
- "http://tizen.org/appcontrol/operation/compose");
- ASSERT_CSTR_EQ((*appcontrols.begin())->uri, "scheme://");
- ASSERT_CSTR_EQ((*appcontrols.begin())->mime, "application/pdf");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 2);
- ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
- "http://tizen.org/appcontrol/operation/compose");
- ASSERT_CSTR_EQ((*appcontrols.begin())->uri, "scheme://");
- ASSERT_CSTR_EQ((*appcontrols.begin())->mime, "application/pdf");
- ASSERT_CSTR_EQ((*++appcontrols.begin())->operation,
- "http://tizen.org/appcontrol/operation/compose2");
- ASSERT_CSTR_EQ((*++appcontrols.begin())->uri, "scheme2://");
- ASSERT_CSTR_EQ((*++appcontrols.begin())->mime, "application/text");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AppControl_SkipUri) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 1);
- ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
- "http://tizen.org/appcontrol/operation/compose");
- ASSERT_EQ((*appcontrols.begin())->uri, nullptr);
- ASSERT_CSTR_EQ((*appcontrols.begin())->mime, "application/pdf");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AppControl_SkipMime) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 1);
- ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
- "http://tizen.org/appcontrol/operation/compose");
- ASSERT_CSTR_EQ((*appcontrols.begin())->uri, "scheme://");
- ASSERT_EQ((*appcontrols.begin())->mime, nullptr);
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_AppControl_CartesianProduct) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 8);
-
- std::vector<boost::tuple<std::string, std::string, std::string>>
- found_app_controls;
- for (auto& item : appcontrols) {
- found_app_controls.emplace_back(item->operation, item->uri, item->mime);
- }
-
- for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
- "http://tizen.org/appcontrol/operation/compose2"}) {
- for (auto uri : {"scheme1://", "scheme2://"}) {
- for (auto mime : {"application/text", "application/pdf"}) {
- ASSERT_IN(boost::make_tuple(operation, uri, mime), found_app_controls);
- }
- }
- }
-}
-
-TEST_F(ManifestTest,
- ServiceApplicationElement_AppControl_CartesianProduct_SkipMime) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 4);
-
- std::vector<boost::tuple<std::string, std::string, std::string>>
- found_app_controls;
- for (auto& item : appcontrols) {
- ASSERT_EQ(item->mime, nullptr);
- found_app_controls.emplace_back(item->operation, item->uri, "");
- }
-
- for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
- "http://tizen.org/appcontrol/operation/compose2"}) {
- for (auto uri : {"scheme1://", "scheme2://"}) {
- ASSERT_IN(boost::make_tuple(operation, uri, ""), found_app_controls);
- }
- }
-}
-
-TEST_F(ManifestTest,
- ServiceApplicationElement_AppControl_CartesianProduct_SkipUri) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 4);
-
- std::vector<boost::tuple<std::string, std::string, std::string>>
- found_app_controls;
- for (auto& item : appcontrols) {
- ASSERT_EQ(item->uri, nullptr);
- found_app_controls.emplace_back(item->operation, "", item->mime);
- }
-
- for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
- "http://tizen.org/appcontrol/operation/compose2"}) {
- for (auto mime : {"application/text", "application/pdf"}) {
- ASSERT_IN(boost::make_tuple(operation, "", mime), found_app_controls);
- }
- }
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Icon_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto icons = GListRange<icon_x*>(app->icon);
- ASSERT_EQ(Size(&icons), 0);
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Icon_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_Icon_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto icons = GListRange<icon_x*>(app->icon);
- ASSERT_EQ(Size(&icons), 1);
- ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
- "test_icon.png");
-}
-
-TEST_F(ManifestTest, ServiceApplicationElement_SetManifestXDefaults) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->package, "package0id");
- ASSERT_CSTR_EQ(m->version, "1.0.0");
- ASSERT_CSTR_EQ(m->installlocation, "auto");
- ASSERT_CSTR_EQ(m->appsetting, "false");
- ASSERT_CSTR_EQ(m->type, "tpk");
- ASSERT_NE(m->installed_time, nullptr);
- ASSERT_CSTR_EQ(m->mainapp_id, "package0id.appid");
- ASSERT_CSTR_EQ(m->nodisplay_setting, "false");
- ASSERT_CSTR_EQ(m->support_disable, "false");
- ASSERT_CSTR_EQ(m->api_version, "2.3");
- auto apps = GListRange<application_x*>(m->application);
- ASSERT_EQ(Size(&apps), 1);
- application_x* app = *apps.begin();
- ASSERT_CSTR_EQ(app->appid, "package0id.appid");
- ASSERT_NE(app->exec, nullptr);
- ASSERT_CSTR_EQ(app->nodisplay, "true");
- ASSERT_CSTR_EQ(app->multiple, "false");
- ASSERT_CSTR_EQ(app->taskmanage, "true");
- ASSERT_CSTR_EQ(app->hwacceleration, "default");
- ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
- ASSERT_CSTR_EQ(app->component_type, "svcapp");
- ASSERT_CSTR_EQ(app->mainapp, "true");
- ASSERT_CSTR_EQ(app->recentimage, "false");
- ASSERT_CSTR_EQ(app->launchcondition, "false");
- ASSERT_CSTR_EQ(app->indicatordisplay, "true");
- ASSERT_CSTR_EQ(app->effectimage_type, "image");
- ASSERT_CSTR_EQ(app->guestmode_visibility, "true");
- ASSERT_CSTR_EQ(app->permission_type, "normal");
- ASSERT_CSTR_EQ(app->submode, "false");
- ASSERT_CSTR_EQ(app->process_pool, "false");
-}
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include "unit_tests/manifest_test.h"
-
-#include <boost/tuple/tuple.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
-
-#include <vector>
-
-namespace bf = boost::filesystem;
-namespace ci = common_installer;
-
-TEST_F(ManifestTest, UIApplicationElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->package, "package0id");
- auto apps = GListRange<application_x*>(m->application);
- ASSERT_EQ(Size(&apps), 1);
- application_x* app = *apps.begin();
- ASSERT_CSTR_EQ(app->appid, "package0id.appid");
- ASSERT_CSTR_EQ(app->component_type, "uiapp");
- ASSERT_CSTR_EQ(app->mainapp, "true");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_MissingNoApp) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_MissingOtherApp) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_NE(app->component_type, "uiapp");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Appid_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Appid_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_LaunchMode_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->launch_mode, "single");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_LaunchMode_Single) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->launch_mode, "single");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_LaunchMode_Group) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->launch_mode, "group");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_LaunchMode_Caller) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->launch_mode, "caller");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_LaunchMode_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Multiple_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->multiple, "false");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Multiple_False) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);;
- ASSERT_CSTR_EQ(app->multiple, "false");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Multiple_True) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->multiple, "true");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Multiple_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Nodisplay_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->nodisplay, "false");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Nodisplay_False) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->nodisplay, "false");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Nodisplay_True) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->nodisplay, "true");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Nodisplay_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Taskmanage_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->taskmanage, "true");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Taskmanage_False) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->taskmanage, "false");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Taskmanage_True) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->taskmanage, "true");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Taskmanage_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_HwAcceleration_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->hwacceleration, "default");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_HwAcceleration_Default) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->hwacceleration, "default");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_HwAcceleration_Off) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->hwacceleration, "off");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_HwAcceleration_On) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->hwacceleration, "on");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Type_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Type_Capp) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->type, "capp");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Type_Webapp) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->type, "webapp");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Label_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->label);
- ASSERT_EQ(Size(&labels), 0);
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Label_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->label);
- ASSERT_EQ(Size(&labels), 1);
- ASSERT_CSTR_EQ((*labels.begin())->text, "label");
- ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Label_Text_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Label_Lang_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Label_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->label);
- ASSERT_EQ(Size(&labels), 2);
- ASSERT_CSTR_EQ((*labels.begin())->text, "label");
- ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
- ASSERT_CSTR_EQ((*++labels.begin())->text, "label_GB");
- ASSERT_CSTR_EQ((*++labels.begin())->lang, "en-GB");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Label_Many_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Metadata_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->metadata);
- ASSERT_EQ(Size(&labels), 0);
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Metadata_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto metadata = GListRange<metadata_x*>(app->metadata);
- ASSERT_EQ(Size(&metadata), 1);
- ASSERT_CSTR_EQ((*metadata.begin())->key, "key");
- ASSERT_CSTR_EQ((*metadata.begin())->value, "value");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Metadata_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Metadata_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto metadata = GListRange<metadata_x*>(app->metadata);
- ASSERT_EQ(Size(&metadata), 2);
- ASSERT_CSTR_EQ((*metadata.begin())->key, "key1");
- ASSERT_CSTR_EQ((*metadata.begin())->value, "value1");
- ASSERT_CSTR_EQ((*++metadata.begin())->key, "key2");
- ASSERT_CSTR_EQ((*++metadata.begin())->value, "");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_BackgroundCategory_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto bg_categories = GListRange<char*>(app->background_category);
- ASSERT_EQ(Size(&bg_categories), 0);
-}
-
-TEST_F(ManifestTest, UIApplicationElement_BackgroundCategory_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto bg_categories = GListRange<char*>(app->background_category);
- ASSERT_EQ(Size(&bg_categories), 1);
- ASSERT_CSTR_EQ(*bg_categories.begin(), "bgcategory");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_BackgroundCategory_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_BackgroundCategory_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto bg_categories = GListRange<char*>(app->background_category);
- ASSERT_EQ(Size(&bg_categories), 2);
- ASSERT_CSTR_EQ(*bg_categories.begin(), "bgcategory1");
- ASSERT_CSTR_EQ(*++bg_categories.begin(), "bgcategory2");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_DataControl_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto datacontrols = GListRange<datacontrol_x*>(app->datacontrol);
- ASSERT_EQ(Size(&datacontrols), 0);
-}
-
-TEST_F(ManifestTest, UIApplicationElement_DataControl_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto datacontrols = GListRange<datacontrol_x*>(app->datacontrol);
- ASSERT_EQ(Size(&datacontrols), 1);
- ASSERT_CSTR_EQ((*datacontrols.begin())->providerid, "providerid");
- ASSERT_CSTR_EQ((*datacontrols.begin())->access, "access");
- ASSERT_CSTR_EQ((*datacontrols.begin())->type, "type");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_DataControl_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto datacontrols = GListRange<datacontrol_x*>(app->datacontrol);
- ASSERT_EQ(Size(&datacontrols), 2);
- ASSERT_CSTR_EQ((*datacontrols.begin())->providerid, "providerid1");
- ASSERT_CSTR_EQ((*datacontrols.begin())->access, "access1");
- ASSERT_CSTR_EQ((*datacontrols.begin())->type, "type1");
- ASSERT_CSTR_EQ((*++datacontrols.begin())->providerid, "providerid2");
- ASSERT_CSTR_EQ((*++datacontrols.begin())->access, "access2");
- ASSERT_CSTR_EQ((*++datacontrols.begin())->type, "type2");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_AppControl_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 0);
-}
-
-TEST_F(ManifestTest, UIApplicationElement_AppControl_Operation_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 0);
-}
-
-TEST_F(ManifestTest, UIApplicationElement_AppControl_Operation_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_AppControl_Operation_Invalid_NotURI) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_AppControl_Mime_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_AppControl_Uri_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_AppControl_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 1);
- ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
- "http://tizen.org/appcontrol/operation/compose");
- ASSERT_CSTR_EQ((*appcontrols.begin())->uri, "scheme://");
- ASSERT_CSTR_EQ((*appcontrols.begin())->mime, "application/pdf");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_AppControl_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 2);
- ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
- "http://tizen.org/appcontrol/operation/compose");
- ASSERT_CSTR_EQ((*appcontrols.begin())->uri, "scheme://");
- ASSERT_CSTR_EQ((*appcontrols.begin())->mime, "application/pdf");
- ASSERT_CSTR_EQ((*++appcontrols.begin())->operation,
- "http://tizen.org/appcontrol/operation/compose2");
- ASSERT_CSTR_EQ((*++appcontrols.begin())->uri, "scheme2://");
- ASSERT_CSTR_EQ((*++appcontrols.begin())->mime, "application/text");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_AppControl_SkipUri) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 1);
- ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
- "http://tizen.org/appcontrol/operation/compose");
- ASSERT_EQ((*appcontrols.begin())->uri, nullptr);
- ASSERT_CSTR_EQ((*appcontrols.begin())->mime, "application/pdf");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_AppControl_SkipMime) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 1);
- ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
- "http://tizen.org/appcontrol/operation/compose");
- ASSERT_CSTR_EQ((*appcontrols.begin())->uri, "scheme://");
- ASSERT_EQ((*appcontrols.begin())->mime, nullptr);
-}
-
-TEST_F(ManifestTest, UIApplicationElement_AppControl_CartesianProduct) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 8);
-
- std::vector<boost::tuple<std::string, std::string, std::string>>
- found_app_controls;
- for (auto& item : appcontrols) {
- found_app_controls.emplace_back(item->operation, item->uri, item->mime);
- }
-
- for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
- "http://tizen.org/appcontrol/operation/compose2"}) {
- for (auto uri : {"scheme1://", "scheme2://"}) {
- for (auto mime : {"application/text", "application/pdf"}) {
- ASSERT_IN(boost::make_tuple(operation, uri, mime), found_app_controls);
- }
- }
- }
-}
-
-TEST_F(ManifestTest,
- UIApplicationElement_AppControl_CartesianProduct_SkipMime) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 4);
-
- std::vector<boost::tuple<std::string, std::string, std::string>>
- found_app_controls;
- for (auto& item : appcontrols) {
- ASSERT_EQ(item->mime, nullptr);
- found_app_controls.emplace_back(item->operation, item->uri, "");
- }
-
- for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
- "http://tizen.org/appcontrol/operation/compose2"}) {
- for (auto uri : {"scheme1://", "scheme2://"}) {
- ASSERT_IN(boost::make_tuple(operation, uri, ""), found_app_controls);
- }
- }
-}
-
-TEST_F(ManifestTest, UIApplicationElement_AppControl_CartesianProduct_SkipUri) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
- ASSERT_EQ(Size(&appcontrols), 4);
-
- std::vector<boost::tuple<std::string, std::string, std::string>>
- found_app_controls;
- for (auto& item : appcontrols) {
- ASSERT_EQ(item->uri, nullptr);
- found_app_controls.emplace_back(item->operation, "", item->mime);
- }
-
- for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
- "http://tizen.org/appcontrol/operation/compose2"}) {
- for (auto mime : {"application/text", "application/pdf"}) {
- ASSERT_IN(boost::make_tuple(operation, "", mime), found_app_controls);
- }
- }
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Icon_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto icons = GListRange<icon_x*>(app->icon);
- ASSERT_EQ(Size(&icons), 0);
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Icon_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, UIApplicationElement_Icon_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto icons = GListRange<icon_x*>(app->icon);
- ASSERT_EQ(Size(&icons), 1);
- ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
- "test_icon.png");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_SetManifestXDefaults) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->package, "package0id");
- ASSERT_CSTR_EQ(m->version, "1.0.0");
- ASSERT_CSTR_EQ(m->installlocation, "auto");
- ASSERT_CSTR_EQ(m->appsetting, "false");
- ASSERT_CSTR_EQ(m->type, "tpk");
- ASSERT_NE(m->installed_time, nullptr);
- ASSERT_CSTR_EQ(m->mainapp_id, "package0id.appid");
- ASSERT_CSTR_EQ(m->nodisplay_setting, "false");
- ASSERT_CSTR_EQ(m->support_disable, "false");
- ASSERT_CSTR_EQ(m->api_version, "2.3");
- auto apps = GListRange<application_x*>(m->application);
- ASSERT_EQ(Size(&apps), 1);
- application_x* app = *apps.begin();
- ASSERT_CSTR_EQ(app->appid, "package0id.appid");
- ASSERT_NE(app->exec, nullptr);
- ASSERT_CSTR_EQ(app->nodisplay, "false");
- ASSERT_CSTR_EQ(app->multiple, "false");
- ASSERT_CSTR_EQ(app->taskmanage, "true");
- ASSERT_CSTR_EQ(app->hwacceleration, "default");
- ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
- ASSERT_CSTR_EQ(app->component_type, "uiapp");
- ASSERT_CSTR_EQ(app->mainapp, "true");
- ASSERT_CSTR_EQ(app->recentimage, "false");
- ASSERT_CSTR_EQ(app->launchcondition, "false");
- ASSERT_CSTR_EQ(app->indicatordisplay, "true");
- ASSERT_CSTR_EQ(app->effectimage_type, "image");
- ASSERT_CSTR_EQ(app->guestmode_visibility, "true");
- ASSERT_CSTR_EQ(app->permission_type, "normal");
- ASSERT_CSTR_EQ(app->component_type, "uiapp");
- ASSERT_CSTR_EQ(app->submode, "false");
- ASSERT_CSTR_EQ(app->process_pool, "false");
-}
-
-TEST_F(ManifestTest, UIApplicationElement_SplashScreens_Duplicated_Entry) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto apps = GListRange<application_x*>(m->application);
- ASSERT_EQ(Size(&apps), 1);
- application_x* app = *apps.begin();
- auto splashscreens = GListRange<splashscreen_x*>(app->splashscreens);
- ASSERT_EQ(splashscreens.Size(), 2);
- auto root_path = runner.GetRootApplicationPath();
- std::string pkgid = "package0id";
- auto src_directory = root_path / pkgid / "shared" / "res";
- auto test1 = src_directory / "test1.jpg";
- auto it = splashscreens.begin();
- ASSERT_CSTR_EQ((*it)->src, test1.c_str());
- ASSERT_CSTR_EQ((*it)->type, "img");
- ASSERT_CSTR_EQ((*it)->dpi, "hdpi");
- ASSERT_CSTR_EQ((*it)->orientation, "landscape");
- ASSERT_CSTR_EQ((*it)->operation,
- "http://tizen.org/appcontrol/operation/default");
- it++;
- ASSERT_CSTR_EQ((*it)->src, test1.c_str());
- ASSERT_CSTR_EQ((*it)->type, "img");
- ASSERT_CSTR_EQ((*it)->dpi, "hdpi");
- ASSERT_CSTR_EQ((*it)->orientation, "landscape");
- ASSERT_CSTR_EQ((*it)->operation,
- "http://tizen.org/appcontrol/operation/test_operation");
-}
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include "unit_tests/manifest_test.h"
-
-namespace bf = boost::filesystem;
-namespace ci = common_installer;
-
-TEST_F(ManifestTest, WatchApplicationElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->package, "package0id");
- auto apps = GListRange<application_x*>(m->application);
- ASSERT_EQ(Size(&apps), 1);
- application_x* app = *apps.begin();
- ASSERT_CSTR_EQ(app->appid, "package0id.appid");
- ASSERT_CSTR_EQ(app->component_type, "watchapp");
-}
-
-TEST_F(ManifestTest, WatchApplicationElement_Appid_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WatchApplicationElement_Appid_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WatchApplicationElement_Label_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->label);
- ASSERT_EQ(Size(&labels), 0);
-}
-
-TEST_F(ManifestTest, WatchApplicationElement_Label_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->label);
- ASSERT_EQ(Size(&labels), 1);
- ASSERT_CSTR_EQ((*labels.begin())->text, "label");
- ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
-}
-
-TEST_F(ManifestTest, WatchApplicationElement_Label_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WatchApplicationElement_Icon_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto icons = GListRange<icon_x*>(app->icon);
- ASSERT_EQ(Size(&icons), 0);
-}
-
-TEST_F(ManifestTest, WatchApplicationElement_Icon_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WatchApplicationElement_Icon_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto icons = GListRange<icon_x*>(app->icon);
- ASSERT_EQ(Size(&icons), 1);
- ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
- "test_icon.png");
-}
-
-TEST_F(ManifestTest, WatchApplicationElement_AmbientSupport_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->support_ambient, "false");
-}
-
-TEST_F(ManifestTest, WatchApplicationElement_AmbientSupport_False) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->support_ambient, "false");
-}
-
-
-TEST_F(ManifestTest, WatchApplicationElement_AmbientSupport_True) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->support_ambient, "true");
-}
-
-TEST_F(ManifestTest, WatchApplicationElement_AmbientSupport_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WatchApplicationElement_SetManifestXDefaults) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->package, "package0id");
- ASSERT_CSTR_EQ(m->version, "1.0.0");
- ASSERT_CSTR_EQ(m->installlocation, "auto");
- ASSERT_CSTR_EQ(m->appsetting, "false");
- ASSERT_CSTR_EQ(m->type, "tpk");
- ASSERT_NE(m->installed_time, nullptr);
- ASSERT_CSTR_EQ(m->mainapp_id, "package0id.appid");
- ASSERT_CSTR_EQ(m->nodisplay_setting, "false");
- ASSERT_CSTR_EQ(m->support_disable, "false");
- ASSERT_CSTR_EQ(m->api_version, "2.3");
- auto apps = GListRange<application_x*>(m->application);
- ASSERT_EQ(Size(&apps), 1);
- application_x* app = *apps.begin();
- ASSERT_CSTR_EQ(app->appid, "package0id.appid");
- ASSERT_NE(app->exec, nullptr);
- ASSERT_CSTR_EQ(app->nodisplay, "true");
- ASSERT_CSTR_EQ(app->multiple, "false");
- ASSERT_CSTR_EQ(app->taskmanage, "false");
- ASSERT_CSTR_EQ(app->hwacceleration, "default");
- ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
- ASSERT_CSTR_EQ(app->component_type, "watchapp");
- ASSERT_CSTR_EQ(app->mainapp, "true");
- ASSERT_CSTR_EQ(app->recentimage, "false");
- ASSERT_CSTR_EQ(app->launchcondition, "false");
- ASSERT_CSTR_EQ(app->indicatordisplay, "true");
- ASSERT_CSTR_EQ(app->effectimage_type, "image");
- ASSERT_CSTR_EQ(app->guestmode_visibility, "true");
- ASSERT_CSTR_EQ(app->permission_type, "normal");
- ASSERT_CSTR_EQ(app->submode, "false");
- ASSERT_CSTR_EQ(app->process_pool, "false");
-}
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include "unit_tests/manifest_test.h"
-
-namespace bf = boost::filesystem;
-namespace ci = common_installer;
-
-TEST_F(ManifestTest, WidgetApplicationElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->package, "package0id");
- auto apps = GListRange<application_x*>(m->application);
- ASSERT_EQ(Size(&apps), 1);
- application_x* app = *apps.begin();
- ASSERT_CSTR_EQ(app->appid, "package0id.appid");
- ASSERT_CSTR_EQ(app->component_type, "widgetapp");
-}
-
-TEST_F(ManifestTest, WidgetApplicationElement_Appid_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WidgetApplicationElement_Appid_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WidgetApplicationElement_Label_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->label);
- ASSERT_EQ(Size(&labels), 0);
-}
-
-TEST_F(ManifestTest, WidgetApplicationElement_Label_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->label);
- ASSERT_EQ(Size(&labels), 1);
- ASSERT_CSTR_EQ((*labels.begin())->text, "label");
- ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
-}
-
-TEST_F(ManifestTest, WidgetApplicationElement_Label_Text_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WidgetApplicationElement_Label_Lang_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WidgetApplicationElement_Label_Many) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto labels = GListRange<label_x*>(app->label);
- ASSERT_EQ(Size(&labels), 2);
- ASSERT_CSTR_EQ((*labels.begin())->text, "label");
- ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
- ASSERT_CSTR_EQ((*++labels.begin())->text, "label_GB");
- ASSERT_CSTR_EQ((*++labels.begin())->lang, "en-GB");
-}
-
-TEST_F(ManifestTest, WidgetApplicationElement_Label_Many_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WidgetApplicationElement_Icon_Missing) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto icons = GListRange<icon_x*>(app->icon);
- ASSERT_EQ(Size(&icons), 0);
-}
-
-TEST_F(ManifestTest, WidgetApplicationElement_Icon_Invalid) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WidgetApplicationElement_Icon_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- application_x* app = GetSingleApp(runner.GetManifest());
- ASSERT_NE(app, nullptr);
- auto icons = GListRange<icon_x*>(app->icon);
- ASSERT_EQ(Size(&icons), 1);
- ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
- "test_icon.png");
-}
-
-// preview, update-period, support-size are supposed to be parsed by plugin
-
-TEST_F(ManifestTest, WidgetApplicationElement_SetManifestXDefaults) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->package, "package0id");
- ASSERT_CSTR_EQ(m->version, "1.0.0");
- ASSERT_CSTR_EQ(m->installlocation, "auto");
- ASSERT_CSTR_EQ(m->appsetting, "false");
- ASSERT_CSTR_EQ(m->type, "tpk");
- ASSERT_NE(m->installed_time, nullptr);
- ASSERT_CSTR_EQ(m->mainapp_id, "package0id.appid");
- ASSERT_CSTR_EQ(m->nodisplay_setting, "false");
- ASSERT_CSTR_EQ(m->support_disable, "false");
- ASSERT_CSTR_EQ(m->api_version, "2.3");
- auto apps = GListRange<application_x*>(m->application);
- ASSERT_EQ(Size(&apps), 1);
- application_x* app = *apps.begin();
- ASSERT_CSTR_EQ(app->appid, "package0id.appid");
- ASSERT_NE(app->exec, nullptr);
- ASSERT_CSTR_EQ(app->nodisplay, "true");
- ASSERT_CSTR_EQ(app->multiple, "false");
- ASSERT_CSTR_EQ(app->taskmanage, "false");
- ASSERT_CSTR_EQ(app->hwacceleration, "default");
- ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
- ASSERT_CSTR_EQ(app->component_type, "widgetapp");
- ASSERT_CSTR_EQ(app->mainapp, "true");
- ASSERT_CSTR_EQ(app->recentimage, "false");
- ASSERT_CSTR_EQ(app->launchcondition, "false");
- ASSERT_CSTR_EQ(app->indicatordisplay, "false");
- ASSERT_CSTR_EQ(app->effectimage_type, "image");
- ASSERT_CSTR_EQ(app->guestmode_visibility, "true");
- ASSERT_CSTR_EQ(app->permission_type, "normal");
- ASSERT_CSTR_EQ(app->submode, "false");
- ASSERT_CSTR_EQ(app->process_pool, "false");
-}
+++ /dev/null
-// Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include <boost/exception/diagnostic_information.hpp>
-#include <boost/program_options.hpp>
-
-#include <common/utils/subprocess.h>
-#include <unit_tests/common/smoke_utils.h>
-
-#include <gtest/gtest.h>
-
-#include <map>
-#include <string>
-#include <vector>
-
-#include "unit_tests/tpk_smoke_utils.h"
-
-namespace bf = boost::filesystem;
-namespace bpo = boost::program_options;
-namespace ci = common_installer;
-
-enum class ReqType : int {
- UNKNOWN_REQ,
- INSTALL_REQ,
- UNINSTALL_REQ,
- UPDATE_REQ,
- DELTA_REQ,
- MOUNT_INSTALL_REQ,
- MOUNT_UPDATE_REQ,
-};
-
-enum class BackupType : int {
- MOVE,
- COPY_AND_REMOVE,
-};
-
-std::map<ReqType, std::string> install_req_filter = {
- { ReqType::INSTALL_REQ, "SmokeTest.RecoveryMode_Tpk_Installation" },
- { ReqType::UNINSTALL_REQ, "SmokeTest.RecoveryMode_Tpk_Uninstallation" },
- { ReqType::UPDATE_REQ, "SmokeTest.RecoveryMode_Tpk_Update" },
- { ReqType::DELTA_REQ, "SmokeTest.RecoveryMode_ForDelta" },
- { ReqType::MOUNT_INSTALL_REQ, "SmokeTest.RecoveryMode_ForMountInstall" },
- { ReqType::MOUNT_UPDATE_REQ, "SmokeTest.RecoveryMode_ForMountUpdate" }
-};
-
-int delay = 1000000;
-int interval = 500000;
-int test_count = 0;
-
-namespace smoke_test {
-
-class SmokeEnvironment : public testing::Environment {
- public:
- explicit SmokeEnvironment(ci::RequestMode mode, bool no_backup,
- BackupType backup_type) :
- request_mode_(mode), no_backup_(no_backup),
- backup_type_(backup_type) {
- }
-
- void SetUp() override {
- if (request_mode_ == ci::RequestMode::USER) {
- ASSERT_TRUE(AddTestUser(&test_user));
- }
- if (no_backup_)
- return;
- backups_ = SetupBackupDirectories(test_user.uid);
- if (backup_type_ == BackupType::MOVE) {
- for (auto& path : backups_)
- ASSERT_TRUE(BackupPath(path));
- } else if (backup_type_ == BackupType::COPY_AND_REMOVE) {
- for (auto& path : backups_)
- ASSERT_TRUE(BackupPathCopyAndRemove(path));
- }
- }
-
- void TearDown() override {
- test_count++;
- ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL ||
- (request_mode_ == ci::RequestMode::USER &&
- kGlobalUserUid != test_user.uid));
-
- ci::PkgQueryInterface pkg_query("recoverypkg", test_user.uid, true);
- if (pkg_query.IsPackageInstalled()) {
- TpkSmokeTestHelperRunner backend;
- SmokeTestHelperRunner::Result ret =
- backend.UninstallWithSubprocess("recoverypkg", test_user.uid);
- ASSERT_EQ(ret, SmokeTestHelperRunner::Result::SUCCESS);
- }
-
- if (request_mode_ == ci::RequestMode::USER) {
- ASSERT_TRUE(DeleteTestUser());
- }
- if (no_backup_)
- return;
- if (backup_type_ == BackupType::MOVE) {
- for (auto& path : backups_)
- ASSERT_TRUE(RestorePath(path));
- } else if (backup_type_ == BackupType::COPY_AND_REMOVE) {
- for (auto& path : backups_)
- ASSERT_TRUE(RestorePathCopyAndRemove(path));
- }
- }
-
- User test_user;
-
- private:
- ci::RequestMode request_mode_;
- std::vector<bf::path> backups_;
- bool no_backup_;
- BackupType backup_type_;
-};
-
-} // namespace smoke_test
-
-namespace {
-
-smoke_test::SmokeEnvironment *env = nullptr;
-
-void signalHandler(int signum) {
- env->TearDown();
- exit(signum);
-}
-
-} // namespace
-
-namespace smoke_test {
-
-class SmokeTest : public testing::Test {
- public:
- SmokeTest() : params{PackageType::TPK, false} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
-
- protected:
- TpkSmokeTestHelperRunner backend;
- TestParameters params;
-};
-
-TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
-
- bf::path path = kSmokePackagesDirectory / "RecoveryPkg.tpk";
- int wait_time = delay + interval * test_count;
-
- SmokeTestHelperRunner::Result ret = backend.InstallWithSubprocessAndKill(
- path, params.test_user.uid, wait_time);
- if (ret == SmokeTestHelperRunner::Result::SUCCESS) {
- std::cout << "install finished before process killed" << std::endl;
- return;
- }
- ASSERT_EQ(ret, SmokeTestHelperRunner::Result::KILLED);
- std::string pkgid = "recoverypkg";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- if (recovery_file.empty()) {
- std::cout << "recovery file dosen't exist, "
- "this test is skipped" << std::endl;
- return;
- }
- ASSERT_EQ(backend.RecoveryWithSubprocess(recovery_file, params.test_user.uid),
- SmokeTestHelperRunner::Result::SUCCESS);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_Tpk_Uninstallation) {
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- bf::path path = kSmokePackagesDirectory / "RecoveryPkg.tpk";
-
- SmokeTestHelperRunner::Result ret = backend.InstallWithSubprocess(
- path, params.test_user.uid);
- if (ret != SmokeTestHelperRunner::Result::SUCCESS) {
- std::cout << "failed to install package before uninstall" << std::endl;
- return;
- }
-
- std::string pkgid = "recoverypkg";
- int wait_time = delay + interval * test_count;
- ret = backend.UninstallWithSubprocessAndKill(
- pkgid, params.test_user.uid, wait_time);
- if (ret == SmokeTestHelperRunner::Result::SUCCESS) {
- std::cout << "uninstall finished before process killed" << std::endl;
- return;
- }
- ASSERT_EQ(ret, SmokeTestHelperRunner::Result::KILLED);
-
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- if (recovery_file.empty()) {
- std::cout << "recovery file dosen't exist, "
- "this test is skipped" << std::endl;
- return;
- }
- ASSERT_EQ(backend.RecoveryWithSubprocess(recovery_file, params.test_user.uid),
- SmokeTestHelperRunner::Result::SUCCESS);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
-
- bf::path path_old = kSmokePackagesDirectory / "RecoveryPkg.tpk";
- bf::path path_new = kSmokePackagesDirectory / "RecoveryPkg2.tpk";
- int wait_time = delay + interval * test_count;
-
- ASSERT_EQ(backend.InstallWithSubprocess(path_old, params.test_user.uid),
- SmokeTestHelperRunner::Result::SUCCESS);
-
- SmokeTestHelperRunner::Result ret = backend.InstallWithSubprocessAndKill(
- path_new, params.test_user.uid, wait_time);
- if (ret == SmokeTestHelperRunner::Result::SUCCESS) {
- std::cout << "update finished before process killed" << std::endl;
- return;
- }
- ASSERT_EQ(ret, SmokeTestHelperRunner::Result::KILLED);
-
- std::string pkgid = "recoverypkg";
- std::string appid = "recoverypkg";
- std::string exec = "recoverypkg";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- if (recovery_file.empty()) {
- std::cout << "recovery file dosen't exist, "
- "this test is skipped" << std::endl;
- return;
- }
-
- std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
- GetRecoverFileInfo(recovery_file);
- ASSERT_EQ(backend.RecoveryWithSubprocess(recovery_file, params.test_user.uid),
- SmokeTestHelperRunner::Result::SUCCESS);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION",
- recovery_info->cleanup() ? "2\n" : "1\n", params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForDelta) {
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
-
- bf::path path_old = kSmokePackagesDirectory / "RecoveryPkg.tpk";
- bf::path path_new = kSmokePackagesDirectory / "RecoveryPkg.delta";
- int wait_time = delay + interval * test_count;
-
- ASSERT_EQ(backend.InstallWithSubprocess(path_old, params.test_user.uid),
- SmokeTestHelperRunner::Result::SUCCESS);
-
- SmokeTestHelperRunner::Result ret = backend.InstallWithSubprocessAndKill(
- path_new, params.test_user.uid, wait_time);
- if (ret == SmokeTestHelperRunner::Result::SUCCESS) {
- std::cout << "delta finished before process killed" << std::endl;
- return;
- }
- ASSERT_EQ(ret, SmokeTestHelperRunner::Result::KILLED);
-
- std::string pkgid = "recoverypkg";
- std::string appid = "recoverypkg";
- std::string exec = "recoverypkg";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- bf::path root_path = ci::GetRootAppPath(params.is_readonly,
- params.test_user.uid);
- if (recovery_file.empty()) {
- std::cout << "recovery file dosen't exist, "
- "this test is skipped" << std::endl;
- return;
- }
-
- std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
- GetRecoverFileInfo(recovery_file);
- ASSERT_EQ(backend.RecoveryWithSubprocess(recovery_file, params.test_user.uid),
- SmokeTestHelperRunner::Result::SUCCESS);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION",
- recovery_info->cleanup() ? "2\n" : "1\n", params));
- bool deleted_exist = bf::exists(root_path / pkgid / "res/DELETED");
- bool added_exist = bf::exists(root_path / pkgid / "res/ADDED");
- ASSERT_NE(deleted_exist, added_exist);
- ASSERT_TRUE(recovery_info->cleanup() ? added_exist : deleted_exist);
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
-
- bf::path path = kSmokePackagesDirectory / "RecoveryPkg.tpk";
- int wait_time = delay + interval * test_count;
-
- SmokeTestHelperRunner::Result ret = backend.MountInstallWithSubprocessAndKill(
- path, params.test_user.uid, wait_time);
- if (ret == SmokeTestHelperRunner::Result::SUCCESS) {
- std::cout << "mount install finished before process killed" << std::endl;
- return;
- }
-
- std::string pkgid = "recoverypkg";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- if (recovery_file.empty()) {
- std::cout << "recovery file dosen't exist, "
- "this test is skipped" << std::endl;
- return;
- }
- ASSERT_EQ(backend.RecoveryWithSubprocess(recovery_file, params.test_user.uid),
- SmokeTestHelperRunner::Result::SUCCESS);
-
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
-
- bf::path path_old =
- kSmokePackagesDirectory / "RecoveryPkg.tpk";
- bf::path path_new =
- kSmokePackagesDirectory / "RecoveryPkg2.tpk";
- int wait_time = delay + interval * test_count;
-
- ASSERT_EQ(backend.MountInstallWithSubprocess(path_old, params.test_user.uid),
- SmokeTestHelperRunner::Result::SUCCESS);
-
- SmokeTestHelperRunner::Result ret = backend.MountInstallWithSubprocessAndKill(
- path_new, params.test_user.uid, wait_time);
- if (ret == SmokeTestHelperRunner::Result::SUCCESS) {
- std::cout << "mount update finished before process killed" << std::endl;
- return;
- }
-
- std::string pkgid = "recoverypkg";
- std::string appid = "recoverypkg";
- std::string exec = "recoverypkg";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- if (recovery_file.empty()) {
- std::cout << "recovery file dosen't exist, "
- "this test is skipped" << std::endl;
- return;
- }
-
- // Filesystem may be mounted after crash
- ScopedTzipInterface poweroff_unmount_interface(pkgid, params.test_user.uid);
- poweroff_unmount_interface.Release();
-
- ASSERT_EQ(backend.RecoveryWithSubprocess(recovery_file, params.test_user.uid),
- SmokeTestHelperRunner::Result::SUCCESS);
-
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "res/VERSION", "1\n", params));
-}
-
-} // namespace smoke_test
-
-const int kBufSize = 1024;
-
-int main(int argc, char** argv) {
- try {
- bool no_backup = false;
- int repeat_count = 10;
- ReqType req_type = ReqType::UNKNOWN_REQ;
- bool repeat = false;
- BackupType backup_type = BackupType::MOVE;
- ci::RequestMode request_mode = smoke_test::ParseRequestMode(argc, argv);
- if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL)
- std::cout << "Run recovery test with user request mode" << std::endl;
-
- bpo::options_description options("Allowed options");
- bpo::variables_map opt_map;
- options.add_options()
- ("help", "display this help message")
- ("install",
- "recovery test for forced termination "
- "during package installing")
- ("uninstall",
- "recovery test for forced termination "
- "during package uninstallation")
- ("update",
- "recovery test for forced termination "
- "during package updating")
- ("delta",
- "recovery test for forced termination "
- "during package delta installing")
- ("mount-install",
- "recovery test for forced termination "
- "during package mount-installing")
- ("mount-update",
- "recovery test for forced termination "
- "during package mount-updating")
- ("delay", bpo::value<int>(), "fixed delay for forced termination\n"
- "unit : microsecond (ex. 1000000us = 1s)")
- ("interval", bpo::value<int>(),
- "use with repeat option.\n"
- "as it repeat the interval is added to delay\n"
- "unit : microsecond (ex. 1000000us = 1s)")
- ("repeat", bpo::value<int>(), "option for performing tests repeatedly\n"
- "enter -1 to test infinitely")
- ("no-backup", "Do test without backup")
- ("backup-type", bpo::value<std::string>(), "<move|copy> set test's "
- "backup type \'move\', \'copy and remove\'");
- bpo::store(bpo::command_line_parser(argc, argv).
- options(options).allow_unregistered().run(), opt_map);
- if (opt_map.count("help")) {
- std::cerr << options << std::endl;
- return -1;
- }
-
- if (opt_map.count("install"))
- req_type = ReqType::INSTALL_REQ;
- if (opt_map.count("uninstall"))
- req_type = ReqType::UNINSTALL_REQ;
- else if (opt_map.count("update"))
- req_type = ReqType::UPDATE_REQ;
- else if (opt_map.count("delta"))
- req_type = ReqType::DELTA_REQ;
- else if (opt_map.count("mount-install"))
- req_type = ReqType::MOUNT_INSTALL_REQ;
- else if (opt_map.count("mount-update"))
- req_type = ReqType::MOUNT_UPDATE_REQ;
-
- if (opt_map.count("delay"))
- delay = opt_map["delay"].as<int>();
-
- if (opt_map.count("interval"))
- interval = opt_map["interval"].as<int>();
-
- if (opt_map.count("repeat")) {
- repeat = true;
- repeat_count = opt_map["repeat"].as<int>();
- }
-
- if (opt_map.count("no-backup"))
- no_backup = true;
- if (opt_map.count("backup-type")) {
- if (opt_map["backup-type"].as<std::string>() == "move") {
- backup_type = BackupType::MOVE;
- } else if (opt_map["backup-type"].as<std::string>() == "copy") {
- backup_type = BackupType::COPY_AND_REMOVE;
- } else {
- std::cerr << options << std::endl;
- return -1;
- }
- }
- bpo::notify(opt_map);
-
- if (req_type == ReqType::UNKNOWN_REQ) {
- std::cerr << options << std::endl;
- return 0;
- }
-
- testing::GTEST_FLAG(filter) = install_req_filter[req_type];
- if (repeat) {
- testing::GTEST_FLAG(repeat) = repeat_count;
- testing::GTEST_FLAG(break_on_failure) = true;
- }
-
- testing::InitGoogleTest(&argc, argv);
- ::env = static_cast<smoke_test::SmokeEnvironment*>(
- testing::AddGlobalTestEnvironment(
- new smoke_test::SmokeEnvironment(request_mode,
- no_backup, backup_type)));
- signal(SIGINT, ::signalHandler);
- signal(SIGSEGV, ::signalHandler);
- return RUN_ALL_TESTS();
- } catch (...) {
- std::cout << "Exception occurred during testing" << std::endl;
- return 1;
- }
-}
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include <boost/exception/diagnostic_information.hpp>
-#include <boost/program_options.hpp>
-
-#include <common/utils/subprocess.h>
-#include <common/utils/file_util.h>
-#include <common/utils/pkgmgr_query.h>
-#include <unit_tests/common/smoke_utils.h>
-
-#include <gtest/gtest.h>
-#include <gtest/gtest-death-test.h>
-
-#include "unit_tests/tpk_smoke_utils.h"
-
-namespace st = smoke_test;
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
-namespace ci = common_installer;
-namespace bpo = boost::program_options;
-
-enum class BackupType : int {
- MOVE,
- COPY_AND_REMOVE,
-};
-
-namespace smoke_test {
-
-class SmokeEnvironment : public testing::Environment {
- public:
- explicit SmokeEnvironment(ci::RequestMode mode, bool no_backup,
- BackupType backup_type) :
- request_mode_(mode), no_backup_(no_backup),
- backup_type_(backup_type) {
- }
- void SetUp() override {
- if (request_mode_ == ci::RequestMode::USER) {
- ASSERT_TRUE(AddTestUser(&test_user));
- }
- if (no_backup_)
- return;
- backups_ = SetupBackupDirectories(test_user.uid);
- if (backup_type_ == BackupType::MOVE) {
- for (auto& path : backups_)
- ASSERT_TRUE(BackupPath(path));
- } else if (backup_type_ == BackupType::COPY_AND_REMOVE) {
- for (auto& path : backups_)
- ASSERT_TRUE(BackupPathCopyAndRemove(path));
- }
- }
- void TearDown() override {
- ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL ||
- (request_mode_ == ci::RequestMode::USER &&
- kGlobalUserUid != test_user.uid));
- TpkBackendInterface backend(std::to_string(test_user.uid));
- UninstallAllSmokeApps(request_mode_, test_user.uid, &backend);
- if (request_mode_ == ci::RequestMode::USER) {
- ASSERT_TRUE(DeleteTestUser());
- }
- if (no_backup_)
- return;
- if (backup_type_ == BackupType::MOVE) {
- for (auto& path : backups_)
- ASSERT_TRUE(RestorePath(path));
- } else if (backup_type_ == BackupType::COPY_AND_REMOVE) {
- for (auto& path : backups_)
- ASSERT_TRUE(RestorePathCopyAndRemove(path));
- }
- }
- User test_user;
-
- private:
- ci::RequestMode request_mode_;
- std::vector<bf::path> backups_;
- bool no_backup_;
- BackupType backup_type_;
-};
-
-} // namespace smoke_test
-
-namespace {
-
-smoke_test::SmokeEnvironment *env = nullptr;
-void signalHandler(int signum) {
- env->TearDown();
- exit(signum);
-}
-
-} // namespace
-
-namespace smoke_test {
-
-class SmokeTest : public testing::Test {
- public:
- SmokeTest() : backend(std::to_string(env->test_user.uid)),
- params{PackageType::TPK, false} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
- protected:
- TpkBackendInterface backend;
- TestParameters params;
-};
-
-class RollbackSmokeTest : public testing::Test {
- public:
- RollbackSmokeTest() : backend(std::to_string(env->test_user.uid),
- RequestResult::FAIL), params{PackageType::TPK, false} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
- protected:
- TpkBackendInterface backend;
- TestParameters params;
-};
-
-class PreloadSmokeTest : public testing::Test {
- public:
- PreloadSmokeTest() : backend(std::to_string(env->test_user.uid)),
- params{PackageType::TPK, true} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
- protected:
- TpkBackendInterface backend;
- TestParameters params;
-};
-
-// TODO(b.kunikowski): New smoke app pkgid name convention.
-// Change all smokeapp pkgids to smoketpk, because now there
-// may be some smoke app pkgid identical as in tpk smoke tests, and this may
-// cause bad results of some smoke tests.
-
-TEST_F(SmokeTest, DeltaMode_Tpk) {
- bf::path path = kSmokePackagesDirectory / "DeltaMode_Tpk.tpk";
- bf::path delta_package = kSmokePackagesDirectory / "DeltaMode_Tpk.delta";
- std::string pkgid = "smokeapp18";
- std::string appid = "smokeapp18.DeltaModeTpk";
- std::string exec = "native";
- ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-
- // Check delta modifications
- bf::path root_path = ci::GetRootAppPath(params.is_readonly,
- params.test_user.uid);
- ASSERT_FALSE(bf::exists(root_path / pkgid / "DELETED"));
- ASSERT_TRUE(bf::exists(root_path / pkgid / "ADDED"));
- ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "native"));
- ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" / "native.png"));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "MODIFIED", "version 2\n",
- params));
-}
-
-TEST_F(RollbackSmokeTest, DeltaMode) {
- bf::path path = kSmokePackagesDirectory / "DeltaMode_Tpk_Rollback.tpk";
- bf::path delta_package = kSmokePackagesDirectory /
- "DeltaMode_Tpk_Rollback.delta";
- std::string pkgid = "smoketpk28";
- std::string appid = "smoketpk28.DeltaModeTpk_Rollback";
- std::string exec = "basicdali";
- ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::ERROR);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-
- // Check delta modifications
- bf::path root_path = ci::GetRootAppPath(params.is_readonly,
- params.test_user.uid);
- ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "DELETED"));
- ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "ADDED"));
- ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "basicdali"));
- ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" /
- "basicdali.png"));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "res/MODIFIED",
- "version 1\n",
- params));
-}
-
-TEST_F(SmokeTest, ReinstallMode_Tpk) {
- bf::path path = kSmokePackagesDirectory / "ReinstallMode_Tpk.tpk";
- bf::path rds_directory = kSmokePackagesDirectory / "delta_dir";
- std::string pkgid = "smokeapp25";
- std::string appid = "smokeapp25.ReinstallModeTpk";
- std::string exec = "native";
- bf::path sdk_expected_directory = kSdkDirectory / "tmp" / pkgid;
- ASSERT_TRUE(ci::CopyDir(rds_directory, sdk_expected_directory));
- ASSERT_EQ(backend.RDSUpdate(path, pkgid), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-
- // Check rds modifications
- bf::path root_path = ci::GetRootAppPath(false,
- params.test_user.uid);
- ASSERT_FALSE(bf::exists(root_path / pkgid / "DELETED"));
- ASSERT_TRUE(bf::exists(root_path / pkgid / "ADDED"));
- ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "native"));
- ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" / "native.png"));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "MODIFIED", "version 2\n",
- params));
-}
-
-TEST_F(SmokeTest, InstallationMode_Tpk) {
- bf::path path = kSmokePackagesDirectory / "InstallationMode_Tpk.tpk";
- std::string pkgid = "smokeapp12";
- std::string appid = "smokeapp12.InstallationModeTpk";
- std::string exec = "native";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-}
-
-TEST_F(SmokeTest, UpdateMode_Tpk) {
- bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Tpk.tpk";
- bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Tpk_2.tpk";
- std::string pkgid = "smokeapp13";
- std::string appid = "smokeapp13.UpdateModeTpk";
- std::string exec = "native";
- ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "VERSION", "2\n", params));
-}
-
-TEST_F(SmokeTest, DeinstallationMode_Tpk) {
- bf::path path = kSmokePackagesDirectory / "DeinstallationMode_Tpk.tpk";
- std::string pkgid = "smokeapp14";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Uninstall(pkgid), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(SmokeTest, EnablePkg) {
- bf::path path = kSmokePackagesDirectory / "EnablePkg.tpk";
- std::string pkgid = "smokeapp22";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.DisablePackage(pkgid), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.EnablePackage(pkgid), ci::AppInstaller::Result::OK);
- ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
- ASSERT_TRUE(pkg_query.IsPackageInstalled(
- ci::GetRequestMode(params.test_user.uid)));
-}
-
-TEST_F(SmokeTest, DisablePkg) {
- bf::path path = kSmokePackagesDirectory / "DisablePkg.tpk";
- std::string pkgid = "smokeapp23";
- std::string appid = "smokeapp23.DisablePkg";
- std::string exec = "=disablepkg";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.DisablePackage(pkgid), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ci::QueryIsDisabledPackage(pkgid, params.test_user.uid));
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
- bf::path path = kSmokePackagesDirectory / "RecoveryMode_Tpk_Installation.tpk";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-i", path.string(), "-u", test_uid_str.c_str());
- ASSERT_NE(backend_crash.Wait(), 0);
-
- std::string pkgid = "smokeapp15";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
- GetRecoverFileInfo(recovery_file);
- ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
-}
-
-TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
- bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update.tpk";
- bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update_2.tpk";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
-
- std::string pkgid = "smokeapp16";
- std::string appid = "smokeapp16.RecoveryModeTpkUpdate";
- std::string exec = "native";
- ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
- std::string version_old = pkg_query.Version();
-
- ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
- ASSERT_NE(backend_crash.Wait(), 0);
-
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
- GetRecoverFileInfo(recovery_file);
- ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
-
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1", params));
- ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
- ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
- std::string version_recovered = pkg_query2.Version();
- ASSERT_TRUE(version_old == version_recovered);
-}
-
-TEST_F(SmokeTest, MountInstallationMode_Tpk) {
- bf::path path = kSmokePackagesDirectory / "MountInstallationMode_Tpk.tpk";
- std::string pkgid = "smokeapp26";
- std::string appid = "smokeapp26.MountInstallationModeTpk";
- std::string exec = "native";
- ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-}
-
-TEST_F(SmokeTest, MountUpdateMode_Tpk) {
- bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode_Tpk.tpk";
- bf::path path_new = kSmokePackagesDirectory / "MountUpdateMode_Tpk_2.tpk";
- std::string pkgid = "smokeapp27";
- std::string appid = "smokeapp27.MountUpdateModeTpk";
- std::string exec = "native";
- ASSERT_EQ(backend.MountInstallSuccess(path_old),
- ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.MountInstall(path_new), ci::AppInstaller::Result::OK);
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "2\n",
- params));
-}
-
-TEST_F(SmokeTest, MigrateLegacyExternalImage_Tpk) {
- ASSERT_TRUE(CheckAvailableExternalPath());
- bf::path path = kSmokePackagesDirectory / "InstallExternal_Tpk_2.tpk";
- std::string pkgid = "smokeapp28";
- std::string appid = "smokeapp28.InstallExternalTpk";
- std::string exec = "smokeapp28";
- bf::path legacy_path = kSmokePackagesDirectory / kLegacyExtImageDir;
- std::string test_uid_str = std::to_string(params.test_user.uid);
- if (test_uid_str == kDefaultUserIdStr ||
- params.test_user.uid == kGlobalUserUid) {
- ASSERT_EQ(backend.MigrateLegacyExternalImage(pkgid, path, legacy_path),
- ci::AppInstaller::Result::OK);
- ValidateExternalPackage(pkgid, {appid, exec}, params);
- } else {
- ASSERT_EQ(backend.MigrateLegacyExternalImage(pkgid, path, legacy_path),
- ci::AppInstaller::Result::ERROR);
- }
-}
-
-TEST_F(SmokeTest, InstallExternal_Tpk) {
- ASSERT_TRUE(CheckAvailableExternalPath());
- bf::path path = kSmokePackagesDirectory / "InstallExternal_Tpk.tpk";
- std::string pkgid = "smokeapp29";
- std::string appid = "smokeapp29.InstallExternalTpk";
- std::string exec = "smokeapp29";
- ASSERT_EQ(backend.InstallWithStorage(path, StorageType::EXTERNAL),
- ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidateExternalPackage(pkgid, {appid, exec}, params));
-}
-
-#define TEP_TEST_STARTING_BLOCK(NUMBER) \
- bf::path path = kSmokePackagesDirectory / "TEP_Tpk"; \
- path += #NUMBER; \
- path += ".tpk"; \
- bf::path tep1 = kSmokePackagesDirectory / "tep1.tep"; \
- bf::path tep2 = kSmokePackagesDirectory / "tep2.tep"; \
- std::string number = std::to_string(50 + NUMBER - 1); \
- std::string pkgid = std::string("smokeapp") + number; \
- std::string appid = pkgid + ".TEP"; \
- std::string exec = "native"; \
-
-TEST_F(SmokeTest, TEP_Tpk_TepInstall) {
- TEP_TEST_STARTING_BLOCK(1)
- ASSERT_EQ(backend.InstallWithTEP(path, tep1), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
- params));
-}
-
-TEST_F(SmokeTest, TEP_Tpk_TepInstallTepUpdate) {
- TEP_TEST_STARTING_BLOCK(2)
- ASSERT_EQ(backend.InstallWithTEP(path, tep1), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.InstallWithTEP(path, tep2), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep2.tep", "tep2\n",
- params));
-}
-
-TEST_F(SmokeTest, TEP_Tpk_NoTepInstallTepUpdate) {
- TEP_TEST_STARTING_BLOCK(3)
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.InstallWithTEP(path, tep2), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep2.tep", "tep2\n",
- params));
-}
-
-TEST_F(SmokeTest, TEP_Tpk_TepInstallNoTepUpdate) {
- TEP_TEST_STARTING_BLOCK(4)
- ASSERT_EQ(backend.InstallWithTEP(path, tep1), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
- params));
-}
-
-TEST_F(RollbackSmokeTest, TEP_Tpk_TepInstallTepUpdateRollback) {
- TEP_TEST_STARTING_BLOCK(5)
- ASSERT_EQ(backend.InstallSuccessWithTEP(path, tep1),
- ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.InstallWithTEP(path, tep2),
- ci::AppInstaller::Result::ERROR);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
- params));
-}
-
-TEST_F(RollbackSmokeTest, TEP_Tpk_NoTepInstallTepUpdateRollback) {
- TEP_TEST_STARTING_BLOCK(6)
- ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.InstallWithTEP(path, tep2),
- ci::AppInstaller::Result::ERROR);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- bf::path root_path = ci::GetRootAppPath(params.is_readonly,
- params.test_user.uid);
- bf::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
- ASSERT_FALSE(bf::exists(tep_file));
-}
-
-TEST_F(RollbackSmokeTest, TEP_Tpk_TepInstallNoTepUpdateRollback) {
- TEP_TEST_STARTING_BLOCK(7)
- ASSERT_EQ(backend.InstallSuccessWithTEP(path, tep1),
- ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
- params));
-}
-
-TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstall) {
- TEP_TEST_STARTING_BLOCK(8)
- ASSERT_EQ(backend.MountInstallWithTEP(path, tep1),
- ci::AppInstaller::Result::OK);
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
- params));
-}
-
-TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstallTepUpdate) {
- TEP_TEST_STARTING_BLOCK(9)
- ASSERT_EQ(backend.MountInstallWithTEP(path, tep1),
- ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.MountInstallWithTEP(path, tep2),
- ci::AppInstaller::Result::OK);
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep2.tep", "tep2\n",
- params));
-}
-
-TEST_F(SmokeTest, TEP_Tpk_Mount_NoTepInstallTepUpdate) {
- TEP_TEST_STARTING_BLOCK(10)
- ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.MountInstallWithTEP(path, tep2),
- ci::AppInstaller::Result::OK);
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep2.tep", "tep2\n",
- params));
-}
-
-TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstallNoTepUpdate) {
- TEP_TEST_STARTING_BLOCK(11)
- ASSERT_EQ(backend.MountInstallWithTEP(path, tep1),
- ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
- params));
-}
-
-TEST_F(RollbackSmokeTest, TEP_Tpk_Mount_TepInstallTepUpdateRollback) {
- TEP_TEST_STARTING_BLOCK(12)
- ASSERT_EQ(backend.MountInstallSuccessWithTEP(path, tep1),
- ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.MountInstallWithTEP(path, tep2),
- ci::AppInstaller::Result::ERROR);
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
- params));
-}
-
-TEST_F(RollbackSmokeTest, TEP_Tpk_Mount_NoTepInstallTepUpdateRollback) {
- TEP_TEST_STARTING_BLOCK(13)
- ASSERT_EQ(backend.MountInstallSuccess(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.MountInstallWithTEP(path, tep2),
- ci::AppInstaller::Result::ERROR);
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- bf::path root_path = ci::GetRootAppPath(params.is_readonly,
- params.test_user.uid);
- bf::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
- ASSERT_FALSE(bf::exists(tep_file));
-}
-
-TEST_F(RollbackSmokeTest, TEP_Tpk_Mount_TepInstallNoTepUpdateRollback) {
- TEP_TEST_STARTING_BLOCK(14)
- ASSERT_EQ(backend.MountInstallSuccessWithTEP(path, tep1),
- ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::ERROR);
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
- params));
-}
-
-TEST_F(PreloadSmokeTest, InstallationMode_Preload) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path path = kSmokePackagesDirectory / "InstallationMode_Preload.tpk";
- std::string pkgid = "smoketpk29";
- std::string appid = "smoketpk29.InstallationModePreload";
- std::string exec = "native";
- ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-}
-
-TEST_F(PreloadSmokeTest, UpdateMode_Preload) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Preload.tpk";
- bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Preload2.tpk";
- std::string pkgid = "smoketpk30";
- std::string appid = "smoketpk30.UpdateModePreload";
- std::string exec = "native";
- ASSERT_EQ(backend.InstallPreload(path_old), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.InstallPreload(path_new), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "2", params));
-}
-
-TEST_F(PreloadSmokeTest, DeinstallationMode_Preload) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path path = kSmokePackagesDirectory / "DeinstallationMode_Preload.tpk";
- std::string pkgid = "smoketpk31";
- ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.UninstallPreload(pkgid), ci::AppInstaller::Result::OK);
- CheckPackageNonExistance(pkgid, params);
-}
-
-TEST_F(SmokeTest, InstallationMode_GoodSignature) {
- bf::path path =
- kSmokePackagesDirectory / "InstallationMode_GoodSignature.tpk";
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Install(path));
-}
-
-TEST_F(SmokeTest, InstallationMode_WrongSignature) {
- bf::path path =
- kSmokePackagesDirectory / "InstallationMode_WrongSignature.tpk";
- ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.Install(path));
-}
-
-TEST_F(RollbackSmokeTest, InstallationMode_Rollback) {
- bf::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.tpk";
- std::string pkgid = "smoketpk34";
- ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.Install(path));
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForDelta) {
- bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.tpk";
- bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Install(path_old));
- ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
- ASSERT_NE(backend_crash.Wait(), 0);
-
- std::string pkgid = "smoketpk35";
- std::string appid = "smoketpk35.RecoveryMode_ForDelta";
- std::string exec = "smoketpk35";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
- GetRecoverFileInfo(recovery_file);
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Recover(recovery_file));
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/MODIFIED", "version 1",
- params));
- bf::path root_path = ci::GetRootAppPath(params.is_readonly,
- params.test_user.uid);
- ASSERT_TRUE(bf::exists(root_path / pkgid / "res/DELETED"));
- ASSERT_FALSE(bf::exists(root_path / pkgid / "res/ADDED"));
- ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
-}
-
-TEST_F(RollbackSmokeTest, UpdateMode) {
- bf::path old_path = kSmokePackagesDirectory / "UpdateMode_Rollback.tpk";
- bf::path new_path = kSmokePackagesDirectory / "UpdateMode_Rollback2.tpk";
- std::string pkgid = "smoketpk36";
- std::string appid = "smoketpk36.UpdateMode_Rollback";
- std::string exec = "smoketpk36";
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.InstallSuccess(old_path));
- ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
- std::string version_old = pkg_query.Version();
- ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.Install(new_path));
-
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1",
- params));
- ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
- std::string version_rollbacked = pkg_query2.Version();
- ASSERT_TRUE(version_old == version_rollbacked);
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
- bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.tpk";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-w", path.string(), "-u", test_uid_str.c_str());
- ASSERT_NE(0, backend_crash.Wait());
-
- std::string pkgid = "smoketpk37";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
- GetRecoverFileInfo(recovery_file);
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Recover(recovery_file));
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
- bf::path path_old =
- kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate.tpk";
- bf::path path_new =
- kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate2.tpk";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.MountInstall(path_old));
-
- std::string pkgid = "smoketpk38";
- std::string appid = "smoketpk38.RecoveryMode_ForMountUpdate";
- std::string exec = "smoketpk38";
- ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
- std::string version_old = pkg_query.Version();
-
- ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-w", path_new.string(), "-u", test_uid_str.c_str());
- ASSERT_NE(0, backend_crash.Wait());
-
- // Filesystem may be mounted after crash
- ScopedTzipInterface poweroff_unmount_interface(pkgid, params.test_user.uid);
- poweroff_unmount_interface.Release();
-
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
- GetRecoverFileInfo(recovery_file);
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Recover(recovery_file));
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
-
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1", params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "shared/res/VERSION", "1",
- params));
- ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
- ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
- std::string version_recovered = pkg_query2.Version();
- ASSERT_TRUE(version_old == version_recovered);
-}
-
-TEST_F(RollbackSmokeTest, MountInstallationMode) {
- bf::path path =
- kSmokePackagesDirectory / "MountInstallationMode_Rollback.tpk";
- std::string pkgid = "smoketpk39";
- ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.MountInstall(path));
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(RollbackSmokeTest, MountUpdateMode) {
- bf::path old_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback.tpk";
- bf::path new_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback2.tpk";
- std::string pkgid = "smoketpk40";
- std::string appid = "smoketpk40.MountUpdateMode_Rollback";
- std::string exec = "smoketpk40";
- ASSERT_EQ(ci::AppInstaller::Result::OK,
- backend.MountInstallSuccess(old_path));
- ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
- std::string version_old = pkg_query.Version();
- ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.MountInstall(new_path));
- ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
-
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1", params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "shared/res/VERSION", "1",
- params));
- ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
- std::string version_rollbacked = pkg_query2.Version();
- ASSERT_TRUE(version_old == version_rollbacked);
-}
-
-TEST_F(SmokeTest, ManifestDirectInstallMode) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path src_path = kSmokePackagesDirectory / "ManifestDirectInstallMode";
- std::string pkgid = "smoketpk41";
- std::string appid = "smoketpk41.ManifestDirectInstallMode";
- std::string exec = "basicui";
- bf::path pkg_path = ci::GetRootAppPath(params.is_readonly,
- params.test_user.uid);
-
- ci::CopyDir(src_path / pkgid, pkg_path / pkgid);
- ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
- ASSERT_FALSE(pkg_query.IsPackageInstalled(
- ci::GetRequestMode(params.test_user.uid)));
- ASSERT_EQ(backend.ManifestDirectInstall(pkgid), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-}
-
-TEST_F(SmokeTest, ManifestDirectUpdateMode) {
- bf::path path = kSmokePackagesDirectory / "ManifestDirectUpdateMode.tpk";
- std::string pkgid = "smoketpk42";
- std::string appid = "smoketpk42.ManifestDirectUpdateMode";
- std::string exec = "basicui";
-
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- int install_time = GetAppInstalledTime(appid.c_str(), params.test_user.uid);
- ASSERT_EQ(backend.ManifestDirectInstall(pkgid), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(GetAppInstalledTime(appid.c_str(),
- params.test_user.uid) > install_time)
- << "Package is not updated (app installed time didn't change).";
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-}
-
-TEST_F(PreloadSmokeTest, ReadonlyUpdateInstallMode) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path path = kSmokePackagesDirectory / "ReadonlyUpdateInstallMode.tpk";
- std::string pkgid = "smoketpk43";
- std::string appid = "smoketpk43.ReadonlyUpdateInstallMode";
- std::string exec = "basicui";
-
- ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ValidatePackage(pkgid, {appid, exec}, params);
- TestParameters nonreadonly_params(params);
- nonreadonly_params.is_readonly = false;
- ValidatePackage(pkgid, {appid, exec}, nonreadonly_params);
-}
-
-TEST_F(PreloadSmokeTest, ReadonlyUpdateUninstallMode) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path path = kSmokePackagesDirectory / "ReadonlyUpdateUninstallMode.tpk";
- std::string pkgid = "smoketpk44";
- std::string appid = "smoketpk44.ReadonlyUpdateUninstallMode";
- std::string exec = "basicui";
-
- ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
- ci::PkgQueryInterface pkg_query1(pkgid, params.test_user.uid);
- PackageAttributes original(pkg_query1);
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ValidatePackage(pkgid, {appid, exec}, params);
- TestParameters nonreadonly_params(params);
- nonreadonly_params.is_readonly = false;
- ValidatePackage(pkgid, {appid, exec}, nonreadonly_params);
- ASSERT_EQ(backend.Uninstall(pkgid), ci::AppInstaller::Result::OK);
- ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
- PackageAttributes restored(pkg_query2);
- ASSERT_EQ(original, restored);
- ValidatePackage(pkgid, {appid, exec}, params);
-}
-
-TEST_F(SmokeTest, InstallExtended_Tpk) {
- ASSERT_TRUE(CheckAvailableExtendedPath());
- bf::path path = kSmokePackagesDirectory / "InstallExtended_Tpk.tpk";
- std::string pkgid = "smoketpk45";
- std::string appid = "smoketpk45.InstallExtendedTpk";
- std::string exec = "smoketpk45.InstallExtendedTpk";
- ASSERT_EQ(backend.InstallWithStorage(path, StorageType::EXTENDED),
- ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidateExtendedPackage(pkgid, {appid, exec}, params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_CrashAfterUnzip) {
- bf::path path = kSmokePackagesDirectory / "RecoveryMode_CrashAfterUnzip.tpk";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-i", path.string(), "-u", test_uid_str.c_str(),
- "-step_name", "Unzip");
- ASSERT_NE(backend_crash.Wait(), 0);
-
- std::string pkgid = "smokeapp47";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
- GetRecoverFileInfo(recovery_file);
- ASSERT_TRUE(recovery_info);
- ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
-}
-
-TEST_F(RollbackSmokeTest, UpdateMode_RollbackSharedDataUpdate) {
- bf::path path_old = kSmokePackagesDirectory / "UpdateMode_SharedData.tpk";
- bf::path path_new = kSmokePackagesDirectory / "UpdateMode_SharedData_2.tpk";
- std::string pkgid = "smoketpk.shareddata";
- std::string appid = "smoketpk.shareddata";
- std::string exec = "shareddata";
- ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::ERROR);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(CheckSharedDataExistance(pkgid, params));
-}
-
-TEST_F(RollbackSmokeTest, UpdateMode_RollbackNonSharedDataUpdate) {
- bf::path path_old = kSmokePackagesDirectory / "UpdateMode_NonSharedData.tpk";
- bf::path path_new =
- kSmokePackagesDirectory / "UpdateMode_NonSharedData_2.tpk";
- std::string pkgid = "smoketpk.non-shareddata";
- std::string appid = "smoketpk.non-shareddata";
- std::string exec = "shareddata";
- ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::ERROR);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(CheckSharedDataNonExistance(pkgid, params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_SharedDataUpdate) {
- bf::path path_old =
- kSmokePackagesDirectory / "RecoveryMode_SharedData.tpk";
- bf::path path_new =
- kSmokePackagesDirectory / "RecoveryMode_SharedData_2.tpk";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
- ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
- ASSERT_NE(backend_crash.Wait(), 0);
-
- std::string pkgid = "smoketpk.recovery-shareddata";
- std::string appid = "smoketpk.recovery-shareddata";
- std::string exec = "shareddata";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
- GetRecoverFileInfo(recovery_file);
- ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
-
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(CheckSharedDataExistance(pkgid, params));
- ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
-}
-
-TEST_F(SmokeTest, RecoveryMode_NonSharedDataUpdate) {
- bf::path path_old =
- kSmokePackagesDirectory / "RecoveryMode_NonSharedData.tpk";
- bf::path path_new =
- kSmokePackagesDirectory / "RecoveryMode_NonSharedData_2.tpk";
- RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
- ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
- ASSERT_NE(backend_crash.Wait(), 0);
-
- std::string pkgid = "smoketpk.recovery-non-shareddata";
- std::string appid = "smoketpk.recovery-non-shareddata";
- std::string exec = "shareddata";
- bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
- GetRecoverFileInfo(recovery_file);
- ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
-
- ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
- ASSERT_TRUE(CheckSharedDataNonExistance(pkgid, params));
- ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
-}
-
-} // namespace smoke_test
-
-int main(int argc, char** argv) {
- try {
- bool no_backup = false;
- BackupType backup_type = BackupType::MOVE;
-
- ci::RequestMode request_mode = st::ParseRequestMode(argc, argv);
- if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
- std::cout << "Skip tests for preload request" << std::endl;
- ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
- }
- testing::InitGoogleTest(&argc, argv);
-
- bpo::options_description options("Allowed options");
- bpo::variables_map opt_map;
- try {
- options.add_options()
- ("help", "display this help message")
- ("no-backup", "Do test without backup")
- ("backup-type", bpo::value<std::string>(), "<move|copy> set test's "
- "backup type \'move\', \'copy and remove\'");
- bpo::store(bpo::command_line_parser(argc, argv).
- options(options).allow_unregistered().run(), opt_map);
- if (opt_map.count("help")) {
- std::cerr << options << std::endl;
- return -1;
- }
-
- if (opt_map.count("no-backup"))
- no_backup = true;
- if (opt_map.count("backup-type")) {
- if (opt_map["backup-type"].as<std::string>() == "move") {
- backup_type = BackupType::MOVE;
- } else if (opt_map["backup-type"].as<std::string>() == "copy") {
- backup_type = BackupType::COPY_AND_REMOVE;
- } else {
- std::cerr << options << std::endl;
- return -1;
- }
- }
- bpo::notify(opt_map);
- } catch (...) {
- std::cerr << "Exception occurred: "
- << boost::current_exception_diagnostic_information()
- << std::endl;
- return -1;
- }
-
- ::env = static_cast<smoke_test::SmokeEnvironment*>(
- testing::AddGlobalTestEnvironment(
- new smoke_test::SmokeEnvironment(request_mode,
- no_backup, backup_type)));
-
- signal(SIGINT, ::signalHandler);
- signal(SIGSEGV, ::signalHandler);
- return RUN_ALL_TESTS();
- } catch (...) {
- std::cout << "Exception occurred during testing" << std::endl;
- return 1;
- }
-}
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include <common/pkgmgr_interface.h>
-#include <manifest_parser/utils/logging.h>
-
-#include "tpk/tpk_app_query_interface.h"
-#include "tpk/tpk_installer.h"
-#include "unit_tests/tpk_smoke_utils.h"
-
-namespace ci = common_installer;
-
-static int RunCrashTpkInstaller(ci::PkgMgrPtr pkgmgr,
- int index,
- std::string step_name,
- smoke_test::CrashStepType type) {
- smoke_test::CrashTpkInstaller t(pkgmgr, index, step_name, type);
-
- if (t.Run() != ci::AppInstaller::Result::OK) {
- LOG(ERROR) << "CrashTpkInstaller run failure";
- return -1;
- }
- return 0;
-}
-
-static int RunTpkInstallerWithoutParserPlugins(ci::PkgMgrPtr pkgmgr) {
- smoke_test::TpkInstallerWithoutPasrserPlugins t(pkgmgr);
-
- if (t.Run() != ci::AppInstaller::Result::OK) {
- LOG(ERROR) << "TpkInstallerWithoutPasrserPlugins run failure";
- return -1;
- }
- return 0;
-}
-
-// This version of backend will crash in the end
-// it is used for recovery testcase
-int main(const int argc, char* argv[]) {
- try {
- int index = -1;
- int backend_argc = argc;
- std::string step_name;
- bool remove_plugins = false;
- smoke_test::CrashStepType type = smoke_test::CrashStepType::PROCESS;
-
- if (!strcmp(argv[backend_argc-2], "-idx")) {
- index = atoi(argv[backend_argc-1]);
- backend_argc -= 2;
- LOG(DEBUG) << "Step crash after " << index << " step.";
- }
-
- if (!strcmp(argv[backend_argc-2], "-step_name")) {
- step_name = argv[backend_argc-1];
- backend_argc -= 2;
- LOG(DEBUG) << "Step crash after " << step_name << " step.";
- }
-
- if (!strcmp(argv[backend_argc-1], "-remove_plugin_steps")) {
- backend_argc--;
- remove_plugins = true;
- LOG(DEBUG) << "Remove parser plugins steps";
- }
-
- if (!strcmp(argv[backend_argc-1], "-type_clean")) {
- backend_argc--;
- type = smoke_test::CrashStepType::CLEAN;
- LOG(DEBUG) << "step will be crashed in clean operation";
- }
-
- ci::PkgmgrInstaller pkgmgr_installer;
- tpk::TpkAppQueryInterface interface;
- ci::PkgMgrPtr pkgmgr = ci::PkgMgrInterface::Create(backend_argc, argv,
- &pkgmgr_installer,
- &interface);
- if (!pkgmgr) {
- LOG(ERROR) << "Failed to create pkgmgr interface";
- return -1;
- }
-
- if (remove_plugins)
- return RunTpkInstallerWithoutParserPlugins(pkgmgr);
- else
- return RunCrashTpkInstaller(pkgmgr, index, step_name, type);
- } catch (...) {
- std::cout << "Exception occurred during testing" << std::endl;
- return 1;
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <privileges>
- <appdefined-privilege>http://package2id/appdefined/test.read</appdefined-privilege>
- </privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <privileges>
- <appdefined-privilege>package0id/appdefined/test.read</appdefined-privilege>
- </privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <privileges>
- <appdefined-privilege>http://package0id/appdefined/longnameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.read</appdefined-privilege>
- </privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <privileges>
- <appdefined-privilege>http://package0id/appdefined/test.read</appdefined-privilege>
- <appdefined-privilege>http://package0id/appdefined/test.write</appdefined-privilege>
- </privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <privileges>
- <appdefined-privilege>http://package0id/appdefined/test.read</appdefined-privilege>
- </privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <privileges>
- <appdefined-privilege license="res/cert">http://package0id/appdefined/test.read</appdefined-privilege>
- <appdefined-privilege license="res/cert">http://package0id/appdefined/test.write</appdefined-privilege>
- </privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <privileges>
- <appdefined-privilege license="res/cert">http://package0id/appdefined/test.read</appdefined-privilege>
- </privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <author href="http://site.domain.com" email="invalid@email.">Author</author>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <author href="http://site.domain.com" email="valid@email.com">Author</author>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <description xml:lang="non-existing-locale">text</description>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <description xml:lang="en-GB">text</description>
- <description>text2</description>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <description xml:lang="en-GB"></description>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <description xml:lang="en-GB">text</description>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3a" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" install-location="auto">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" install-location="internal-only">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" install-location="invalid">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" install-location="prefer-external">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<widget xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</widget>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="packag/e0id" version="1.0.0">
- <ui-application appid="packag/e0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" type="invalid">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" type="rpm">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" type="tpk">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" type="wgt">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.256.3">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.2.3">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <privileges>
- <privilege>http://tizen.org/privilege/application.admin</privilege>
- <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
- <privilege>http://tizen.org/privilege/account.read</privilege>
- </privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <privileges></privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <privileges>
- <privilege>http://tizen.org/privilege/application.admin</privilege>
- </privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <profile>text</profile>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <profile name="mobile" />
- <profile name="wearable" />
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <profile name="mobile" />
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <provides-appdefined-privileges>
- <appdefined-privilege>http://package2id/appdefined/test.read</appdefined-privilege>
- </provides-appdefined-privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <provides-appdefined-privileges>
- <appdefined-privilege>package0id/appdefined/test.read</appdefined-privilege>
- </provides-appdefined-privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <provides-appdefined-privileges>
- <appdefined-privilege>http://package0id/appdefined/longnameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.read</appdefined-privilege>
- </provides-appdefined-privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <provides-appdefined-privileges>
- <appdefined-privilege>http://package0id/appdefined/test.read</appdefined-privilege>
- <appdefined-privilege>http://package0id/appdefined/test.write</appdefined-privilege>
- </provides-appdefined-privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <provides-appdefined-privileges></provides-appdefined-privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <provides-appdefined-privileges>
- <appdefined-privilege>http://package0id/appdefined/test.read</appdefined-privilege>
- </provides-appdefined-privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <provides-appdefined-privileges>
- <appdefined-privilege license="res/cert">http://package0id/appdefined/test.read</appdefined-privilege>
- <appdefined-privilege license="res/cert">http://package0id/appdefined/test.write</appdefined-privilege>
- </provides-appdefined-privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
- <provides-appdefined-privileges>
- <appdefined-privilege license="res/cert">http://package0id/appdefined/test.read</appdefined-privilege>
- </provides-appdefined-privileges>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose1" />
- <operation name="http://tizen.org/appcontrol/operation/compose2" />
- <uri name="scheme1://" />
- <uri name="scheme2://" />
- <mime name="application/pdf" />
- <mime name="application/text" />
- </app-control>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose1" />
- <operation name="http://tizen.org/appcontrol/operation/compose2" />
- <uri name="scheme1://" />
- <uri name="scheme2://" />
- </app-control>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose1" />
- <operation name="http://tizen.org/appcontrol/operation/compose2" />
- <mime name="application/pdf" />
- <mime name="application/text" />
- </app-control>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose" />
- <uri name="scheme://" />
- <mime name="application/pdf" />
- </app-control>
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose2" />
- <uri name="scheme2://" />
- <mime name="application/text" />
- </app-control>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose" />
- <uri name="scheme://" />
- <mime />
- </app-control>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation />
- <uri name="scheme://" />
- <mime name="application/pdf" />
- </app-control>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="invalid" />
- <uri name="scheme://" />
- <mime name="application/pdf" />
- </app-control>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <uri name="scheme://" />
- <mime name="application/pdf" />
- </app-control>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose" />
- <uri name="scheme://" />
- </app-control>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose" />
- <mime name="application/pdf" />
- </app-control>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose" />
- <uri />
- <mime name="application/pdf" />
- </app-control>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose" />
- <uri name="scheme://" />
- <mime name="application/pdf" />
- </app-control>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package/id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp" auto-restart="false">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp" auto-restart="invalid">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp" auto-restart="true">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <background-category />
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <background-category value="bgcategory1" />
- <background-category value="bgcategory2" />
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <background-category value="bgcategory" />
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <datacontrol providerid="providerid1" access="access1" type="type1" />
- <datacontrol providerid="providerid2" access="access2" type="type2" />
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <datacontrol providerid="providerid" access="access" type="type" />
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <icon />
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <icon>test_icon.png</icon>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <label xml:lang="invalid">label</label>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <label>label</label>
- <label xml:lang="en-GB">label_GB</label>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <label>label</label>
- <label xml:lang="en-GB">label_GB</label>
- <label xml:lang="en-US"></label>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <label></label>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <label>label</label>
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <metadata value="value" />
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <metadata key="key1" value="value1" />
- <metadata key="key2" />
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- <metadata key="key" value="value" />
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp" multiple="false">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp" multiple="invalid">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp" multiple="true">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp" on-boot="false">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp" on-boot="invalid">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp" on-boot="true">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp" taskmanage="false">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp" taskmanage="invalid">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp" taskmanage="true">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="webapp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose1" />
- <operation name="http://tizen.org/appcontrol/operation/compose2" />
- <uri name="scheme1://" />
- <uri name="scheme2://" />
- <mime name="application/pdf" />
- <mime name="application/text" />
- </app-control>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose1" />
- <operation name="http://tizen.org/appcontrol/operation/compose2" />
- <uri name="scheme1://" />
- <uri name="scheme2://" />
- </app-control>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose1" />
- <operation name="http://tizen.org/appcontrol/operation/compose2" />
- <mime name="application/pdf" />
- <mime name="application/text" />
- </app-control>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose" />
- <uri name="scheme://" />
- <mime name="application/pdf" />
- </app-control>
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose2" />
- <uri name="scheme2://" />
- <mime name="application/text" />
- </app-control>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose" />
- <uri name="scheme://" />
- <mime />
- </app-control>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation />
- <uri name="scheme://" />
- <mime name="application/pdf" />
- </app-control>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="invalid" />
- <uri name="scheme://" />
- <mime name="application/pdf" />
- </app-control>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <uri name="scheme://" />
- <mime name="application/pdf" />
- </app-control>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose" />
- <uri name="scheme://" />
- </app-control>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose" />
- <mime name="application/pdf" />
- </app-control>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose" />
- <uri />
- <mime name="application/pdf" />
- </app-control>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/compose" />
- <uri name="scheme://" />
- <mime name="application/pdf" />
- </app-control>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package/id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <background-category />
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <background-category value="bgcategory1" />
- <background-category value="bgcategory2" />
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <background-category value="bgcategory" />
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <datacontrol providerid="providerid1" access="access1" type="type1" />
- <datacontrol providerid="providerid2" access="access2" type="type2" />
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <datacontrol providerid="providerid" access="access" type="type" />
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" hw-acceleration="default">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" hw-acceleration="off">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" hw-acceleration="on">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <icon />
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <icon>test_icon.png</icon>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <label xml:lang="invalid">label</label>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <label>label</label>
- <label xml:lang="en-GB">label_GB</label>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <label>label</label>
- <label xml:lang="en-GB">label_GB</label>
- <label xml:lang="en-US"></label>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <label></label>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <label>label</label>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" launch_mode="caller">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" launch_mode="group">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" launch_mode="invalid">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" launch_mode="single">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <metadata value="value" />
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <metadata key="key1" value="value1" />
- <metadata key="key2" />
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <metadata key="key" value="value" />
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <service-application appid="package0id.appid" exec="testapp" type="capp">
- </service-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" multiple="false">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" multiple="invalid">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" multiple="true">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" nodisplay="false">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" nodisplay="invalid">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" nodisplay="true">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="5.5" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- <splash-screens>
- <splash-screen src="test1.jpg" type="img" dpi="hdpi" orientation="landscape" app-control-operation="http://tizen.org/appcontrol/operation/default" />
- <splash-screen src="test1.jpg" type="img" dpi="hdpi" orientation="landscape" app-control-operation="http://tizen.org/appcontrol/operation/default" />
- <splash-screen src="test1.jpg" type="img" dpi="hdpi" orientation="landscape" app-control-operation="http://tizen.org/appcontrol/operation/test_operation" />
- </splash-screens>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" taskmanage="false">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" taskmanage="invalid">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp" taskmanage="true">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="webapp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <ui-application appid="package0id.appid" exec="testapp" type="capp">
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package0id.appid" exec="testapp" type="capp" ambient-support="false">
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package0id.appid" exec="testapp" type="capp" ambient-support="invalid">
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package0id.appid" exec="testapp" type="capp">
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package0id.appid" exec="testapp" type="capp" ambient-support="true">
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package/id.appid" exec="testapp" type="capp">
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application exec="testapp" type="capp">
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package0id.appid" exec="testapp" type="capp">
- <icon />
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package0id.appid" exec="testapp" type="capp">
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package0id.appid" exec="testapp" type="capp">
- <icon>test_icon.png</icon>
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package0id.appid" exec="testapp" type="capp">
- <label></label>
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package0id.appid" exec="testapp" type="capp">
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package0id.appid" exec="testapp" type="capp">
- <label>label</label>
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package0id.appid" exec="testapp" type="capp">
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <watch-application appid="package0id.appid" exec="testapp" type="capp">
- </watch-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application appid="package/id.appid" exec="testapp" type="capp">
- </widget-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application exec="testapp" type="capp">
- </widget-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application appid="package0id.appid" exec="testapp" type="capp">
- <icon />
- </widget-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application appid="package0id.appid" exec="testapp" type="capp">
- </widget-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application appid="package0id.appid" exec="testapp" type="capp">
- <icon>test_icon.png</icon>
- </widget-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application appid="package0id.appid" exec="testapp" type="capp">
- <label xml:lang="invalid">label</label>
- </widget-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application appid="package0id.appid" exec="testapp" type="capp">
- <label>label</label>
- <label xml:lang="en-GB">label_GB</label>
- </widget-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application appid="package0id.appid" exec="testapp" type="capp">
- <label>label</label>
- <label xml:lang="en-GB">label_GB</label>
- <label xml:lang="en-US"></label>
- </widget-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application appid="package0id.appid" exec="testapp" type="capp">
- </widget-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application appid="package0id.appid" exec="testapp" type="capp">
- <label></label>
- </widget-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application appid="package0id.appid" exec="testapp" type="capp">
- <label>label</label>
- </widget-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application appid="package0id.appid" exec="testapp" type="capp">
- </widget-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
- <widget-application appid="package0id.appid" exec="testapp" type="capp">
- </widget-application>
-</manifest>
+++ /dev/null
-<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
-<SignedInfo>
-<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
-<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
-<Reference URI="bin%2Fbasicui">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>Yrs3GkHAMzZGL7qmFGAF7sdXg6shvOtthBSb/Hjzfjw=</DigestValue>
-</Reference>
-<Reference URI="shared%2Fres%2Fbasicui.png">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
-</Reference>
-<Reference URI="tizen-manifest.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>vQ+rOr8hWb4TVBijWblCSAB+8eePv+QyN6wNXzvJgSE=</DigestValue>
-</Reference>
-<Reference URI="#prop">
-<Transforms>
-<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
-</Transforms>
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
-</Reference>
-</SignedInfo>
-<SignatureValue>
-ATfZj/k87yYSeapRBX0sMZ5tO6jMQDj4EWCCTLtj5cf+N1s8WCbl4sST53hWdTf+JgvAzTpF6x+t
-LcwC9zQZxfYTzHu0KqyKJy6uXj6tiB85SSlYhejOtDogxvGFCnRo6RZioYzF4SDtxha9NkYyh1PF
-L0UpraclVNYVc1MMfYY=
-</SignatureValue>
-<KeyInfo>
-<X509Data>
-<X509Certificate>
-MIICnDCCAYSgAwIBAgIGAVvS9uY8MA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz
-c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2
-ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBgxFjAUBgNVBAMMDUFw
-cF9pbnN0YWxsZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIKgQLsl5UIJdfdaDXbY+aQ6
-VHjwTPv5+aUlF1l6G9SDZ7tmJTCO1yAudmMr6vEN+ZL/bbOEAlyhkJPTmntPesO1h/WzjIlpFzTO
-UcHlEXAu1vZGTnPBoYTutBeVmbH9JY/dCSm2xFSioKaWHl+uMn0SB1DcvgIVSs4DkvO0F1+TAgMB
-AAGjMjAwMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMDMA0G
-CSqGSIb3DQEBBQUAA4IBAQBwNrj9b7/g4JI9K3wohRLHW5IpxOwBO9gUlkotSUNaiAvNwsQfB5pE
-k+rTUa4Nwxcq6rFfne1brXP1vbl/bVGW/WJqV6dF3BL1QfwGif0vvcO1Sz2QOpoc/Jtt8zlmsRne
-TIEMph6kDUT1oNUlTCGnxD24WagRxuGUe/RZ6L4y+6T8L+fBDtMyyM+GytqE72V+0KeyITJMTdzM
-wRMjN3XccXemcox73isLxSXlgwrFbotkTyYPTFphiZCRU7BlA3EClIk+3To0b3irROY/iIlg6ZyY
-gNbND9/aIJxqPqCghW7PMjGH/9KK2mtNhtJSFrIAvvUiW/fMrNj1opsAHGgJ
-</X509Certificate>
-<X509Certificate>
-MIIDOTCCAiGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRowGAYDVQQKDBFUaXplbiBBc3NvY2lh
-dGlvbjEaMBgGA1UECwwRVGl6ZW4gQXNzb2NpYXRpb24xHjAcBgNVBAMMFVRpemVuIERldmVsb3Bl
-cnMgUm9vdDAeFw0xMjAxMDEwMDAwMDBaFw0yNzAxMDEwMDAwMDBaMFYxGjAYBgNVBAoMEVRpemVu
-IEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4g
-RGV2ZWxvcGVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVGhRGmMIUyBA7o
-PCz8Sxut6z6HNkF4oDIuzuKaMzRYPeWodwe9O0gmqAkToQHfwg2giRhE5GoPld0fq+OYMMwSasCu
-g8dwODx1eDeSYVuOLWRxpAmbTXOsSFi6VoWeyaPEm18JBHvZBsU5YQtgZ6Kp7MqzvQg3pXOxtajj
-vyHxiatJl+xXrHgcXC1wgyG3buty7u/Fi2mvKXJ0PRJcCjjK81dqe/Vr20sRUCrbk02zbm5ggFt/
-jIEhV8wbFRQpliobc7J4dSTKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE
-dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
-AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH
-95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04
-1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M
-+OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
-W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
-</X509Certificate>
-</X509Data>
-</KeyInfo>
-<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
-</Signature>
\ No newline at end of file
+++ /dev/null
-Needed, because empty directories are skipped when copying, and directory structure will be invalid.
+++ /dev/null
-Needed, because empty directories are skipped when copying, and directory structure will be invalid.
+++ /dev/null
-<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
-<SignedInfo>
-<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
-<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
-<Reference URI="author-signature.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>anhYz6XCClJebTJ+qamYS8R0Rk4xDr7LKqaWzyxvj0I=</DigestValue>
-</Reference>
-<Reference URI="bin%2Fbasicui">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>Yrs3GkHAMzZGL7qmFGAF7sdXg6shvOtthBSb/Hjzfjw=</DigestValue>
-</Reference>
-<Reference URI="shared%2Fres%2Fbasicui.png">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
-</Reference>
-<Reference URI="tizen-manifest.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>vQ+rOr8hWb4TVBijWblCSAB+8eePv+QyN6wNXzvJgSE=</DigestValue>
-</Reference>
-<Reference URI="#prop">
-<Transforms>
-<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
-</Transforms>
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
-</Reference>
-</SignedInfo>
-<SignatureValue>
-NTEUK1tZpBTxjgfGxbwc1bZr8kAG8dc2+hx2xzUFxZUgIWwIIy/SdKy7VGUCAH3y/HApfaNBL1SL
-RnGoQ/R3L/eQvQnzq/iTpZcCSpYnnvH9fJHAmgSod5XgH9IS+QKU/fzJ1rhlMBMD8oGxrDa4JrQJ
-65+mUCgDS7LZUp6olx8=
-</SignatureValue>
-<KeyInfo>
-<X509Data>
-<X509Certificate>
-MIICnTCCAgYCCQDE9MbMmJ/yCzANBgkqhkiG9w0BAQUFADCBkDELMAkGA1UEBhMCS1IxDjAMBgNV
-BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE
-CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTElMCMGA1UEAwwcVGl6ZW4gUGFydG5lciBEaXN0
-cmlidXRvciBDQTAeFw0xMjEwMjcwNzQ4MzNaFw0yMjEwMjUwNzQ4MzNaMIGUMQswCQYDVQQGEwJL
-UjEOMAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENB
-MSIwIAYDVQQLDBlUaXplbiBEaXN0cmlidXRvciBUZXN0IENBMSkwJwYDVQQDDCBUaXplbiBQYXJ0
-bmVyIERpc3RyaWJ1dG9yIFNpZ25lcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAy9mg2x4B
-zxlK3LJL81GsLq/pJfK1evdCKG/IOBpdoRO0rLhYnsL5+KvToPFa5g9GTZo32LikpW1NZ7++3EHE
-fnO2IGLUau4kquvhmz1LNg5xBTx7IbucmwLMRGo1BPGdsAQQLyXeQKJ5PCERmVg4MIoiL2zT/JsL
-sZ9UPT6GEB8CAwEAATANBgkqhkiG9w0BAQUFAAOBgQAw5xPBFR1XKuZ8QpsCtSE0zXVHvwIa+Ha4
-YBdRtGwEoZmiKGZV/wAhPRdmR0kISkTz20kIGz/ZwRZCVGhsr5hkkpFknYlKeKkEJ/tJfZl4D7ec
-GFAnynOzlWZqSIPz+yxX8ah9E6lTv4Vs9DhNb08nxVvxLqlpyVdk9RUsCx/yIA==
-</X509Certificate>
-<X509Certificate>
-MIICtTCCAh6gAwIBAgIJAKORBcIiXygIMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYDVQQGEwJLUjEO
-MAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENBMSIw
-IAYDVQQLDBlUaXplbiBEaXN0cmlidXRvciBUZXN0IENBMSowKAYDVQQDDCFUaXplbiBQYXJ0bmVy
-IERpc3RyaWJ1dG9yIFJvb3QgQ0EwHhcNMTIxMDI3MDc0NTIwWhcNMjIxMDI1MDc0NTIwWjCBkDEL
-MAkGA1UEBhMCS1IxDjAMBgNVBAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6
-ZW4gVGVzdCBDQTEiMCAGA1UECwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTElMCMGA1UEAwwc
-VGl6ZW4gUGFydG5lciBEaXN0cmlidXRvciBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-2ZQrdEowjqxUmB8FX8ej19VKY6jGHKNIRE5wrhBkuZ1b0FLRPiN3/Cl9wMkCnyJui4QhC28g1aBg
-w/JnaObcDqW1NgFVH3006+gZvCTDlw1nIEjvZa6P+uWOOi05xPPAE0feKPkO1POnOjnapfkkEVNU
-8TXsLbLYBylWT8rxZC8CAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBJ
-yJ7p6qs0JI+1iKOk/sYWVP6dMueY72qOc/wVj5c3ejOlgJNNXDMAQ14QcRRexffc68ipTwybU/3m
-tcNwydzKJe+GFa4b2zyKOvOgrfs4MKSR0T9XEPmTKeR+NDT2CbA6/kQoRYm0fSORzD2UXJzNZWe/
-WjwSA66hv4q+0QZQFQ==
-</X509Certificate>
-</X509Data>
-</KeyInfo>
-<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
-</Signature>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="smoketpk41" version="1.0.0">
- <profile name="mobile" />
- <ui-application appid="smoketpk41.ManifestDirectInstallMode" exec="basicui" type="capp" multiple="false" taskmanage="true" nodisplay="false" launch_mode="single">
- <icon>basicui.png</icon>
- <label>basicui</label>
- </ui-application>
-</manifest>
+++ /dev/null
-#add
-ADDED
-#modify
-MODIFIED
-#delete
-DELETED
+++ /dev/null
-<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
-<SignedInfo>
-<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
-<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
-<Reference URI="DELETED">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>4W8VliAYUP1KY2gLJ/YDy2TmcXYVm+PY7XikQD/bFwA=</DigestValue>
-</Reference>
-<Reference URI="MODIFIED">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>m76Dq+1hU8YC3/kYBle8rJLovpCFYy3/HQCUS74IeSY=</DigestValue>
-</Reference>
-<Reference URI="bin%2Fnative">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>ZmAZCVzbwHUNfKaJi3rtgc6aF+/+Qk4MoetKx2sXEsI=</DigestValue>
-</Reference>
-<Reference URI="shared%2Fres%2Fnative.png">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
-</Reference>
-<Reference URI="tizen-manifest.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>SY77G0wHiFZyXUI2qoDEbKCfT2LP1V8D+qS4ec17yWM=</DigestValue>
-</Reference>
-<Reference URI="#prop">
-<Transforms>
-<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
-</Transforms>
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
-</Reference>
-</SignedInfo>
-<SignatureValue>
-C69U/+6mOukXlqpfx1KRXm8hPJ6+CAuQJBrR0thQemMBaAwt6Jzk1zgDJt+AYlenNamj24HqoULa
-sl7Cibfp+FU/zeNC587JPQT/GRaErr4ifgGLDpJ41BNr62ODeMbiBgct8eX0igWl622VqZUSy1YD
-SWKKkwN7OeoCUv4fKgQ=
-</SignatureValue>
-<KeyInfo>
-<X509Data>
-<X509Certificate>
-MIIClTCCAX2gAwIBAgIGAVSVy18QMA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz
-c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2
-ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBExDzANBgNVBAMMBmF1
-dGhvcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArRGCnZnlc9C4Gl1ywl02AajwD/UO249R
-AZHgI3IPGhbzo2XT7gWDJvh1AqS8v6lKvMwkwRoEq7kXK9oJ3u4blP+K0pAj6cLXR9kHdfY0/ZaT
-ficImTEgFxSKFHLGvsDX2S3QmeHS3y4pvmLdFr+fqsvBIDz+SISMvJ8Vlemm7PkCAwEAAaMyMDAw
-DAYDVR0TAQH/BAIwADALBgNVHQ8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwMwDQYJKoZIhvcN
-AQEFBQADggEBAAoIjlzjeo0hdBxhJdrTZZG29KzpBDAXEKn9JvGqAhH5UdKxnqXDn5jt+Yode2a4
-/lQq9jFnzPCr7e+uBAnpOcH/sf3sKVI1J+Ssxo4j3tOwL74wNLUSONvXrfGFtLboof5d/JdnffME
-WLQTgd95k3OTQzZSLYrR9tXgpnBgDBaZpnnE7XKiAEZ1IetexkD6f78gDe/yucYO3VESzsrenLaQ
-MPcTF5kzi3QZGKJDMGhzC88bKDP96ZvhY+LOAUg3WNAk8Uyqpef6GuKSBZXXURN9EJErU2KoCMkx
-hQmjVgQRwHdLy5iCWMgkWr5LEUMJocOG4DozrZ5XWBPiKSoYcNc=
-</X509Certificate>
-<X509Certificate>
-MIIDOTCCAiGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRowGAYDVQQKDBFUaXplbiBBc3NvY2lh
-dGlvbjEaMBgGA1UECwwRVGl6ZW4gQXNzb2NpYXRpb24xHjAcBgNVBAMMFVRpemVuIERldmVsb3Bl
-cnMgUm9vdDAeFw0xMjAxMDEwMDAwMDBaFw0yNzAxMDEwMDAwMDBaMFYxGjAYBgNVBAoMEVRpemVu
-IEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4g
-RGV2ZWxvcGVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVGhRGmMIUyBA7o
-PCz8Sxut6z6HNkF4oDIuzuKaMzRYPeWodwe9O0gmqAkToQHfwg2giRhE5GoPld0fq+OYMMwSasCu
-g8dwODx1eDeSYVuOLWRxpAmbTXOsSFi6VoWeyaPEm18JBHvZBsU5YQtgZ6Kp7MqzvQg3pXOxtajj
-vyHxiatJl+xXrHgcXC1wgyG3buty7u/Fi2mvKXJ0PRJcCjjK81dqe/Vr20sRUCrbk02zbm5ggFt/
-jIEhV8wbFRQpliobc7J4dSTKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE
-dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
-AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH
-95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04
-1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M
-+OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
-W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
-</X509Certificate>
-</X509Data>
-</KeyInfo>
-<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
-</Signature>
\ No newline at end of file
+++ /dev/null
-<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
-<SignedInfo>
-<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
-<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
-<Reference URI="DELETED">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>4W8VliAYUP1KY2gLJ/YDy2TmcXYVm+PY7XikQD/bFwA=</DigestValue>
-</Reference>
-<Reference URI="MODIFIED">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>m76Dq+1hU8YC3/kYBle8rJLovpCFYy3/HQCUS74IeSY=</DigestValue>
-</Reference>
-<Reference URI="author-signature.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>p2OKn1M4try6sjsAi7//u2Og5vg1yrPQ7biD4FOHnK4=</DigestValue>
-</Reference>
-<Reference URI="bin%2Fnative">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>ZmAZCVzbwHUNfKaJi3rtgc6aF+/+Qk4MoetKx2sXEsI=</DigestValue>
-</Reference>
-<Reference URI="shared%2Fres%2Fnative.png">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
-</Reference>
-<Reference URI="tizen-manifest.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>SY77G0wHiFZyXUI2qoDEbKCfT2LP1V8D+qS4ec17yWM=</DigestValue>
-</Reference>
-<Reference URI="#prop">
-<Transforms>
-<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
-</Transforms>
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
-</Reference>
-</SignedInfo>
-<SignatureValue>
-CgAdWvIj11sAxwLplwiC6UHnM2AFSqcr2tBFoLO3BRKEpCwwC1tsCG9gwQTT4BDWjMUG7f93C6kC
-KyLV689eeZf5e4yk9yfvAu30kLpIXYF5fOMfmMP6LuLYOomf2u84wY9s51hzwMyL5lz2PgrQda6T
-fIxSAXcOtC2vxGWsSa4=
-</SignatureValue>
-<KeyInfo>
-<X509Data>
-<X509Certificate>
-MIICmzCCAgQCCQDXI7WLdVZwiTANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCS1IxDjAMBgNV
-BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE
-CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwbVGl6ZW4gUHVibGljIERpc3Ry
-aWJ1dG9yIENBMB4XDTEyMTAyOTEzMDMwNFoXDTIyMTAyNzEzMDMwNFowgZMxCzAJBgNVBAYTAktS
-MQ4wDAYDVQQIDAVTdXdvbjEOMAwGA1UEBwwFU3V3b24xFjAUBgNVBAoMDVRpemVuIFRlc3QgQ0Ex
-IjAgBgNVBAsMGVRpemVuIERpc3RyaWJ1dG9yIFRlc3QgQ0ExKDAmBgNVBAMMH1RpemVuIFB1Ymxp
-YyBEaXN0cmlidXRvciBTaWduZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALtMvlc5hENK
-90ZdA+y66+Sy0enD1gpZDBh5T9RP0oRsptJv5jjNTseQbQi0SZOdOXb6J7iQdlBCtR343RpIEz8H
-mrBy7mSY7mgwoU4EPpp4CTSUeAuKcmvrNOngTp5Hv7Ngf02TTHOLK3hZLpGayaDviyNZB5PdqQdB
-hokKjzAzAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAvGp1gxxAIlFfhJH1efjb9BJK/rtRkbYn9+Ez
-GEbEULg1svsgnyWisFimI3uFvgI/swzr1eKVY3Sc8MQ3+Fdy3EkbDZ2+WAubhcEkorTWjzWz2fL1
-vKaYjeIsuEX6TVRUugHWudPzcEuQRLQf8ibZWjbQdBmpeQYBMg5x+xKLCJc=
-</X509Certificate>
-<X509Certificate>
-MIICtDCCAh2gAwIBAgIJAMDbehElPNKvMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYDVQQGEwJLUjEO
-MAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENBMSMw
-IQYDVQQLDBpUVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEpMCcGA1UEAwwgVGl6ZW4gUHVibGlj
-IERpc3RyaWJ1dG9yIFJvb3QgQ0EwHhcNMTIxMDI5MTMwMjUwWhcNMjIxMDI3MTMwMjUwWjCBjzEL
-MAkGA1UEBhMCS1IxDjAMBgNVBAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6
-ZW4gVGVzdCBDQTEiMCAGA1UECwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwb
-VGl6ZW4gUHVibGljIERpc3RyaWJ1dG9yIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDe
-OTS/3nXvkDEmsFCJIvRlQ3RKDcxdWJJp625pFqHdmoJBdV+x6jl1raGK2Y1sp2Gdvpjc/z92yzAp
-bE/UVLPh/tRNZPeGhzU4ejDDm7kzdr2f7Ia0U98K+OoY12ucwg7TYNItj9is7Cj4blGfuMDzd2ah
-2AgnCGlwNwV/pv+uVQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBACqJ
-KO33YdoGudwanZIxMdXuxnnD9R6u72ltKk1S4zPfMJJv482CRGCI4FK6djhlsI4i0Lt1SVIJEed+
-yc3qckGm19dW+4xdlkekon7pViEBWuyHw8OWv3RXtTum1+PGHjBJ2eYY4ZKIpz73U/1NC16sTB/0
-VhfnkHwPltmrpYVe
-</X509Certificate>
-</X509Data>
-</KeyInfo>
-<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
-</Signature>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="smokeapp25" version="1.0.0">
- <profile name="mobile"/>
- <ui-application appid="smokeapp25.ReinstallModeTpk" exec="native" multiple="false" nodisplay="false" taskmanage="true" type="capp">
- <label>native</label>
- <icon>native.png</icon>
- </ui-application>
-</manifest>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="org.tizen.testapp" version="1.0.0">
- <author email="tester@samsung.com" href="www.tizen.org">tester</author>
- <description>This is default description</description>
- <description xml:lang="en-us">This is test description</description>
- <ui-application appid="org.tizen.testapp" exec="testapp" multiple="false" nodisplay="false" taskmanage="true" type="capp">
- <label>testapp</label>
- <label xml:lang="en-us">Test</label>
- <icon>testapp.png</icon>
- <app-control>
- <mime name="EditMime"/>
- <operation name="http://tizen.org/appcontrol/operation/edit"/>
- <uri name="EditUri"/>
- </app-control>
- <app-control>
- <operation name="http://tizen.org/appcontrol/operation/view"/>
- <uri name="ViewUri"/>
- <mime name="ViewMime"/>
- </app-control>
- <metadata key="metakey1" value="metaval1"/>
- <metadata key="metakey2" value="metaval2"/>
- <datacontrol access="ReadOnly" providerid="http://testapp.com/datacontrol/provider/testapp" type="Sql"/>
- <datacontrol access="ReadOnly" providerid="http://testapp.com/datacontrol/provider/testapp" type="Map"/>
- </ui-application>
- <account>
- <account-provider appid="org.tizen.testapp" multiple-accounts-support="false" providerid="com.samsung">
- <icon section="account">testapp.png</icon>
- <icon section="account-small">testapp.png</icon>
- <label xml:lang="en-gb">account icon</label>
- <label>Samsung</label>
- <capability>http://tizen.org/account/capability/calendar</capability>
- <capability>http://tizen.org/account/capability/photo</capability>
- </account-provider>
- </account>
- <privileges>
- <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
- <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
- </privileges>
- <feature name="http://tizen.org/feature/camera.front.flash">true</feature>
- <feature name="http://tizen.org/feature/camera">true</feature>
- <feature name="http://tizen.org/feature/camera.back.flash">true</feature>
- <feature name="http://tizen.org/feature/camera.front">true</feature>
-</manifest>
+++ /dev/null
-// Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include "unit_tests/tpk_smoke_utils.h"
-
-#include <unit_tests/common/smoke_utils.h>
-
-#include <string>
-#include <utility>
-
-#include "tpk/tpk_installer.h"
-
-namespace ci = common_installer;
-namespace st = smoke_test;
-
-namespace smoke_test {
-
-const bf::path kSmokePackagesDirectory =
- "/usr/share/tpk-installer-ut/test_samples/smoke/";
-
-bool ValidatePackage(const std::string& pkgid,
- const std::pair<std::string, std::string>& app,
- const TestParameters& params) {
- return ValidatePackage(pkgid, Apps{ app }, params);
-}
-
-bool ValidateExternalPackage(const std::string& pkgid,
- const std::pair<std::string, std::string>& app,
- const TestParameters& params) {
- return ValidateExternalPackage(pkgid, Apps{ app }, params);
-}
-
-bool ValidateExtendedPackage(const std::string& pkgid,
- const std::pair<std::string, std::string>& app,
- const TestParameters& params) {
- return ValidateExtendedPackage(pkgid, Apps{ app }, params);
-}
-
-TpkBackendInterface::AppQueryInterfacePtr
-TpkBackendInterface::CreateQueryInterface() const {
- return AppQueryInterfacePtr(new tpk::TpkAppQueryInterface());
-}
-
-TpkBackendInterface::AppInstallerPtr
-TpkBackendInterface::CreateInstaller(
- ci::PkgMgrPtr pkgmgr) const {
- return AppInstallerPtr(new tpk::TpkInstaller(pkgmgr));
-}
-
-TpkBackendInterface::AppInstallerPtr
-TpkBackendInterface::CreateFailExpectedInstaller(
- ci::PkgMgrPtr pkgmgr, int fail_at) const {
- return AppInstallerPtr(new FailExpectedTpkInstaller(pkgmgr, fail_at));
-}
-
-TpkBackendInterface::CommandResult
-TpkBackendInterface::InstallWithTEP(
- const bf::path& path, const bf::path& tep) const {
- const char* argv[] = {"", "-i", path.c_str(), "-u", uid_str_.c_str(),
- "-e", tep.c_str()};
- return CallBackend(SIZEOFARRAY(argv), argv);
-}
-
-TpkBackendInterface::CommandResult
-TpkBackendInterface::MountInstallWithTEP(
- const bf::path& path, const bf::path& tep) const {
- const char* argv[] = {"", "-w", path.c_str(), "-u", uid_str_.c_str(),
- "-e", tep.c_str()};
- return CallBackend(SIZEOFARRAY(argv), argv);
-}
-
-TpkBackendInterface::CommandResult
-TpkBackendInterface::InstallSuccessWithTEP(
- const bf::path& path, const bf::path& tep) const {
- RequestResult tmp_mode = mode_;
- RequestResult &original_mode = const_cast<RequestResult&>(mode_);
- original_mode = RequestResult::NORMAL;
- if (InstallWithTEP(path, tep) != BackendInterface::CommandResult::OK) {
- LOG(ERROR) << "Failed to install application with tep. Cannot update";
- return BackendInterface::CommandResult::UNKNOWN;
- }
- original_mode = tmp_mode;
- return BackendInterface::CommandResult::OK;
-}
-
-TpkBackendInterface::CommandResult
-TpkBackendInterface::MountInstallSuccessWithTEP(
- const bf::path& path, const bf::path& tep) const {
- RequestResult tmp_mode = mode_;
- RequestResult &original_mode = const_cast<RequestResult&>(mode_);
- original_mode = RequestResult::NORMAL;
- if (MountInstallWithTEP(path, tep) != BackendInterface::CommandResult::OK) {
- LOG(ERROR) << "Failed to mount install application with tep. Cannot update";
- return BackendInterface::CommandResult::UNKNOWN;
- }
- original_mode = tmp_mode;
- return BackendInterface::CommandResult::OK;
-}
-
-} // namespace smoke_test
+++ /dev/null
-// Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#ifndef UNIT_TESTS_TPK_SMOKE_UTILS_H_
-#define UNIT_TESTS_TPK_SMOKE_UTILS_H_
-
-#include <common/installer/app_installer.h>
-#include <common/pkgmgr_interface.h>
-#include <common/step/configuration/step_fail.h>
-#include <unit_tests/common/smoke_utils.h>
-
-#include <memory>
-#include <string>
-#include <utility>
-
-#include "tpk/tpk_app_query_interface.h"
-#include "tpk/tpk_installer.h"
-
-namespace smoke_test {
-
-extern const bf::path kSmokePackagesDirectory;
-
-bool ValidatePackage(const std::string& pkgid,
- const std::pair<std::string, std::string>& app,
- const TestParameters& params);
-
-bool ValidateExternalPackage(const std::string& pkgid,
- const std::pair<std::string, std::string>& app,
- const TestParameters& params);
-
-bool ValidateExtendedPackage(const std::string& pkgid,
- const std::pair<std::string, std::string>& app,
- const TestParameters& params);
-
-class TpkBackendInterface: public BackendInterface {
- public:
- using BackendInterface::BackendInterface;
- CommandResult InstallWithTEP(const bf::path& path,
- const bf::path& tep) const;
- CommandResult InstallSuccessWithTEP(const bf::path& path,
- const bf::path& tep) const;
- CommandResult MountInstallWithTEP(const bf::path& path,
- const bf::path& tep) const;
- CommandResult MountInstallSuccessWithTEP(const bf::path& path,
- const bf::path& tep) const;
-
- AppQueryInterfacePtr CreateQueryInterface() const override;
- AppInstallerPtr CreateInstaller(
- common_installer::PkgMgrPtr pkgmgr) const override;
- AppInstallerPtr CreateFailExpectedInstaller(
- common_installer::PkgMgrPtr pkgmgr, int fail_at) const override;
-};
-
-class TpkSmokeTestHelperRunner : public SmokeTestHelperRunner {
- private:
- common_installer::Subprocess CreateSubprocess() const {
- return common_installer::Subprocess(
- "/usr/bin/tpk-installer-ut/smoke-test-helper");
- }
-};
-
-#ifdef OVERRIDE_STEPS_BLOCK
-#undef OVERRIDE_STEPS_BLOCK
-#endif
-#define OVERRIDE_STEPS_BLOCK(STEPS) \
- void STEPS() override { \
- tpk::TpkInstaller::STEPS(); \
- if (fail_at_ > -1) \
- AddStepAtIndex<common_installer::configuration::StepFail>(fail_at_); \
- else \
- AddStep<common_installer::configuration::StepFail>(); \
- } \
-
-class FailExpectedTpkInstaller : public tpk::TpkInstaller {
- public:
- explicit FailExpectedTpkInstaller(
- common_installer::PkgMgrPtr pkgmgr, int fail_at)
- : tpk::TpkInstaller(pkgmgr), fail_at_(fail_at) { }
-
- private:
- OVERRIDE_STEPS_BLOCK(InstallSteps)
- OVERRIDE_STEPS_BLOCK(UpdateSteps)
- OVERRIDE_STEPS_BLOCK(UninstallSteps)
- OVERRIDE_STEPS_BLOCK(ReinstallSteps)
- OVERRIDE_STEPS_BLOCK(DeltaSteps)
- OVERRIDE_STEPS_BLOCK(MoveSteps)
- OVERRIDE_STEPS_BLOCK(RecoverySteps)
- OVERRIDE_STEPS_BLOCK(MountInstallSteps)
- OVERRIDE_STEPS_BLOCK(MountUpdateSteps)
- OVERRIDE_STEPS_BLOCK(ManifestDirectInstallSteps)
- OVERRIDE_STEPS_BLOCK(ManifestDirectUpdateSteps)
- OVERRIDE_STEPS_BLOCK(ManifestPartialInstallSteps)
- OVERRIDE_STEPS_BLOCK(ManifestPartialUpdateSteps)
- OVERRIDE_STEPS_BLOCK(PartialUninstallSteps)
- OVERRIDE_STEPS_BLOCK(ReadonlyUpdateInstallSteps)
- OVERRIDE_STEPS_BLOCK(ReadonlyUpdateUninstallSteps)
- OVERRIDE_STEPS_BLOCK(DisablePkgSteps)
- OVERRIDE_STEPS_BLOCK(EnablePkgSteps)
- OVERRIDE_STEPS_BLOCK(MigrateExtImgSteps)
- OVERRIDE_STEPS_BLOCK(RecoverDBSteps)
-
- int fail_at_;
-};
-
-#ifdef OVERRIDE_STEPS_BLOCK
-#undef OVERRIDE_STEPS_BLOCK
-#endif
-#define OVERRIDE_STEPS_BLOCK(STEPS) \
- void STEPS() override { \
- tpk::TpkInstaller::STEPS(); \
- if (crash_at_ > -1) \
- AddStepAtIndex<StepCrash>(crash_at_, type_); \
- else if (step_name_.size()) \
- AddStepAfter<StepCrash>(step_name_, type_); \
- else \
- AddStep<StepCrash>(type_); \
- } \
-
-class CrashTpkInstaller : public tpk::TpkInstaller {
- public:
- explicit CrashTpkInstaller(common_installer::PkgMgrPtr pkgmgr, int crash_at,
- std::string step_name, CrashStepType type) :
- tpk::TpkInstaller(pkgmgr), crash_at_(crash_at),
- step_name_(step_name), type_(type) {}
-
- private:
- OVERRIDE_STEPS_BLOCK(InstallSteps)
- OVERRIDE_STEPS_BLOCK(UpdateSteps)
- OVERRIDE_STEPS_BLOCK(UninstallSteps)
- OVERRIDE_STEPS_BLOCK(ReinstallSteps)
- OVERRIDE_STEPS_BLOCK(DeltaSteps)
- OVERRIDE_STEPS_BLOCK(MoveSteps)
- OVERRIDE_STEPS_BLOCK(RecoverySteps)
- OVERRIDE_STEPS_BLOCK(MountInstallSteps)
- OVERRIDE_STEPS_BLOCK(MountUpdateSteps)
- OVERRIDE_STEPS_BLOCK(ManifestDirectInstallSteps)
- OVERRIDE_STEPS_BLOCK(ManifestDirectUpdateSteps)
- OVERRIDE_STEPS_BLOCK(ManifestPartialInstallSteps)
- OVERRIDE_STEPS_BLOCK(ManifestPartialUpdateSteps)
- OVERRIDE_STEPS_BLOCK(PartialUninstallSteps)
- OVERRIDE_STEPS_BLOCK(ReadonlyUpdateInstallSteps)
- OVERRIDE_STEPS_BLOCK(ReadonlyUpdateUninstallSteps)
- OVERRIDE_STEPS_BLOCK(DisablePkgSteps)
- OVERRIDE_STEPS_BLOCK(EnablePkgSteps)
- OVERRIDE_STEPS_BLOCK(MigrateExtImgSteps)
- OVERRIDE_STEPS_BLOCK(RecoverDBSteps)
-
- int crash_at_;
- std::string step_name_;
- CrashStepType type_;
-};
-
-#ifdef OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS
-#undef OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS
-#endif
-#define OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(STEPS) \
- void STEPS() override { \
- tpk::TpkInstaller::STEPS(); \
- RemoveStep("RunParserPlugin"); \
- } \
-
-class TpkInstallerWithoutPasrserPlugins : public tpk::TpkInstaller {
- public:
- explicit TpkInstallerWithoutPasrserPlugins(
- common_installer::PkgMgrPtr pkgmgr) : tpk::TpkInstaller(pkgmgr) { }
-
- private:
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(InstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(UpdateSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(UninstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ReinstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(DeltaSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(MoveSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(MountInstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(MountUpdateSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ManifestDirectInstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ManifestDirectUpdateSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ManifestPartialInstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ManifestPartialUpdateSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(PartialUninstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ReadonlyUpdateInstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ReadonlyUpdateUninstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(DisablePkgSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(EnablePkgSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(MigrateExtImgSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(RecoverDBSteps)
- void RecoverySteps() override {
- tpk::TpkInstaller::RecoverySteps();
- RemoveStep("RecoverParserPlugin");
- }
-};
-
-} // namespace smoke_test
-
-
-#endif // UNIT_TESTS_TPK_SMOKE_UTILS_H_
--- /dev/null
+ADD_SUBDIRECTORY(smoke_tests)
--- /dev/null
+SET(DESTINATION_DIR tpk-installer-ut)
+SET(TARGET_SMOKE_UTILS smoke-utils)
+
+# Executables
+ADD_EXECUTABLE(${TARGET_SMOKE_TEST}
+ smoke_test.cc
+)
+
+ADD_EXECUTABLE(${TARGET_SMOKE_TEST_EXTENSIVE}
+ extensive_smoke_test.cc
+)
+
+ADD_EXECUTABLE(${TARGET_SMOKE_TEST_HELPER}
+ smoke_test_helper.cc
+)
+
+ADD_EXECUTABLE(${TARGET_MANIFEST_TEST}
+ manifest_test.cc
+ manifest_test_package.cc
+ manifest_test_service_application.cc
+ manifest_test_ui_application.cc
+ manifest_test_watch_application.cc
+ manifest_test_widget_application.cc
+)
+
+ADD_EXECUTABLE(${TARGET_RECOVERY_TEST}
+ recovery_test.cc
+)
+
+ADD_LIBRARY(${TARGET_TPK_SMOKE_UTILS} SHARED
+ tpk_smoke_utils.cc
+)
+
+TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
+TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST_EXTENSIVE} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
+TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST_HELPER} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
+TARGET_INCLUDE_DIRECTORIES(${TARGET_TPK_SMOKE_UTILS} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
+TARGET_INCLUDE_DIRECTORIES(${TARGET_MANIFEST_TEST} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
+TARGET_INCLUDE_DIRECTORIES(${TARGET_RECOVERY_TEST} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
+
+INSTALL(DIRECTORY test_samples/ DESTINATION ${SHAREDIR}/${DESTINATION_DIR}/test_samples)
+
+APPLY_PKG_CONFIG(${TARGET_SMOKE_TEST} PUBLIC
+ Boost
+ GTEST
+ GUM_DEPS
+)
+APPLY_PKG_CONFIG(${TARGET_SMOKE_TEST_EXTENSIVE} PUBLIC
+ Boost
+ GTEST
+ GUM_DEPS
+)
+APPLY_PKG_CONFIG(${TARGET_MANIFEST_TEST} PUBLIC
+ Boost
+ GTEST
+)
+APPLY_PKG_CONFIG(${TARGET_RECOVERY_TEST} PUBLIC
+ Boost
+ GTEST
+ GUM_DEPS
+)
+
+# FindGTest module do not sets all needed libraries in GTEST_LIBRARIES and
+# GTest main libraries is still missing, so additional linking of
+# GTEST_MAIN_LIBRARIES is needed.
+TARGET_LINK_LIBRARIES(${TARGET_SMOKE_TEST} PRIVATE ${TARGET_LIBNAME_TPK} ${GTEST_MAIN_LIBRARIES} ${TARGET_SMOKE_UTILS} ${TARGET_TPK_SMOKE_UTILS})
+TARGET_LINK_LIBRARIES(${TARGET_SMOKE_TEST_EXTENSIVE} PRIVATE ${TARGET_LIBNAME_TPK} ${GTEST_MAIN_LIBRARIES} ${TARGET_SMOKE_UTILS} ${TARGET_TPK_SMOKE_UTILS})
+TARGET_LINK_LIBRARIES(${TARGET_SMOKE_TEST_HELPER} PRIVATE ${TARGET_LIBNAME_TPK} ${TARGET_TPK_SMOKE_UTILS})
+TARGET_LINK_LIBRARIES(${TARGET_MANIFEST_TEST} PRIVATE ${TARGET_LIBNAME_TPK} ${GTEST_MAIN_LIBRARIES})
+TARGET_LINK_LIBRARIES(${TARGET_RECOVERY_TEST} PRIVATE ${TARGET_LIBNAME_TPK} ${GTEST_MAIN_LIBRARIES} ${TARGET_SMOKE_UTILS} ${TARGET_TPK_SMOKE_UTILS})
+TARGET_LINK_LIBRARIES(${TARGET_TPK_SMOKE_UTILS} PRIVATE ${TARGET_LIBNAME_TPK} ${TARGET_SMOKE_UTILS})
+
+INSTALL(TARGETS ${TARGET_SMOKE_TEST} DESTINATION ${BINDIR}/${DESTINATION_DIR})
+INSTALL(TARGETS ${TARGET_SMOKE_TEST_EXTENSIVE} DESTINATION ${BINDIR}/${DESTINATION_DIR})
+INSTALL(TARGETS ${TARGET_SMOKE_TEST_HELPER} DESTINATION ${BINDIR}/${DESTINATION_DIR})
+INSTALL(TARGETS ${TARGET_MANIFEST_TEST} DESTINATION ${BINDIR}/${DESTINATION_DIR})
+INSTALL(TARGETS ${TARGET_RECOVERY_TEST} DESTINATION ${BINDIR}/${DESTINATION_DIR})
+INSTALL(TARGETS ${TARGET_TPK_SMOKE_UTILS} DESTINATION ${LIB_INSTALL_DIR})
+INSTALL(FILES tpk_smoke_utils.h DESTINATION ${INCLUDEDIR}/app-installers/smoke_tests/)
--- /dev/null
+// Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include <boost/exception/diagnostic_information.hpp>
+#include <boost/program_options.hpp>
+
+#include <unit_tests/common/smoke_utils.h>
+
+#include <gtest/gtest.h>
+#include <gtest/gtest-death-test.h>
+
+#include "smoke_tests/tpk_smoke_utils.h"
+
+namespace bpo = boost::program_options;
+namespace ci = common_installer;
+
+enum class BackupType : int {
+ MOVE,
+ COPY_AND_REMOVE,
+};
+
+namespace smoke_test {
+
+class SmokeEnvironment : public testing::Environment {
+ public:
+ explicit SmokeEnvironment(ci::RequestMode mode, bool no_backup,
+ BackupType backup_type) :
+ request_mode_(mode), no_backup_(no_backup),
+ backup_type_(backup_type) {
+ }
+ void SetUp() override {
+ if (request_mode_ == ci::RequestMode::USER) {
+ ASSERT_TRUE(AddTestUser(&test_user));
+ }
+ if (no_backup_)
+ return;
+ backups_ = SetupBackupDirectories(test_user.uid);
+ if (backup_type_ == BackupType::MOVE) {
+ for (auto& path : backups_)
+ ASSERT_TRUE(BackupPath(path));
+ } else if (backup_type_ == BackupType::COPY_AND_REMOVE) {
+ for (auto& path : backups_)
+ ASSERT_TRUE(BackupPathCopyAndRemove(path));
+ }
+ }
+ void TearDown() override {
+ ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL ||
+ (request_mode_ == ci::RequestMode::USER &&
+ kGlobalUserUid != test_user.uid));
+ TpkBackendInterface backend(std::to_string(test_user.uid));
+ UninstallAllSmokeApps(request_mode_, test_user.uid, &backend);
+ if (request_mode_ == ci::RequestMode::USER) {
+ ASSERT_TRUE(DeleteTestUser());
+ }
+ if (no_backup_)
+ return;
+ if (backup_type_ == BackupType::MOVE) {
+ for (auto& path : backups_)
+ ASSERT_TRUE(RestorePath(path));
+ } else if (backup_type_ == BackupType::COPY_AND_REMOVE) {
+ for (auto& path : backups_)
+ ASSERT_TRUE(RestorePathCopyAndRemove(path));
+ }
+ }
+ User test_user;
+
+ private:
+ ci::RequestMode request_mode_;
+ std::vector<bf::path> backups_;
+ bool no_backup_;
+ BackupType backup_type_;
+};
+
+} // namespace smoke_test
+
+namespace {
+
+smoke_test::SmokeEnvironment *env = nullptr;
+void signalHandler(int signum) {
+ env->TearDown();
+ exit(signum);
+}
+
+} // namespace
+
+namespace smoke_test {
+
+class SmokeTest : public testing::Test {
+ public:
+ SmokeTest() : backend(std::to_string(env->test_user.uid)),
+ params{PackageType::TPK, false} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+ protected:
+ TpkBackendInterface backend;
+ TestParameters params;
+};
+
+TEST_F(SmokeTest, DeltaMode_Tpk_Rollback) {
+ bf::path path = kSmokePackagesDirectory / "DeltaMode_Tpk_Rollback.tpk";
+ bf::path delta_package = kSmokePackagesDirectory /
+ "DeltaMode_Tpk_Rollback.delta";
+ std::string pkgid = "smoketpk28";
+ std::string appid = "smoketpk28.DeltaModeTpk_Rollback";
+ std::string exec = "basicdali";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ const char* argv[] =
+ {"", "-i", delta_package.c_str(), "-u", test_uid_str.c_str()};
+
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+
+ // Check delta modifications
+
+ bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+ params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "DELETED"));
+ EXTENDED_ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "ADDED"));
+ EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "basicdali"));
+ EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" /
+ "basicdali.png"));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "res/MODIFIED", "version 1\n", params));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
+ bf::path path = kSmokePackagesDirectory / "RecoveryMode_Tpk_Installation.tpk";
+ std::string pkgid = "smokeapp15";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ std::vector<std::string> args =
+ {"", "-i", path.c_str(), "-u", test_uid_str.c_str()};
+ backend.CrashAfterEachStep(&args, [&](int step) -> bool {
+ if (step >= 2) {
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ EXTENDED_ASSERT_FALSE(recovery_file.empty());
+ EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
+ ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ }
+ return true;
+ }, params.pkg_type);
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+}
+
+TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
+ bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update.tpk";
+ bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update_2.tpk";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+ ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
+
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ std::vector<std::string> args =
+ {"", "-i", path_new.string(), "-u", test_uid_str.c_str()};
+ backend.CrashAfterEachStep(&args, [&](int step) -> bool {
+ if (step >= 2) {
+ std::string pkgid = "smokeapp16";
+ std::string appid = "smokeapp16.RecoveryModeTpkUpdate";
+ std::string exec = "native";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ EXTENDED_ASSERT_FALSE(recovery_file.empty());
+ EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
+ ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+
+ EXTENDED_ASSERT_TRUE(
+ ValidateFileContentInPackage(pkgid, "VERSION", "1\n", params));
+ }
+ return true;
+ }, params.pkg_type);
+}
+
+#define TEP_TEST_STARTING_BLOCK(NUMBER) \
+ bf::path path = kSmokePackagesDirectory / "TEP_Tpk"; \
+ path += #NUMBER; \
+ path += ".tpk"; \
+ bf::path tep1 = kSmokePackagesDirectory / "tep1.tep"; \
+ bf::path tep2 = kSmokePackagesDirectory / "tep2.tep"; \
+ std::string number = std::to_string(50 + NUMBER - 1); \
+ std::string pkgid = std::string("smokeapp") + number; \
+ std::string appid = pkgid + ".TEP"; \
+ std::string exec = "native"; \
+
+
+TEST_F(SmokeTest, TEP_Tpk_TepInstallTepUpdateRollback) {
+ TEP_TEST_STARTING_BLOCK(5)
+ ASSERT_EQ(backend.InstallWithTEP(path, tep1), ci::AppInstaller::Result::OK);
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str(),
+ "-e", tep1.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "tep/tep1.tep", "tep1\n", params));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, TEP_Tpk_NoTepInstallTepUpdateRollback) {
+ TEP_TEST_STARTING_BLOCK(6)
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str(),
+ "-e", tep1.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+ params.test_user.uid);
+ bf::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
+ EXTENDED_ASSERT_FALSE(bf::exists(tep_file));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, TEP_Tpk_TepInstallNoTepUpdateRollback) {
+ TEP_TEST_STARTING_BLOCK(7)
+ ASSERT_EQ(backend.InstallWithTEP(path, tep1), ci::AppInstaller::Result::OK);
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "tep/tep1.tep", "tep1\n", params));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstallTepUpdateRollback) {
+ TEP_TEST_STARTING_BLOCK(12)
+ ASSERT_EQ(backend.MountInstallWithTEP(path, tep1),
+ ci::AppInstaller::Result::OK);
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-w", path.c_str(), "-u", test_uid_str.c_str(),
+ "-e", tep2.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "tep/tep1.tep", "tep1\n", params));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, TEP_Tpk_Mount_NoTepInstallTepUpdateRollback) {
+ TEP_TEST_STARTING_BLOCK(13)
+ ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-w", path.c_str(), "-u", test_uid_str.c_str(),
+ "-e", tep1.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+ params.test_user.uid);
+ bf::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
+ EXTENDED_ASSERT_FALSE(bf::exists(tep_file));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstallNoTepUpdateRollback) {
+ TEP_TEST_STARTING_BLOCK(14)
+ ASSERT_EQ(backend.MountInstallWithTEP(path, tep1),
+ ci::AppInstaller::Result::OK);
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "tep/tep1.tep", "tep1\n", params));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, InstallationMode_Rollback) {
+ bf::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.tpk";
+ std::string pkgid = "smoketpk34";
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str()};
+
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForDelta) {
+ bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.tpk";
+ bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+ ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Install(path_old));
+
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ std::vector<std::string> args =
+ {"", "-i", path_new.string(), "-u", test_uid_str.c_str()};
+ backend.CrashAfterEachStep(&args, [&](int step) -> bool {
+ if (step >= 2) {
+ std::string pkgid = "smoketpk35";
+ std::string appid = "smoketpk35.RecoveryMode_ForDelta";
+ std::string exec = "smoketpk35";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ EXTENDED_ASSERT_FALSE(recovery_file.empty());
+ EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
+ ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+
+ EXTENDED_ASSERT_TRUE(
+ ValidateFileContentInPackage(pkgid, "res/MODIFIED", "version 1",
+ params));
+ bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+ params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "res/DELETED"));
+ EXTENDED_ASSERT_FALSE(bf::exists(root_path / pkgid / "res/ADDED"));
+ }
+ return true;
+ }, params.pkg_type);
+}
+
+TEST_F(SmokeTest, UpdateMode_Rollback) {
+ bf::path old_path = kSmokePackagesDirectory / "UpdateMode_Rollback.tpk";
+ bf::path new_path = kSmokePackagesDirectory / "UpdateMode_Rollback2.tpk";
+ std::string pkgid = "smoketpk36";
+ std::string appid = "smoketpk36.UpdateMode_Rollback";
+ std::string exec = "smoketpk36";
+ ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Install(old_path));
+
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ const char* argv[] =
+ {"", "-i", new_path.c_str(), "-u", test_uid_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "res/VERSION", "1", params));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
+ bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.tpk";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ std::vector<std::string> args =
+ {"", "-w", path.string(), "-u", test_uid_str.c_str()};
+ backend.CrashAfterEachStep(&args, [&](int step) -> bool {
+ if (step >= 2) {
+ std::string pkgid = "smoketpk37";
+ std::string appid = "smoketpk37.RecoveryMode_ForMountInstall";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ EXTENDED_ASSERT_FALSE(recovery_file.empty());
+ EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
+ ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ }
+ return true;
+ }, params.pkg_type);
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
+ bf::path path_old =
+ kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate.tpk";
+ bf::path path_new =
+ kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate2.tpk";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+ ASSERT_EQ(ci::AppInstaller::Result::OK, backend.MountInstall(path_old));
+
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ std::vector<std::string> args =
+ {"", "-w", path_new.string(), "-u", test_uid_str.c_str()};
+ backend.CrashAfterEachStep(&args, [&](int step) -> bool {
+ if (step >= 2) {
+ std::string pkgid = "smoketpk38";
+ std::string appid = "smoketpk38.RecoveryMode_ForMountUpdate";
+ std::string exec = "smoketpk38";
+
+ // Filesystem may be mounted after crash
+ ScopedTzipInterface poweroff_unmount_interface(pkgid,
+ params.test_user.uid);
+ poweroff_unmount_interface.Release();
+
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ EXTENDED_ASSERT_FALSE(recovery_file.empty());
+ EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
+ ci::AppInstaller::Result::OK);
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "res/VERSION", "1", params));
+ }
+ return true;
+ }, params.pkg_type);
+}
+
+TEST_F(SmokeTest, MountInstallationMode_Rollback) {
+ bf::path path =
+ kSmokePackagesDirectory / "MountInstallationMode_Rollback.tpk";
+ std::string pkgid = "smoketpk39";
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-w", path.c_str(), "-u", test_uid_str.c_str()};
+
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, MountUpdateMode_Rollback) {
+ bf::path old_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback.tpk";
+ bf::path new_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback2.tpk";
+ std::string pkgid = "smoketpk40";
+ std::string appid = "smoketpk40.MountUpdateMode_Rollback";
+ std::string exec = "smoketpk40";
+ ASSERT_EQ(ci::AppInstaller::Result::OK, backend.MountInstall(old_path));
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ const char* argv[] =
+ {"", "-w", new_path.c_str(), "-u", test_uid_str.c_str()};
+
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "res/VERSION", "1", params));
+ return true;
+ });
+}
+
+} // namespace smoke_test
+
+int main(int argc, char** argv) {
+ try {
+ bool no_backup = false;
+ BackupType backup_type = BackupType::MOVE;
+
+ ci::RequestMode request_mode = smoke_test::ParseRequestMode(argc, argv);
+ if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
+ std::cout << "Skip tests for preload request" << std::endl;
+ ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
+ }
+ testing::InitGoogleTest(&argc, argv);
+
+ bpo::options_description options("Allowed options");
+ bpo::variables_map opt_map;
+ try {
+ options.add_options()
+ ("help", "display this help message")
+ ("no-backup", "Do test without backup")
+ ("backup-type", bpo::value<std::string>(), "<move|copy> set test's "
+ "backup type \'move\', \'copy and remove\'");
+ bpo::store(bpo::parse_command_line(argc, argv, options), opt_map);
+ if (opt_map.count("help")) {
+ std::cerr << options << std::endl;
+ return -1;
+ }
+
+ if (opt_map.count("no-backup"))
+ no_backup = true;
+ if (opt_map.count("backup-type")) {
+ if (opt_map["backup-type"].as<std::string>() == "move") {
+ backup_type = BackupType::MOVE;
+ } else if (opt_map["backup-type"].as<std::string>() == "copy") {
+ backup_type = BackupType::COPY_AND_REMOVE;
+ } else {
+ std::cerr << options << std::endl;
+ return -1;
+ }
+ }
+ bpo::notify(opt_map);
+ } catch (...) {
+ std::cerr << "Exception occurred: "
+ << boost::current_exception_diagnostic_information()
+ << std::endl;
+ return -1;
+ }
+
+ ::env = static_cast<smoke_test::SmokeEnvironment*>(
+ testing::AddGlobalTestEnvironment(
+ new smoke_test::SmokeEnvironment(request_mode,
+ no_backup, backup_type)));
+ signal(SIGINT, ::signalHandler);
+ signal(SIGSEGV, ::signalHandler);
+ return RUN_ALL_TESTS();
+ } catch (...) {
+ std::cout << "Exception occurred during testing" << std::endl;
+ return 1;
+ }
+}
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include "smoke_tests/manifest_test.h"
+
+#include <cassert>
+
+namespace bf = boost::filesystem;
+namespace ci = common_installer;
+
+namespace {
+
+const char kManifestTestcaseData[] =
+ "/usr/share/tpk-installer-ut/test_samples/manifest/";
+
+} // namespace
+
+bool StepParseRunner::Run() {
+ PrepareContext();
+ ci::configuration::StepParseManifest step(context_.get(),
+ ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
+ ci::configuration::StepParseManifest::StoreLocation::NORMAL);
+ return step.process() == ci::Step::Status::OK;
+}
+
+manifest_x* StepParseRunner::GetManifest() const {
+ return context_->manifest_data.get();
+}
+
+bf::path StepParseRunner::GetRootApplicationPath() const {
+ return context_->root_application_path.get();
+}
+
+void StepParseRunner::PrepareContext() {
+ context_.reset(new ci::InstallerContext());
+ context_->root_application_path.set(ci::GetRootAppPath(false, getuid()));
+ context_->unpacked_dir_path.set(
+ bf::path(kManifestTestcaseData) / dir_suffix_);
+
+ // Make sure that there is manifest file for testcase
+ assert(bf::exists(context_->unpacked_dir_path.get() / "tizen-manifest.xml")
+ && "Failed to stat manifest file");
+}
+
+std::string ManifestTest::GetMyName() const {
+ std::string suite =
+ testing::UnitTest::GetInstance()->current_test_info()->test_case_name();
+ std::string case_name =
+ testing::UnitTest::GetInstance()->current_test_info()->name();
+ return suite + '.' + case_name;
+}
+
+application_x* GetSingleApp(manifest_x* m) {
+ if (!m)
+ return nullptr;
+ auto apps = GListRange<application_x*>(m->application);
+ if (Size(&apps) != 1)
+ return nullptr;
+ return *apps.begin();
+}
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#ifndef SMOKE_TESTS_MANIFEST_TEST_H_
+#define SMOKE_TESTS_MANIFEST_TEST_H_
+
+#include <boost/filesystem/path.hpp>
+
+#include <common/installer_context.h>
+#include <common/step/configuration/step_parse_manifest.h>
+#include <common/utils/glist_range.h>
+#include <common/utils/request.h>
+
+#include <glib.h>
+#include <gtest/gtest.h>
+
+#include <memory>
+#include <string>
+
+#define ASSERT_CSTR_EQ(STR1, STR2) \
+ ASSERT_EQ(strcmp(STR1, STR2), 0) \
+
+#define ASSERT_CSTR_NE(STR1, STR2) \
+ ASSERT_NE(strcmp(STR1, STR2), 0) \
+
+#define ASSERT_IN(ITEM, CONTAINER) \
+ ASSERT_NE(std::find(CONTAINER.begin(), CONTAINER.end(), ITEM), \
+ CONTAINER.end()); \
+
+template<typename T>
+gint Size(GListRange<T>* range) {
+ return std::distance(range->begin(), range->end());
+}
+
+class StepParseRunner {
+ public:
+ explicit StepParseRunner(const std::string& dir_suffix,
+ bool ignore_start_files = true)
+ : dir_suffix_(dir_suffix),
+ ignore_start_files_(ignore_start_files),
+ context_(nullptr) { }
+
+ bool Run();
+ manifest_x* GetManifest() const;
+ boost::filesystem::path GetRootApplicationPath() const;
+
+ private:
+ void PrepareContext();
+
+ std::string dir_suffix_;
+ bool ignore_start_files_;
+ std::unique_ptr<common_installer::InstallerContext> context_;
+};
+
+class ManifestTest : public testing::Test {
+ public:
+ std::string GetMyName() const;
+};
+
+application_x* GetSingleApp(manifest_x* m);
+
+#endif // SMOKE_TESTS_MANIFEST_TEST_H_
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include "smoke_tests/manifest_test.h"
+
+namespace bf = boost::filesystem;
+namespace ci = common_installer;
+
+TEST_F(ManifestTest, ManifestElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->package, "package0id");
+ auto apps = GListRange<application_x*>(m->application);
+ ASSERT_EQ(Size(&apps), 1);
+ application_x* app = *apps.begin();
+ ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+}
+
+TEST_F(ManifestTest, ManifestElement_InvalidRootElement) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ManifestElement_DoubleRootElement) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ManifestElement_InstallLocation_Auto) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->installlocation, "auto");
+}
+
+TEST_F(ManifestTest, ManifestElement_InstallLocation_InternalOnly) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->installlocation, "internal-only");
+}
+
+TEST_F(ManifestTest, ManifestElement_InstallLocation_PreferExternal) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->installlocation, "prefer-external");
+}
+
+TEST_F(ManifestTest, ManifestElement_InstallLocation_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->installlocation, "auto");
+}
+
+TEST_F(ManifestTest, ManifestElement_InstallLocation_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ManifestElement_Package_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ManifestElement_Package_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ManifestElement_Type_Tpk) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->type, "tpk");
+}
+
+TEST_F(ManifestTest, ManifestElement_Type_Rpm) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->type, "rpm");
+}
+
+TEST_F(ManifestTest, ManifestElement_Type_Wgt) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->type, "wgt");
+}
+
+TEST_F(ManifestTest, ManifestElement_Type_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ManifestElement_Type_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->type, "tpk");
+}
+
+TEST_F(ManifestTest, ManifestElement_Version_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->version, "1.2.3");
+}
+
+TEST_F(ManifestTest, ManifestElement_Version_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ManifestElement_Version_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ManifestElement_ApiVersion_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->api_version, "3.0");
+}
+
+TEST_F(ManifestTest, ManifestElement_ApiVersion_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ManifestElement_ApiVersion_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, AuthorElement_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto authors = GListRange<author_x*>(m->author);
+ ASSERT_EQ(Size(&authors), 0);
+}
+
+TEST_F(ManifestTest, AuthorElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto authors = GListRange<author_x*>(m->author);
+ ASSERT_EQ(Size(&authors), 1);
+ author_x* author = *authors.begin();
+ ASSERT_CSTR_EQ(author->email, "valid@email.com");
+ ASSERT_CSTR_EQ(author->href, "http://site.domain.com");
+}
+
+TEST_F(ManifestTest, DescriptionElement_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto descriptions = GListRange<description_x*>(m->description);
+ ASSERT_EQ(Size(&descriptions), 0);
+}
+
+TEST_F(ManifestTest, DescriptionElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto descriptions = GListRange<description_x*>(m->description);
+ ASSERT_EQ(Size(&descriptions), 1);
+ description_x* description = *descriptions.begin();
+ ASSERT_CSTR_EQ(description->text, "text");
+ ASSERT_CSTR_EQ(description->lang, "en-GB");
+}
+
+TEST_F(ManifestTest, DescriptionElement_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto descriptions = GListRange<description_x*>(m->description);
+ ASSERT_EQ(Size(&descriptions), 2);
+ description_x* description1 = *descriptions.begin();
+ description_x* description2 = *++descriptions.begin();
+ ASSERT_CSTR_EQ(description1->text, "text");
+ ASSERT_CSTR_EQ(description1->lang, "en-GB");
+ ASSERT_CSTR_EQ(description2->text, "text2");
+ ASSERT_CSTR_EQ(description2->lang, DEFAULT_LOCALE);
+}
+
+TEST_F(ManifestTest, DescriptionElement_Lang_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, PrivilegesElement_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges = GListRange<privilege_x*>(m->privileges);
+ ASSERT_EQ(Size(&privileges), 0);
+}
+
+TEST_F(ManifestTest, PrivilegesElement_None) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges = GListRange<privilege_x*>(m->privileges);
+ ASSERT_EQ(Size(&privileges), 0);
+}
+
+TEST_F(ManifestTest, PrivilegesElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges = GListRange<privilege_x*>(m->privileges);
+ ASSERT_EQ(Size(&privileges), 1);
+ ASSERT_CSTR_EQ((*privileges.begin())->value,
+ "http://tizen.org/privilege/application.admin");
+}
+
+TEST_F(ManifestTest, PrivilegesElement_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges = GListRange<privilege_x*>(m->privileges);
+ ASSERT_EQ(Size(&privileges), 3);
+ ASSERT_CSTR_EQ(((*privileges.begin()))->value,
+ "http://tizen.org/privilege/account.read");
+ ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
+ "http://tizen.org/privilege/application.admin");
+ ASSERT_CSTR_EQ(((*++++privileges.begin())->value),
+ "http://tizen.org/privilege/appmanager.launch");
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegesElement_Invalid_OverLength) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegesElement_Invalid_NotURI) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegesElement_Invalid_NoPKGID) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegesElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges =
+ GListRange<appdefined_privilege_x*>(m->appdefined_privileges);
+ ASSERT_EQ(Size(&privileges), 1);
+ ASSERT_CSTR_EQ((*privileges.begin())->value,
+ "http://package0id/appdefined/test.read");
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegesElement_WithLicenseValid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges =
+ GListRange<appdefined_privilege_x*>(m->appdefined_privileges);
+ ASSERT_EQ(Size(&privileges), 1);
+ ASSERT_CSTR_EQ((*privileges.begin())->value,
+ "http://package0id/appdefined/test.read");
+ bf::path path(m->root_path);
+ path /= "res/cert";
+ ASSERT_CSTR_EQ((*privileges.begin())->license, path.c_str());
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegesElement_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges =
+ GListRange<appdefined_privilege_x*>(m->appdefined_privileges);
+ ASSERT_EQ(Size(&privileges), 2);
+ ASSERT_CSTR_EQ(((*privileges.begin()))->value,
+ "http://package0id/appdefined/test.read");
+ ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
+ "http://package0id/appdefined/test.write");
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegesElement_WithLicenseMany) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges =
+ GListRange<appdefined_privilege_x*>(m->appdefined_privileges);
+ ASSERT_EQ(Size(&privileges), 2);
+ ASSERT_CSTR_EQ(((*privileges.begin()))->value,
+ "http://package0id/appdefined/test.read");
+ bf::path path(m->root_path);
+ path /= "res/cert";
+ ASSERT_CSTR_EQ(((*privileges.begin()))->license, path.c_str());
+ ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
+ "http://package0id/appdefined/test.write");
+ ASSERT_CSTR_EQ(((*++privileges.begin()))->license, path.c_str());
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges =
+ GListRange<appdefined_privilege_x*>(m->provides_appdefined_privileges);
+ ASSERT_EQ(Size(&privileges), 0);
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_None) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges =
+ GListRange<appdefined_privilege_x*>(m->provides_appdefined_privileges);
+ ASSERT_EQ(Size(&privileges), 0);
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_Invalid_OverLength) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_Invalid_NotURI) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_Invalid_NoPKGID) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges =
+ GListRange<appdefined_privilege_x*>(m->provides_appdefined_privileges);
+ ASSERT_EQ(Size(&privileges), 1);
+ ASSERT_CSTR_EQ((*privileges.begin())->value,
+ "http://package0id/appdefined/test.read");
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_WithLicenseValid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges =
+ GListRange<appdefined_privilege_x*>(m->provides_appdefined_privileges);
+ ASSERT_EQ(Size(&privileges), 1);
+ ASSERT_CSTR_EQ((*privileges.begin())->value,
+ "http://package0id/appdefined/test.read");
+ bf::path path(m->root_path);
+ path /= "res/cert";
+ ASSERT_CSTR_EQ((*privileges.begin())->license, path.c_str());
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges =
+ GListRange<appdefined_privilege_x*>(m->provides_appdefined_privileges);
+ ASSERT_EQ(Size(&privileges), 2);
+ ASSERT_CSTR_EQ(((*privileges.begin()))->value,
+ "http://package0id/appdefined/test.read");
+ ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
+ "http://package0id/appdefined/test.write");
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_WithLicenseMany) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto privileges =
+ GListRange<appdefined_privilege_x*>(m->provides_appdefined_privileges);
+ ASSERT_EQ(Size(&privileges), 2);
+ ASSERT_CSTR_EQ(((*privileges.begin()))->value,
+ "http://package0id/appdefined/test.read");
+ bf::path path(m->root_path);
+ path /= "res/cert";
+ ASSERT_CSTR_EQ(((*privileges.begin()))->license, path.c_str());
+ ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
+ "http://package0id/appdefined/test.write");
+ ASSERT_CSTR_EQ(((*++privileges.begin()))->license, path.c_str());
+}
+
+TEST_F(ManifestTest, ProfileElement_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto profiles = GListRange<char*>(m->deviceprofile);
+ ASSERT_EQ(Size(&profiles), 0);
+}
+
+TEST_F(ManifestTest, ProfileElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto profiles = GListRange<char*>(m->deviceprofile);
+ ASSERT_EQ(Size(&profiles), 1);
+ const char* profile = *profiles.begin();
+ ASSERT_CSTR_EQ(profile, "mobile");
+}
+
+TEST_F(ManifestTest, ProfileElement_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ProfileElement_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto profiles = GListRange<char*>(m->deviceprofile);
+ ASSERT_EQ(Size(&profiles), 2);
+ const char* profile1 = *profiles.begin();
+ const char* profile2 = *++profiles.begin();
+ ASSERT_CSTR_EQ(profile1, "mobile");
+ ASSERT_CSTR_EQ(profile2, "wearable");
+}
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include "smoke_tests/manifest_test.h"
+
+#include <boost/tuple/tuple.hpp>
+#include <boost/tuple/tuple_comparison.hpp>
+
+#include <vector>
+
+namespace bf = boost::filesystem;
+namespace ci = common_installer;
+
+TEST_F(ManifestTest, ServiceApplicationElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->package, "package0id");
+ auto apps = GListRange<application_x*>(m->application);
+ ASSERT_EQ(Size(&apps), 1);
+ application_x* app = *apps.begin();
+ ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+ ASSERT_CSTR_EQ(app->component_type, "svcapp");
+ ASSERT_CSTR_EQ(app->mainapp, "true");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Appid_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Appid_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Multiple_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->multiple, "false");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Multiple_False) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->multiple, "false");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Multiple_True) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->multiple, "true");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Multiple_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AutoRestart_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->autorestart, "false");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AutoRestart_False) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->autorestart, "false");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AutoRestart_True) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->autorestart, "true");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AutoRestart_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_OnBoot_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->onboot, "false");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_OnBoot_False) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->onboot, "false");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_OnBoot_True) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->onboot, "true");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_OnBoot_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Taskmanage_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->taskmanage, "true");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Taskmanage_False) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->taskmanage, "false");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Taskmanage_True) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->taskmanage, "true");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Taskmanage_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Type_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Type_Capp) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->type, "capp");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Type_Webapp) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->type, "webapp");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Label_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->label);
+ ASSERT_EQ(Size(&labels), 0);
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Label_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->label);
+ ASSERT_EQ(Size(&labels), 1);
+ ASSERT_CSTR_EQ((*labels.begin())->text, "label");
+ ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Label_Text_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Label_Lang_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Label_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->label);
+ ASSERT_EQ(Size(&labels), 2);
+ ASSERT_CSTR_EQ((*labels.begin())->text, "label");
+ ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
+ ASSERT_CSTR_EQ((*++labels.begin())->text, "label_GB");
+ ASSERT_CSTR_EQ((*++labels.begin())->lang, "en-GB");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Label_Many_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Metadata_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->metadata);
+ ASSERT_EQ(Size(&labels), 0);
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Metadata_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto metadata = GListRange<metadata_x*>(app->metadata);
+ ASSERT_EQ(Size(&metadata), 1);
+ ASSERT_CSTR_EQ((*metadata.begin())->key, "key");
+ ASSERT_CSTR_EQ((*metadata.begin())->value, "value");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Metadata_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Metadata_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto metadata = GListRange<metadata_x*>(app->metadata);
+ ASSERT_EQ(Size(&metadata), 2);
+ ASSERT_CSTR_EQ((*metadata.begin())->key, "key1");
+ ASSERT_CSTR_EQ((*metadata.begin())->value, "value1");
+ ASSERT_CSTR_EQ((*++metadata.begin())->key, "key2");
+ ASSERT_CSTR_EQ((*++metadata.begin())->value, "");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_BackgroundCategory_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto bg_categories = GListRange<char*>(app->background_category);
+ ASSERT_EQ(Size(&bg_categories), 0);
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_BackgroundCategory_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto bg_categories = GListRange<char*>(app->background_category);
+ ASSERT_EQ(Size(&bg_categories), 1);
+ ASSERT_CSTR_EQ(*bg_categories.begin(), "bgcategory");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_BackgroundCategory_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_BackgroundCategory_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto bg_categories = GListRange<char*>(app->background_category);
+ ASSERT_EQ(Size(&bg_categories), 2);
+ ASSERT_CSTR_EQ(*bg_categories.begin(), "bgcategory1");
+ ASSERT_CSTR_EQ(*++bg_categories.begin(), "bgcategory2");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_DataControl_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto datacontrols = GListRange<datacontrol_x*>(app->datacontrol);
+ ASSERT_EQ(Size(&datacontrols), 0);
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_DataControl_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto datacontrols = GListRange<datacontrol_x*>(app->datacontrol);
+ ASSERT_EQ(Size(&datacontrols), 1);
+ ASSERT_CSTR_EQ((*datacontrols.begin())->providerid, "providerid");
+ ASSERT_CSTR_EQ((*datacontrols.begin())->access, "access");
+ ASSERT_CSTR_EQ((*datacontrols.begin())->type, "type");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_DataControl_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto datacontrols = GListRange<datacontrol_x*>(app->datacontrol);
+ ASSERT_EQ(Size(&datacontrols), 2);
+ ASSERT_CSTR_EQ((*datacontrols.begin())->providerid, "providerid1");
+ ASSERT_CSTR_EQ((*datacontrols.begin())->access, "access1");
+ ASSERT_CSTR_EQ((*datacontrols.begin())->type, "type1");
+ ASSERT_CSTR_EQ((*++datacontrols.begin())->providerid, "providerid2");
+ ASSERT_CSTR_EQ((*++datacontrols.begin())->access, "access2");
+ ASSERT_CSTR_EQ((*++datacontrols.begin())->type, "type2");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 0);
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Operation_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 0);
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Operation_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest,
+ ServiceApplicationElement_AppControl_Operation_Invalid_NotURI) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Mime_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Uri_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 1);
+ ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
+ "http://tizen.org/appcontrol/operation/compose");
+ ASSERT_CSTR_EQ((*appcontrols.begin())->uri, "scheme://");
+ ASSERT_CSTR_EQ((*appcontrols.begin())->mime, "application/pdf");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AppControl_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 2);
+ ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
+ "http://tizen.org/appcontrol/operation/compose");
+ ASSERT_CSTR_EQ((*appcontrols.begin())->uri, "scheme://");
+ ASSERT_CSTR_EQ((*appcontrols.begin())->mime, "application/pdf");
+ ASSERT_CSTR_EQ((*++appcontrols.begin())->operation,
+ "http://tizen.org/appcontrol/operation/compose2");
+ ASSERT_CSTR_EQ((*++appcontrols.begin())->uri, "scheme2://");
+ ASSERT_CSTR_EQ((*++appcontrols.begin())->mime, "application/text");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AppControl_SkipUri) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 1);
+ ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
+ "http://tizen.org/appcontrol/operation/compose");
+ ASSERT_EQ((*appcontrols.begin())->uri, nullptr);
+ ASSERT_CSTR_EQ((*appcontrols.begin())->mime, "application/pdf");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AppControl_SkipMime) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 1);
+ ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
+ "http://tizen.org/appcontrol/operation/compose");
+ ASSERT_CSTR_EQ((*appcontrols.begin())->uri, "scheme://");
+ ASSERT_EQ((*appcontrols.begin())->mime, nullptr);
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_AppControl_CartesianProduct) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 8);
+
+ std::vector<boost::tuple<std::string, std::string, std::string>>
+ found_app_controls;
+ for (auto& item : appcontrols) {
+ found_app_controls.emplace_back(item->operation, item->uri, item->mime);
+ }
+
+ for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
+ "http://tizen.org/appcontrol/operation/compose2"}) {
+ for (auto uri : {"scheme1://", "scheme2://"}) {
+ for (auto mime : {"application/text", "application/pdf"}) {
+ ASSERT_IN(boost::make_tuple(operation, uri, mime), found_app_controls);
+ }
+ }
+ }
+}
+
+TEST_F(ManifestTest,
+ ServiceApplicationElement_AppControl_CartesianProduct_SkipMime) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 4);
+
+ std::vector<boost::tuple<std::string, std::string, std::string>>
+ found_app_controls;
+ for (auto& item : appcontrols) {
+ ASSERT_EQ(item->mime, nullptr);
+ found_app_controls.emplace_back(item->operation, item->uri, "");
+ }
+
+ for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
+ "http://tizen.org/appcontrol/operation/compose2"}) {
+ for (auto uri : {"scheme1://", "scheme2://"}) {
+ ASSERT_IN(boost::make_tuple(operation, uri, ""), found_app_controls);
+ }
+ }
+}
+
+TEST_F(ManifestTest,
+ ServiceApplicationElement_AppControl_CartesianProduct_SkipUri) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 4);
+
+ std::vector<boost::tuple<std::string, std::string, std::string>>
+ found_app_controls;
+ for (auto& item : appcontrols) {
+ ASSERT_EQ(item->uri, nullptr);
+ found_app_controls.emplace_back(item->operation, "", item->mime);
+ }
+
+ for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
+ "http://tizen.org/appcontrol/operation/compose2"}) {
+ for (auto mime : {"application/text", "application/pdf"}) {
+ ASSERT_IN(boost::make_tuple(operation, "", mime), found_app_controls);
+ }
+ }
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Icon_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto icons = GListRange<icon_x*>(app->icon);
+ ASSERT_EQ(Size(&icons), 0);
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Icon_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_Icon_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto icons = GListRange<icon_x*>(app->icon);
+ ASSERT_EQ(Size(&icons), 1);
+ ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
+ "test_icon.png");
+}
+
+TEST_F(ManifestTest, ServiceApplicationElement_SetManifestXDefaults) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->package, "package0id");
+ ASSERT_CSTR_EQ(m->version, "1.0.0");
+ ASSERT_CSTR_EQ(m->installlocation, "auto");
+ ASSERT_CSTR_EQ(m->appsetting, "false");
+ ASSERT_CSTR_EQ(m->type, "tpk");
+ ASSERT_NE(m->installed_time, nullptr);
+ ASSERT_CSTR_EQ(m->mainapp_id, "package0id.appid");
+ ASSERT_CSTR_EQ(m->nodisplay_setting, "false");
+ ASSERT_CSTR_EQ(m->support_disable, "false");
+ ASSERT_CSTR_EQ(m->api_version, "2.3");
+ auto apps = GListRange<application_x*>(m->application);
+ ASSERT_EQ(Size(&apps), 1);
+ application_x* app = *apps.begin();
+ ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+ ASSERT_NE(app->exec, nullptr);
+ ASSERT_CSTR_EQ(app->nodisplay, "true");
+ ASSERT_CSTR_EQ(app->multiple, "false");
+ ASSERT_CSTR_EQ(app->taskmanage, "true");
+ ASSERT_CSTR_EQ(app->hwacceleration, "default");
+ ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
+ ASSERT_CSTR_EQ(app->component_type, "svcapp");
+ ASSERT_CSTR_EQ(app->mainapp, "true");
+ ASSERT_CSTR_EQ(app->recentimage, "false");
+ ASSERT_CSTR_EQ(app->launchcondition, "false");
+ ASSERT_CSTR_EQ(app->indicatordisplay, "true");
+ ASSERT_CSTR_EQ(app->effectimage_type, "image");
+ ASSERT_CSTR_EQ(app->guestmode_visibility, "true");
+ ASSERT_CSTR_EQ(app->permission_type, "normal");
+ ASSERT_CSTR_EQ(app->submode, "false");
+ ASSERT_CSTR_EQ(app->process_pool, "false");
+}
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include "smoke_tests/manifest_test.h"
+
+#include <boost/tuple/tuple.hpp>
+#include <boost/tuple/tuple_comparison.hpp>
+
+#include <vector>
+
+namespace bf = boost::filesystem;
+namespace ci = common_installer;
+
+TEST_F(ManifestTest, UIApplicationElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->package, "package0id");
+ auto apps = GListRange<application_x*>(m->application);
+ ASSERT_EQ(Size(&apps), 1);
+ application_x* app = *apps.begin();
+ ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+ ASSERT_CSTR_EQ(app->component_type, "uiapp");
+ ASSERT_CSTR_EQ(app->mainapp, "true");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_MissingNoApp) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_MissingOtherApp) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_NE(app->component_type, "uiapp");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Appid_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Appid_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_LaunchMode_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->launch_mode, "single");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_LaunchMode_Single) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->launch_mode, "single");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_LaunchMode_Group) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->launch_mode, "group");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_LaunchMode_Caller) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->launch_mode, "caller");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_LaunchMode_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Multiple_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->multiple, "false");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Multiple_False) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);;
+ ASSERT_CSTR_EQ(app->multiple, "false");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Multiple_True) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->multiple, "true");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Multiple_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Nodisplay_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->nodisplay, "false");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Nodisplay_False) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->nodisplay, "false");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Nodisplay_True) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->nodisplay, "true");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Nodisplay_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Taskmanage_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->taskmanage, "true");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Taskmanage_False) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->taskmanage, "false");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Taskmanage_True) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->taskmanage, "true");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Taskmanage_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_HwAcceleration_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->hwacceleration, "default");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_HwAcceleration_Default) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->hwacceleration, "default");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_HwAcceleration_Off) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->hwacceleration, "off");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_HwAcceleration_On) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->hwacceleration, "on");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Type_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Type_Capp) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->type, "capp");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Type_Webapp) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->type, "webapp");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Label_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->label);
+ ASSERT_EQ(Size(&labels), 0);
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Label_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->label);
+ ASSERT_EQ(Size(&labels), 1);
+ ASSERT_CSTR_EQ((*labels.begin())->text, "label");
+ ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Label_Text_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Label_Lang_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Label_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->label);
+ ASSERT_EQ(Size(&labels), 2);
+ ASSERT_CSTR_EQ((*labels.begin())->text, "label");
+ ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
+ ASSERT_CSTR_EQ((*++labels.begin())->text, "label_GB");
+ ASSERT_CSTR_EQ((*++labels.begin())->lang, "en-GB");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Label_Many_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Metadata_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->metadata);
+ ASSERT_EQ(Size(&labels), 0);
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Metadata_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto metadata = GListRange<metadata_x*>(app->metadata);
+ ASSERT_EQ(Size(&metadata), 1);
+ ASSERT_CSTR_EQ((*metadata.begin())->key, "key");
+ ASSERT_CSTR_EQ((*metadata.begin())->value, "value");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Metadata_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Metadata_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto metadata = GListRange<metadata_x*>(app->metadata);
+ ASSERT_EQ(Size(&metadata), 2);
+ ASSERT_CSTR_EQ((*metadata.begin())->key, "key1");
+ ASSERT_CSTR_EQ((*metadata.begin())->value, "value1");
+ ASSERT_CSTR_EQ((*++metadata.begin())->key, "key2");
+ ASSERT_CSTR_EQ((*++metadata.begin())->value, "");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_BackgroundCategory_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto bg_categories = GListRange<char*>(app->background_category);
+ ASSERT_EQ(Size(&bg_categories), 0);
+}
+
+TEST_F(ManifestTest, UIApplicationElement_BackgroundCategory_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto bg_categories = GListRange<char*>(app->background_category);
+ ASSERT_EQ(Size(&bg_categories), 1);
+ ASSERT_CSTR_EQ(*bg_categories.begin(), "bgcategory");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_BackgroundCategory_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_BackgroundCategory_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto bg_categories = GListRange<char*>(app->background_category);
+ ASSERT_EQ(Size(&bg_categories), 2);
+ ASSERT_CSTR_EQ(*bg_categories.begin(), "bgcategory1");
+ ASSERT_CSTR_EQ(*++bg_categories.begin(), "bgcategory2");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_DataControl_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto datacontrols = GListRange<datacontrol_x*>(app->datacontrol);
+ ASSERT_EQ(Size(&datacontrols), 0);
+}
+
+TEST_F(ManifestTest, UIApplicationElement_DataControl_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto datacontrols = GListRange<datacontrol_x*>(app->datacontrol);
+ ASSERT_EQ(Size(&datacontrols), 1);
+ ASSERT_CSTR_EQ((*datacontrols.begin())->providerid, "providerid");
+ ASSERT_CSTR_EQ((*datacontrols.begin())->access, "access");
+ ASSERT_CSTR_EQ((*datacontrols.begin())->type, "type");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_DataControl_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto datacontrols = GListRange<datacontrol_x*>(app->datacontrol);
+ ASSERT_EQ(Size(&datacontrols), 2);
+ ASSERT_CSTR_EQ((*datacontrols.begin())->providerid, "providerid1");
+ ASSERT_CSTR_EQ((*datacontrols.begin())->access, "access1");
+ ASSERT_CSTR_EQ((*datacontrols.begin())->type, "type1");
+ ASSERT_CSTR_EQ((*++datacontrols.begin())->providerid, "providerid2");
+ ASSERT_CSTR_EQ((*++datacontrols.begin())->access, "access2");
+ ASSERT_CSTR_EQ((*++datacontrols.begin())->type, "type2");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_AppControl_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 0);
+}
+
+TEST_F(ManifestTest, UIApplicationElement_AppControl_Operation_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 0);
+}
+
+TEST_F(ManifestTest, UIApplicationElement_AppControl_Operation_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_AppControl_Operation_Invalid_NotURI) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_AppControl_Mime_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_AppControl_Uri_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_AppControl_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 1);
+ ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
+ "http://tizen.org/appcontrol/operation/compose");
+ ASSERT_CSTR_EQ((*appcontrols.begin())->uri, "scheme://");
+ ASSERT_CSTR_EQ((*appcontrols.begin())->mime, "application/pdf");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_AppControl_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 2);
+ ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
+ "http://tizen.org/appcontrol/operation/compose");
+ ASSERT_CSTR_EQ((*appcontrols.begin())->uri, "scheme://");
+ ASSERT_CSTR_EQ((*appcontrols.begin())->mime, "application/pdf");
+ ASSERT_CSTR_EQ((*++appcontrols.begin())->operation,
+ "http://tizen.org/appcontrol/operation/compose2");
+ ASSERT_CSTR_EQ((*++appcontrols.begin())->uri, "scheme2://");
+ ASSERT_CSTR_EQ((*++appcontrols.begin())->mime, "application/text");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_AppControl_SkipUri) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 1);
+ ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
+ "http://tizen.org/appcontrol/operation/compose");
+ ASSERT_EQ((*appcontrols.begin())->uri, nullptr);
+ ASSERT_CSTR_EQ((*appcontrols.begin())->mime, "application/pdf");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_AppControl_SkipMime) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 1);
+ ASSERT_CSTR_EQ((*appcontrols.begin())->operation,
+ "http://tizen.org/appcontrol/operation/compose");
+ ASSERT_CSTR_EQ((*appcontrols.begin())->uri, "scheme://");
+ ASSERT_EQ((*appcontrols.begin())->mime, nullptr);
+}
+
+TEST_F(ManifestTest, UIApplicationElement_AppControl_CartesianProduct) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 8);
+
+ std::vector<boost::tuple<std::string, std::string, std::string>>
+ found_app_controls;
+ for (auto& item : appcontrols) {
+ found_app_controls.emplace_back(item->operation, item->uri, item->mime);
+ }
+
+ for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
+ "http://tizen.org/appcontrol/operation/compose2"}) {
+ for (auto uri : {"scheme1://", "scheme2://"}) {
+ for (auto mime : {"application/text", "application/pdf"}) {
+ ASSERT_IN(boost::make_tuple(operation, uri, mime), found_app_controls);
+ }
+ }
+ }
+}
+
+TEST_F(ManifestTest,
+ UIApplicationElement_AppControl_CartesianProduct_SkipMime) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 4);
+
+ std::vector<boost::tuple<std::string, std::string, std::string>>
+ found_app_controls;
+ for (auto& item : appcontrols) {
+ ASSERT_EQ(item->mime, nullptr);
+ found_app_controls.emplace_back(item->operation, item->uri, "");
+ }
+
+ for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
+ "http://tizen.org/appcontrol/operation/compose2"}) {
+ for (auto uri : {"scheme1://", "scheme2://"}) {
+ ASSERT_IN(boost::make_tuple(operation, uri, ""), found_app_controls);
+ }
+ }
+}
+
+TEST_F(ManifestTest, UIApplicationElement_AppControl_CartesianProduct_SkipUri) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
+ ASSERT_EQ(Size(&appcontrols), 4);
+
+ std::vector<boost::tuple<std::string, std::string, std::string>>
+ found_app_controls;
+ for (auto& item : appcontrols) {
+ ASSERT_EQ(item->uri, nullptr);
+ found_app_controls.emplace_back(item->operation, "", item->mime);
+ }
+
+ for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
+ "http://tizen.org/appcontrol/operation/compose2"}) {
+ for (auto mime : {"application/text", "application/pdf"}) {
+ ASSERT_IN(boost::make_tuple(operation, "", mime), found_app_controls);
+ }
+ }
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Icon_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto icons = GListRange<icon_x*>(app->icon);
+ ASSERT_EQ(Size(&icons), 0);
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Icon_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, UIApplicationElement_Icon_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto icons = GListRange<icon_x*>(app->icon);
+ ASSERT_EQ(Size(&icons), 1);
+ ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
+ "test_icon.png");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_SetManifestXDefaults) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->package, "package0id");
+ ASSERT_CSTR_EQ(m->version, "1.0.0");
+ ASSERT_CSTR_EQ(m->installlocation, "auto");
+ ASSERT_CSTR_EQ(m->appsetting, "false");
+ ASSERT_CSTR_EQ(m->type, "tpk");
+ ASSERT_NE(m->installed_time, nullptr);
+ ASSERT_CSTR_EQ(m->mainapp_id, "package0id.appid");
+ ASSERT_CSTR_EQ(m->nodisplay_setting, "false");
+ ASSERT_CSTR_EQ(m->support_disable, "false");
+ ASSERT_CSTR_EQ(m->api_version, "2.3");
+ auto apps = GListRange<application_x*>(m->application);
+ ASSERT_EQ(Size(&apps), 1);
+ application_x* app = *apps.begin();
+ ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+ ASSERT_NE(app->exec, nullptr);
+ ASSERT_CSTR_EQ(app->nodisplay, "false");
+ ASSERT_CSTR_EQ(app->multiple, "false");
+ ASSERT_CSTR_EQ(app->taskmanage, "true");
+ ASSERT_CSTR_EQ(app->hwacceleration, "default");
+ ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
+ ASSERT_CSTR_EQ(app->component_type, "uiapp");
+ ASSERT_CSTR_EQ(app->mainapp, "true");
+ ASSERT_CSTR_EQ(app->recentimage, "false");
+ ASSERT_CSTR_EQ(app->launchcondition, "false");
+ ASSERT_CSTR_EQ(app->indicatordisplay, "true");
+ ASSERT_CSTR_EQ(app->effectimage_type, "image");
+ ASSERT_CSTR_EQ(app->guestmode_visibility, "true");
+ ASSERT_CSTR_EQ(app->permission_type, "normal");
+ ASSERT_CSTR_EQ(app->component_type, "uiapp");
+ ASSERT_CSTR_EQ(app->submode, "false");
+ ASSERT_CSTR_EQ(app->process_pool, "false");
+}
+
+TEST_F(ManifestTest, UIApplicationElement_SplashScreens_Duplicated_Entry) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto apps = GListRange<application_x*>(m->application);
+ ASSERT_EQ(Size(&apps), 1);
+ application_x* app = *apps.begin();
+ auto splashscreens = GListRange<splashscreen_x*>(app->splashscreens);
+ ASSERT_EQ(splashscreens.Size(), 2);
+ auto root_path = runner.GetRootApplicationPath();
+ std::string pkgid = "package0id";
+ auto src_directory = root_path / pkgid / "shared" / "res";
+ auto test1 = src_directory / "test1.jpg";
+ auto it = splashscreens.begin();
+ ASSERT_CSTR_EQ((*it)->src, test1.c_str());
+ ASSERT_CSTR_EQ((*it)->type, "img");
+ ASSERT_CSTR_EQ((*it)->dpi, "hdpi");
+ ASSERT_CSTR_EQ((*it)->orientation, "landscape");
+ ASSERT_CSTR_EQ((*it)->operation,
+ "http://tizen.org/appcontrol/operation/default");
+ it++;
+ ASSERT_CSTR_EQ((*it)->src, test1.c_str());
+ ASSERT_CSTR_EQ((*it)->type, "img");
+ ASSERT_CSTR_EQ((*it)->dpi, "hdpi");
+ ASSERT_CSTR_EQ((*it)->orientation, "landscape");
+ ASSERT_CSTR_EQ((*it)->operation,
+ "http://tizen.org/appcontrol/operation/test_operation");
+}
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include "smoke_tests/manifest_test.h"
+
+namespace bf = boost::filesystem;
+namespace ci = common_installer;
+
+TEST_F(ManifestTest, WatchApplicationElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->package, "package0id");
+ auto apps = GListRange<application_x*>(m->application);
+ ASSERT_EQ(Size(&apps), 1);
+ application_x* app = *apps.begin();
+ ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+ ASSERT_CSTR_EQ(app->component_type, "watchapp");
+}
+
+TEST_F(ManifestTest, WatchApplicationElement_Appid_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WatchApplicationElement_Appid_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WatchApplicationElement_Label_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->label);
+ ASSERT_EQ(Size(&labels), 0);
+}
+
+TEST_F(ManifestTest, WatchApplicationElement_Label_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->label);
+ ASSERT_EQ(Size(&labels), 1);
+ ASSERT_CSTR_EQ((*labels.begin())->text, "label");
+ ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
+}
+
+TEST_F(ManifestTest, WatchApplicationElement_Label_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WatchApplicationElement_Icon_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto icons = GListRange<icon_x*>(app->icon);
+ ASSERT_EQ(Size(&icons), 0);
+}
+
+TEST_F(ManifestTest, WatchApplicationElement_Icon_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WatchApplicationElement_Icon_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto icons = GListRange<icon_x*>(app->icon);
+ ASSERT_EQ(Size(&icons), 1);
+ ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
+ "test_icon.png");
+}
+
+TEST_F(ManifestTest, WatchApplicationElement_AmbientSupport_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->support_ambient, "false");
+}
+
+TEST_F(ManifestTest, WatchApplicationElement_AmbientSupport_False) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->support_ambient, "false");
+}
+
+
+TEST_F(ManifestTest, WatchApplicationElement_AmbientSupport_True) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->support_ambient, "true");
+}
+
+TEST_F(ManifestTest, WatchApplicationElement_AmbientSupport_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WatchApplicationElement_SetManifestXDefaults) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->package, "package0id");
+ ASSERT_CSTR_EQ(m->version, "1.0.0");
+ ASSERT_CSTR_EQ(m->installlocation, "auto");
+ ASSERT_CSTR_EQ(m->appsetting, "false");
+ ASSERT_CSTR_EQ(m->type, "tpk");
+ ASSERT_NE(m->installed_time, nullptr);
+ ASSERT_CSTR_EQ(m->mainapp_id, "package0id.appid");
+ ASSERT_CSTR_EQ(m->nodisplay_setting, "false");
+ ASSERT_CSTR_EQ(m->support_disable, "false");
+ ASSERT_CSTR_EQ(m->api_version, "2.3");
+ auto apps = GListRange<application_x*>(m->application);
+ ASSERT_EQ(Size(&apps), 1);
+ application_x* app = *apps.begin();
+ ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+ ASSERT_NE(app->exec, nullptr);
+ ASSERT_CSTR_EQ(app->nodisplay, "true");
+ ASSERT_CSTR_EQ(app->multiple, "false");
+ ASSERT_CSTR_EQ(app->taskmanage, "false");
+ ASSERT_CSTR_EQ(app->hwacceleration, "default");
+ ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
+ ASSERT_CSTR_EQ(app->component_type, "watchapp");
+ ASSERT_CSTR_EQ(app->mainapp, "true");
+ ASSERT_CSTR_EQ(app->recentimage, "false");
+ ASSERT_CSTR_EQ(app->launchcondition, "false");
+ ASSERT_CSTR_EQ(app->indicatordisplay, "true");
+ ASSERT_CSTR_EQ(app->effectimage_type, "image");
+ ASSERT_CSTR_EQ(app->guestmode_visibility, "true");
+ ASSERT_CSTR_EQ(app->permission_type, "normal");
+ ASSERT_CSTR_EQ(app->submode, "false");
+ ASSERT_CSTR_EQ(app->process_pool, "false");
+}
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include "smoke_tests/manifest_test.h"
+
+namespace bf = boost::filesystem;
+namespace ci = common_installer;
+
+TEST_F(ManifestTest, WidgetApplicationElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->package, "package0id");
+ auto apps = GListRange<application_x*>(m->application);
+ ASSERT_EQ(Size(&apps), 1);
+ application_x* app = *apps.begin();
+ ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+ ASSERT_CSTR_EQ(app->component_type, "widgetapp");
+}
+
+TEST_F(ManifestTest, WidgetApplicationElement_Appid_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WidgetApplicationElement_Appid_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WidgetApplicationElement_Label_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->label);
+ ASSERT_EQ(Size(&labels), 0);
+}
+
+TEST_F(ManifestTest, WidgetApplicationElement_Label_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->label);
+ ASSERT_EQ(Size(&labels), 1);
+ ASSERT_CSTR_EQ((*labels.begin())->text, "label");
+ ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
+}
+
+TEST_F(ManifestTest, WidgetApplicationElement_Label_Text_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WidgetApplicationElement_Label_Lang_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WidgetApplicationElement_Label_Many) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto labels = GListRange<label_x*>(app->label);
+ ASSERT_EQ(Size(&labels), 2);
+ ASSERT_CSTR_EQ((*labels.begin())->text, "label");
+ ASSERT_CSTR_EQ((*labels.begin())->lang, DEFAULT_LOCALE);
+ ASSERT_CSTR_EQ((*++labels.begin())->text, "label_GB");
+ ASSERT_CSTR_EQ((*++labels.begin())->lang, "en-GB");
+}
+
+TEST_F(ManifestTest, WidgetApplicationElement_Label_Many_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WidgetApplicationElement_Icon_Missing) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto icons = GListRange<icon_x*>(app->icon);
+ ASSERT_EQ(Size(&icons), 0);
+}
+
+TEST_F(ManifestTest, WidgetApplicationElement_Icon_Invalid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WidgetApplicationElement_Icon_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ application_x* app = GetSingleApp(runner.GetManifest());
+ ASSERT_NE(app, nullptr);
+ auto icons = GListRange<icon_x*>(app->icon);
+ ASSERT_EQ(Size(&icons), 1);
+ ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
+ "test_icon.png");
+}
+
+// preview, update-period, support-size are supposed to be parsed by plugin
+
+TEST_F(ManifestTest, WidgetApplicationElement_SetManifestXDefaults) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->package, "package0id");
+ ASSERT_CSTR_EQ(m->version, "1.0.0");
+ ASSERT_CSTR_EQ(m->installlocation, "auto");
+ ASSERT_CSTR_EQ(m->appsetting, "false");
+ ASSERT_CSTR_EQ(m->type, "tpk");
+ ASSERT_NE(m->installed_time, nullptr);
+ ASSERT_CSTR_EQ(m->mainapp_id, "package0id.appid");
+ ASSERT_CSTR_EQ(m->nodisplay_setting, "false");
+ ASSERT_CSTR_EQ(m->support_disable, "false");
+ ASSERT_CSTR_EQ(m->api_version, "2.3");
+ auto apps = GListRange<application_x*>(m->application);
+ ASSERT_EQ(Size(&apps), 1);
+ application_x* app = *apps.begin();
+ ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+ ASSERT_NE(app->exec, nullptr);
+ ASSERT_CSTR_EQ(app->nodisplay, "true");
+ ASSERT_CSTR_EQ(app->multiple, "false");
+ ASSERT_CSTR_EQ(app->taskmanage, "false");
+ ASSERT_CSTR_EQ(app->hwacceleration, "default");
+ ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
+ ASSERT_CSTR_EQ(app->component_type, "widgetapp");
+ ASSERT_CSTR_EQ(app->mainapp, "true");
+ ASSERT_CSTR_EQ(app->recentimage, "false");
+ ASSERT_CSTR_EQ(app->launchcondition, "false");
+ ASSERT_CSTR_EQ(app->indicatordisplay, "false");
+ ASSERT_CSTR_EQ(app->effectimage_type, "image");
+ ASSERT_CSTR_EQ(app->guestmode_visibility, "true");
+ ASSERT_CSTR_EQ(app->permission_type, "normal");
+ ASSERT_CSTR_EQ(app->submode, "false");
+ ASSERT_CSTR_EQ(app->process_pool, "false");
+}
--- /dev/null
+// Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include <boost/exception/diagnostic_information.hpp>
+#include <boost/program_options.hpp>
+
+#include <common/utils/subprocess.h>
+#include <unit_tests/common/smoke_utils.h>
+
+#include <gtest/gtest.h>
+
+#include <map>
+#include <string>
+#include <vector>
+
+#include "smoke_tests/tpk_smoke_utils.h"
+
+namespace bf = boost::filesystem;
+namespace bpo = boost::program_options;
+namespace ci = common_installer;
+
+enum class ReqType : int {
+ UNKNOWN_REQ,
+ INSTALL_REQ,
+ UNINSTALL_REQ,
+ UPDATE_REQ,
+ DELTA_REQ,
+ MOUNT_INSTALL_REQ,
+ MOUNT_UPDATE_REQ,
+};
+
+enum class BackupType : int {
+ MOVE,
+ COPY_AND_REMOVE,
+};
+
+std::map<ReqType, std::string> install_req_filter = {
+ { ReqType::INSTALL_REQ, "SmokeTest.RecoveryMode_Tpk_Installation" },
+ { ReqType::UNINSTALL_REQ, "SmokeTest.RecoveryMode_Tpk_Uninstallation" },
+ { ReqType::UPDATE_REQ, "SmokeTest.RecoveryMode_Tpk_Update" },
+ { ReqType::DELTA_REQ, "SmokeTest.RecoveryMode_ForDelta" },
+ { ReqType::MOUNT_INSTALL_REQ, "SmokeTest.RecoveryMode_ForMountInstall" },
+ { ReqType::MOUNT_UPDATE_REQ, "SmokeTest.RecoveryMode_ForMountUpdate" }
+};
+
+int delay = 1000000;
+int interval = 500000;
+int test_count = 0;
+
+namespace smoke_test {
+
+class SmokeEnvironment : public testing::Environment {
+ public:
+ explicit SmokeEnvironment(ci::RequestMode mode, bool no_backup,
+ BackupType backup_type) :
+ request_mode_(mode), no_backup_(no_backup),
+ backup_type_(backup_type) {
+ }
+
+ void SetUp() override {
+ if (request_mode_ == ci::RequestMode::USER) {
+ ASSERT_TRUE(AddTestUser(&test_user));
+ }
+ if (no_backup_)
+ return;
+ backups_ = SetupBackupDirectories(test_user.uid);
+ if (backup_type_ == BackupType::MOVE) {
+ for (auto& path : backups_)
+ ASSERT_TRUE(BackupPath(path));
+ } else if (backup_type_ == BackupType::COPY_AND_REMOVE) {
+ for (auto& path : backups_)
+ ASSERT_TRUE(BackupPathCopyAndRemove(path));
+ }
+ }
+
+ void TearDown() override {
+ test_count++;
+ ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL ||
+ (request_mode_ == ci::RequestMode::USER &&
+ kGlobalUserUid != test_user.uid));
+
+ ci::PkgQueryInterface pkg_query("recoverypkg", test_user.uid, true);
+ if (pkg_query.IsPackageInstalled()) {
+ TpkSmokeTestHelperRunner backend;
+ SmokeTestHelperRunner::Result ret =
+ backend.UninstallWithSubprocess("recoverypkg", test_user.uid);
+ ASSERT_EQ(ret, SmokeTestHelperRunner::Result::SUCCESS);
+ }
+
+ if (request_mode_ == ci::RequestMode::USER) {
+ ASSERT_TRUE(DeleteTestUser());
+ }
+ if (no_backup_)
+ return;
+ if (backup_type_ == BackupType::MOVE) {
+ for (auto& path : backups_)
+ ASSERT_TRUE(RestorePath(path));
+ } else if (backup_type_ == BackupType::COPY_AND_REMOVE) {
+ for (auto& path : backups_)
+ ASSERT_TRUE(RestorePathCopyAndRemove(path));
+ }
+ }
+
+ User test_user;
+
+ private:
+ ci::RequestMode request_mode_;
+ std::vector<bf::path> backups_;
+ bool no_backup_;
+ BackupType backup_type_;
+};
+
+} // namespace smoke_test
+
+namespace {
+
+smoke_test::SmokeEnvironment *env = nullptr;
+
+void signalHandler(int signum) {
+ env->TearDown();
+ exit(signum);
+}
+
+} // namespace
+
+namespace smoke_test {
+
+class SmokeTest : public testing::Test {
+ public:
+ SmokeTest() : params{PackageType::TPK, false} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+
+ protected:
+ TpkSmokeTestHelperRunner backend;
+ TestParameters params;
+};
+
+TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+
+ bf::path path = kSmokePackagesDirectory / "RecoveryPkg.tpk";
+ int wait_time = delay + interval * test_count;
+
+ SmokeTestHelperRunner::Result ret = backend.InstallWithSubprocessAndKill(
+ path, params.test_user.uid, wait_time);
+ if (ret == SmokeTestHelperRunner::Result::SUCCESS) {
+ std::cout << "install finished before process killed" << std::endl;
+ return;
+ }
+ ASSERT_EQ(ret, SmokeTestHelperRunner::Result::KILLED);
+ std::string pkgid = "recoverypkg";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ if (recovery_file.empty()) {
+ std::cout << "recovery file dosen't exist, "
+ "this test is skipped" << std::endl;
+ return;
+ }
+ ASSERT_EQ(backend.RecoveryWithSubprocess(recovery_file, params.test_user.uid),
+ SmokeTestHelperRunner::Result::SUCCESS);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_Tpk_Uninstallation) {
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+ bf::path path = kSmokePackagesDirectory / "RecoveryPkg.tpk";
+
+ SmokeTestHelperRunner::Result ret = backend.InstallWithSubprocess(
+ path, params.test_user.uid);
+ if (ret != SmokeTestHelperRunner::Result::SUCCESS) {
+ std::cout << "failed to install package before uninstall" << std::endl;
+ return;
+ }
+
+ std::string pkgid = "recoverypkg";
+ int wait_time = delay + interval * test_count;
+ ret = backend.UninstallWithSubprocessAndKill(
+ pkgid, params.test_user.uid, wait_time);
+ if (ret == SmokeTestHelperRunner::Result::SUCCESS) {
+ std::cout << "uninstall finished before process killed" << std::endl;
+ return;
+ }
+ ASSERT_EQ(ret, SmokeTestHelperRunner::Result::KILLED);
+
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ if (recovery_file.empty()) {
+ std::cout << "recovery file dosen't exist, "
+ "this test is skipped" << std::endl;
+ return;
+ }
+ ASSERT_EQ(backend.RecoveryWithSubprocess(recovery_file, params.test_user.uid),
+ SmokeTestHelperRunner::Result::SUCCESS);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+
+ bf::path path_old = kSmokePackagesDirectory / "RecoveryPkg.tpk";
+ bf::path path_new = kSmokePackagesDirectory / "RecoveryPkg2.tpk";
+ int wait_time = delay + interval * test_count;
+
+ ASSERT_EQ(backend.InstallWithSubprocess(path_old, params.test_user.uid),
+ SmokeTestHelperRunner::Result::SUCCESS);
+
+ SmokeTestHelperRunner::Result ret = backend.InstallWithSubprocessAndKill(
+ path_new, params.test_user.uid, wait_time);
+ if (ret == SmokeTestHelperRunner::Result::SUCCESS) {
+ std::cout << "update finished before process killed" << std::endl;
+ return;
+ }
+ ASSERT_EQ(ret, SmokeTestHelperRunner::Result::KILLED);
+
+ std::string pkgid = "recoverypkg";
+ std::string appid = "recoverypkg";
+ std::string exec = "recoverypkg";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ if (recovery_file.empty()) {
+ std::cout << "recovery file dosen't exist, "
+ "this test is skipped" << std::endl;
+ return;
+ }
+
+ std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
+ GetRecoverFileInfo(recovery_file);
+ ASSERT_EQ(backend.RecoveryWithSubprocess(recovery_file, params.test_user.uid),
+ SmokeTestHelperRunner::Result::SUCCESS);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION",
+ recovery_info->cleanup() ? "2\n" : "1\n", params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForDelta) {
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+
+ bf::path path_old = kSmokePackagesDirectory / "RecoveryPkg.tpk";
+ bf::path path_new = kSmokePackagesDirectory / "RecoveryPkg.delta";
+ int wait_time = delay + interval * test_count;
+
+ ASSERT_EQ(backend.InstallWithSubprocess(path_old, params.test_user.uid),
+ SmokeTestHelperRunner::Result::SUCCESS);
+
+ SmokeTestHelperRunner::Result ret = backend.InstallWithSubprocessAndKill(
+ path_new, params.test_user.uid, wait_time);
+ if (ret == SmokeTestHelperRunner::Result::SUCCESS) {
+ std::cout << "delta finished before process killed" << std::endl;
+ return;
+ }
+ ASSERT_EQ(ret, SmokeTestHelperRunner::Result::KILLED);
+
+ std::string pkgid = "recoverypkg";
+ std::string appid = "recoverypkg";
+ std::string exec = "recoverypkg";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+ params.test_user.uid);
+ if (recovery_file.empty()) {
+ std::cout << "recovery file dosen't exist, "
+ "this test is skipped" << std::endl;
+ return;
+ }
+
+ std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
+ GetRecoverFileInfo(recovery_file);
+ ASSERT_EQ(backend.RecoveryWithSubprocess(recovery_file, params.test_user.uid),
+ SmokeTestHelperRunner::Result::SUCCESS);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION",
+ recovery_info->cleanup() ? "2\n" : "1\n", params));
+ bool deleted_exist = bf::exists(root_path / pkgid / "res/DELETED");
+ bool added_exist = bf::exists(root_path / pkgid / "res/ADDED");
+ ASSERT_NE(deleted_exist, added_exist);
+ ASSERT_TRUE(recovery_info->cleanup() ? added_exist : deleted_exist);
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+
+ bf::path path = kSmokePackagesDirectory / "RecoveryPkg.tpk";
+ int wait_time = delay + interval * test_count;
+
+ SmokeTestHelperRunner::Result ret = backend.MountInstallWithSubprocessAndKill(
+ path, params.test_user.uid, wait_time);
+ if (ret == SmokeTestHelperRunner::Result::SUCCESS) {
+ std::cout << "mount install finished before process killed" << std::endl;
+ return;
+ }
+
+ std::string pkgid = "recoverypkg";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ if (recovery_file.empty()) {
+ std::cout << "recovery file dosen't exist, "
+ "this test is skipped" << std::endl;
+ return;
+ }
+ ASSERT_EQ(backend.RecoveryWithSubprocess(recovery_file, params.test_user.uid),
+ SmokeTestHelperRunner::Result::SUCCESS);
+
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+
+ bf::path path_old =
+ kSmokePackagesDirectory / "RecoveryPkg.tpk";
+ bf::path path_new =
+ kSmokePackagesDirectory / "RecoveryPkg2.tpk";
+ int wait_time = delay + interval * test_count;
+
+ ASSERT_EQ(backend.MountInstallWithSubprocess(path_old, params.test_user.uid),
+ SmokeTestHelperRunner::Result::SUCCESS);
+
+ SmokeTestHelperRunner::Result ret = backend.MountInstallWithSubprocessAndKill(
+ path_new, params.test_user.uid, wait_time);
+ if (ret == SmokeTestHelperRunner::Result::SUCCESS) {
+ std::cout << "mount update finished before process killed" << std::endl;
+ return;
+ }
+
+ std::string pkgid = "recoverypkg";
+ std::string appid = "recoverypkg";
+ std::string exec = "recoverypkg";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ if (recovery_file.empty()) {
+ std::cout << "recovery file dosen't exist, "
+ "this test is skipped" << std::endl;
+ return;
+ }
+
+ // Filesystem may be mounted after crash
+ ScopedTzipInterface poweroff_unmount_interface(pkgid, params.test_user.uid);
+ poweroff_unmount_interface.Release();
+
+ ASSERT_EQ(backend.RecoveryWithSubprocess(recovery_file, params.test_user.uid),
+ SmokeTestHelperRunner::Result::SUCCESS);
+
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "res/VERSION", "1\n", params));
+}
+
+} // namespace smoke_test
+
+const int kBufSize = 1024;
+
+int main(int argc, char** argv) {
+ try {
+ bool no_backup = false;
+ int repeat_count = 10;
+ ReqType req_type = ReqType::UNKNOWN_REQ;
+ bool repeat = false;
+ BackupType backup_type = BackupType::MOVE;
+ ci::RequestMode request_mode = smoke_test::ParseRequestMode(argc, argv);
+ if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL)
+ std::cout << "Run recovery test with user request mode" << std::endl;
+
+ bpo::options_description options("Allowed options");
+ bpo::variables_map opt_map;
+ options.add_options()
+ ("help", "display this help message")
+ ("install",
+ "recovery test for forced termination "
+ "during package installing")
+ ("uninstall",
+ "recovery test for forced termination "
+ "during package uninstallation")
+ ("update",
+ "recovery test for forced termination "
+ "during package updating")
+ ("delta",
+ "recovery test for forced termination "
+ "during package delta installing")
+ ("mount-install",
+ "recovery test for forced termination "
+ "during package mount-installing")
+ ("mount-update",
+ "recovery test for forced termination "
+ "during package mount-updating")
+ ("delay", bpo::value<int>(), "fixed delay for forced termination\n"
+ "unit : microsecond (ex. 1000000us = 1s)")
+ ("interval", bpo::value<int>(),
+ "use with repeat option.\n"
+ "as it repeat the interval is added to delay\n"
+ "unit : microsecond (ex. 1000000us = 1s)")
+ ("repeat", bpo::value<int>(), "option for performing tests repeatedly\n"
+ "enter -1 to test infinitely")
+ ("no-backup", "Do test without backup")
+ ("backup-type", bpo::value<std::string>(), "<move|copy> set test's "
+ "backup type \'move\', \'copy and remove\'");
+ bpo::store(bpo::command_line_parser(argc, argv).
+ options(options).allow_unregistered().run(), opt_map);
+ if (opt_map.count("help")) {
+ std::cerr << options << std::endl;
+ return -1;
+ }
+
+ if (opt_map.count("install"))
+ req_type = ReqType::INSTALL_REQ;
+ if (opt_map.count("uninstall"))
+ req_type = ReqType::UNINSTALL_REQ;
+ else if (opt_map.count("update"))
+ req_type = ReqType::UPDATE_REQ;
+ else if (opt_map.count("delta"))
+ req_type = ReqType::DELTA_REQ;
+ else if (opt_map.count("mount-install"))
+ req_type = ReqType::MOUNT_INSTALL_REQ;
+ else if (opt_map.count("mount-update"))
+ req_type = ReqType::MOUNT_UPDATE_REQ;
+
+ if (opt_map.count("delay"))
+ delay = opt_map["delay"].as<int>();
+
+ if (opt_map.count("interval"))
+ interval = opt_map["interval"].as<int>();
+
+ if (opt_map.count("repeat")) {
+ repeat = true;
+ repeat_count = opt_map["repeat"].as<int>();
+ }
+
+ if (opt_map.count("no-backup"))
+ no_backup = true;
+ if (opt_map.count("backup-type")) {
+ if (opt_map["backup-type"].as<std::string>() == "move") {
+ backup_type = BackupType::MOVE;
+ } else if (opt_map["backup-type"].as<std::string>() == "copy") {
+ backup_type = BackupType::COPY_AND_REMOVE;
+ } else {
+ std::cerr << options << std::endl;
+ return -1;
+ }
+ }
+ bpo::notify(opt_map);
+
+ if (req_type == ReqType::UNKNOWN_REQ) {
+ std::cerr << options << std::endl;
+ return 0;
+ }
+
+ testing::GTEST_FLAG(filter) = install_req_filter[req_type];
+ if (repeat) {
+ testing::GTEST_FLAG(repeat) = repeat_count;
+ testing::GTEST_FLAG(break_on_failure) = true;
+ }
+
+ testing::InitGoogleTest(&argc, argv);
+ ::env = static_cast<smoke_test::SmokeEnvironment*>(
+ testing::AddGlobalTestEnvironment(
+ new smoke_test::SmokeEnvironment(request_mode,
+ no_backup, backup_type)));
+ signal(SIGINT, ::signalHandler);
+ signal(SIGSEGV, ::signalHandler);
+ return RUN_ALL_TESTS();
+ } catch (...) {
+ std::cout << "Exception occurred during testing" << std::endl;
+ return 1;
+ }
+}
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include <boost/exception/diagnostic_information.hpp>
+#include <boost/program_options.hpp>
+
+#include <common/utils/subprocess.h>
+#include <common/utils/file_util.h>
+#include <common/utils/pkgmgr_query.h>
+#include <unit_tests/common/smoke_utils.h>
+
+#include <gtest/gtest.h>
+#include <gtest/gtest-death-test.h>
+
+#include "smoke_tests/tpk_smoke_utils.h"
+
+namespace st = smoke_test;
+namespace bf = boost::filesystem;
+namespace bs = boost::system;
+namespace ci = common_installer;
+namespace bpo = boost::program_options;
+
+enum class BackupType : int {
+ MOVE,
+ COPY_AND_REMOVE,
+};
+
+namespace smoke_test {
+
+class SmokeEnvironment : public testing::Environment {
+ public:
+ explicit SmokeEnvironment(ci::RequestMode mode, bool no_backup,
+ BackupType backup_type) :
+ request_mode_(mode), no_backup_(no_backup),
+ backup_type_(backup_type) {
+ }
+ void SetUp() override {
+ if (request_mode_ == ci::RequestMode::USER) {
+ ASSERT_TRUE(AddTestUser(&test_user));
+ }
+ if (no_backup_)
+ return;
+ backups_ = SetupBackupDirectories(test_user.uid);
+ if (backup_type_ == BackupType::MOVE) {
+ for (auto& path : backups_)
+ ASSERT_TRUE(BackupPath(path));
+ } else if (backup_type_ == BackupType::COPY_AND_REMOVE) {
+ for (auto& path : backups_)
+ ASSERT_TRUE(BackupPathCopyAndRemove(path));
+ }
+ }
+ void TearDown() override {
+ ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL ||
+ (request_mode_ == ci::RequestMode::USER &&
+ kGlobalUserUid != test_user.uid));
+ TpkBackendInterface backend(std::to_string(test_user.uid));
+ UninstallAllSmokeApps(request_mode_, test_user.uid, &backend);
+ if (request_mode_ == ci::RequestMode::USER) {
+ ASSERT_TRUE(DeleteTestUser());
+ }
+ if (no_backup_)
+ return;
+ if (backup_type_ == BackupType::MOVE) {
+ for (auto& path : backups_)
+ ASSERT_TRUE(RestorePath(path));
+ } else if (backup_type_ == BackupType::COPY_AND_REMOVE) {
+ for (auto& path : backups_)
+ ASSERT_TRUE(RestorePathCopyAndRemove(path));
+ }
+ }
+ User test_user;
+
+ private:
+ ci::RequestMode request_mode_;
+ std::vector<bf::path> backups_;
+ bool no_backup_;
+ BackupType backup_type_;
+};
+
+} // namespace smoke_test
+
+namespace {
+
+smoke_test::SmokeEnvironment *env = nullptr;
+void signalHandler(int signum) {
+ env->TearDown();
+ exit(signum);
+}
+
+} // namespace
+
+namespace smoke_test {
+
+class SmokeTest : public testing::Test {
+ public:
+ SmokeTest() : backend(std::to_string(env->test_user.uid)),
+ params{PackageType::TPK, false} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+ protected:
+ TpkBackendInterface backend;
+ TestParameters params;
+};
+
+class RollbackSmokeTest : public testing::Test {
+ public:
+ RollbackSmokeTest() : backend(std::to_string(env->test_user.uid),
+ RequestResult::FAIL), params{PackageType::TPK, false} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+ protected:
+ TpkBackendInterface backend;
+ TestParameters params;
+};
+
+class PreloadSmokeTest : public testing::Test {
+ public:
+ PreloadSmokeTest() : backend(std::to_string(env->test_user.uid)),
+ params{PackageType::TPK, true} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+ protected:
+ TpkBackendInterface backend;
+ TestParameters params;
+};
+
+// TODO(b.kunikowski): New smoke app pkgid name convention.
+// Change all smokeapp pkgids to smoketpk, because now there
+// may be some smoke app pkgid identical as in tpk smoke tests, and this may
+// cause bad results of some smoke tests.
+
+TEST_F(SmokeTest, DeltaMode_Tpk) {
+ bf::path path = kSmokePackagesDirectory / "DeltaMode_Tpk.tpk";
+ bf::path delta_package = kSmokePackagesDirectory / "DeltaMode_Tpk.delta";
+ std::string pkgid = "smokeapp18";
+ std::string appid = "smokeapp18.DeltaModeTpk";
+ std::string exec = "native";
+ ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+
+ // Check delta modifications
+ bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+ params.test_user.uid);
+ ASSERT_FALSE(bf::exists(root_path / pkgid / "DELETED"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "ADDED"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "native"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" / "native.png"));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "MODIFIED", "version 2\n",
+ params));
+}
+
+TEST_F(RollbackSmokeTest, DeltaMode) {
+ bf::path path = kSmokePackagesDirectory / "DeltaMode_Tpk_Rollback.tpk";
+ bf::path delta_package = kSmokePackagesDirectory /
+ "DeltaMode_Tpk_Rollback.delta";
+ std::string pkgid = "smoketpk28";
+ std::string appid = "smoketpk28.DeltaModeTpk_Rollback";
+ std::string exec = "basicdali";
+ ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::ERROR);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+
+ // Check delta modifications
+ bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+ params.test_user.uid);
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "DELETED"));
+ ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "ADDED"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "basicdali"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" /
+ "basicdali.png"));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "res/MODIFIED",
+ "version 1\n",
+ params));
+}
+
+TEST_F(SmokeTest, ReinstallMode_Tpk) {
+ bf::path path = kSmokePackagesDirectory / "ReinstallMode_Tpk.tpk";
+ bf::path rds_directory = kSmokePackagesDirectory / "delta_dir";
+ std::string pkgid = "smokeapp25";
+ std::string appid = "smokeapp25.ReinstallModeTpk";
+ std::string exec = "native";
+ bf::path sdk_expected_directory = kSdkDirectory / "tmp" / pkgid;
+ ASSERT_TRUE(ci::CopyDir(rds_directory, sdk_expected_directory));
+ ASSERT_EQ(backend.RDSUpdate(path, pkgid), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+
+ // Check rds modifications
+ bf::path root_path = ci::GetRootAppPath(false,
+ params.test_user.uid);
+ ASSERT_FALSE(bf::exists(root_path / pkgid / "DELETED"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "ADDED"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "native"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" / "native.png"));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "MODIFIED", "version 2\n",
+ params));
+}
+
+TEST_F(SmokeTest, InstallationMode_Tpk) {
+ bf::path path = kSmokePackagesDirectory / "InstallationMode_Tpk.tpk";
+ std::string pkgid = "smokeapp12";
+ std::string appid = "smokeapp12.InstallationModeTpk";
+ std::string exec = "native";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+}
+
+TEST_F(SmokeTest, UpdateMode_Tpk) {
+ bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Tpk.tpk";
+ bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Tpk_2.tpk";
+ std::string pkgid = "smokeapp13";
+ std::string appid = "smokeapp13.UpdateModeTpk";
+ std::string exec = "native";
+ ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "VERSION", "2\n", params));
+}
+
+TEST_F(SmokeTest, DeinstallationMode_Tpk) {
+ bf::path path = kSmokePackagesDirectory / "DeinstallationMode_Tpk.tpk";
+ std::string pkgid = "smokeapp14";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Uninstall(pkgid), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(SmokeTest, EnablePkg) {
+ bf::path path = kSmokePackagesDirectory / "EnablePkg.tpk";
+ std::string pkgid = "smokeapp22";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.DisablePackage(pkgid), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.EnablePackage(pkgid), ci::AppInstaller::Result::OK);
+ ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
+ ASSERT_TRUE(pkg_query.IsPackageInstalled(
+ ci::GetRequestMode(params.test_user.uid)));
+}
+
+TEST_F(SmokeTest, DisablePkg) {
+ bf::path path = kSmokePackagesDirectory / "DisablePkg.tpk";
+ std::string pkgid = "smokeapp23";
+ std::string appid = "smokeapp23.DisablePkg";
+ std::string exec = "=disablepkg";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.DisablePackage(pkgid), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ci::QueryIsDisabledPackage(pkgid, params.test_user.uid));
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
+ bf::path path = kSmokePackagesDirectory / "RecoveryMode_Tpk_Installation.tpk";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+ ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-i", path.string(), "-u", test_uid_str.c_str());
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ std::string pkgid = "smokeapp15";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
+ GetRecoverFileInfo(recovery_file);
+ ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+}
+
+TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
+ bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update.tpk";
+ bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update_2.tpk";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+ ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
+
+ std::string pkgid = "smokeapp16";
+ std::string appid = "smokeapp16.RecoveryModeTpkUpdate";
+ std::string exec = "native";
+ ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
+ std::string version_old = pkg_query.Version();
+
+ ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
+ GetRecoverFileInfo(recovery_file);
+ ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
+
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1", params));
+ ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+ ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
+ std::string version_recovered = pkg_query2.Version();
+ ASSERT_TRUE(version_old == version_recovered);
+}
+
+TEST_F(SmokeTest, MountInstallationMode_Tpk) {
+ bf::path path = kSmokePackagesDirectory / "MountInstallationMode_Tpk.tpk";
+ std::string pkgid = "smokeapp26";
+ std::string appid = "smokeapp26.MountInstallationModeTpk";
+ std::string exec = "native";
+ ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+}
+
+TEST_F(SmokeTest, MountUpdateMode_Tpk) {
+ bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode_Tpk.tpk";
+ bf::path path_new = kSmokePackagesDirectory / "MountUpdateMode_Tpk_2.tpk";
+ std::string pkgid = "smokeapp27";
+ std::string appid = "smokeapp27.MountUpdateModeTpk";
+ std::string exec = "native";
+ ASSERT_EQ(backend.MountInstallSuccess(path_old),
+ ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstall(path_new), ci::AppInstaller::Result::OK);
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "2\n",
+ params));
+}
+
+TEST_F(SmokeTest, MigrateLegacyExternalImage_Tpk) {
+ ASSERT_TRUE(CheckAvailableExternalPath());
+ bf::path path = kSmokePackagesDirectory / "InstallExternal_Tpk_2.tpk";
+ std::string pkgid = "smokeapp28";
+ std::string appid = "smokeapp28.InstallExternalTpk";
+ std::string exec = "smokeapp28";
+ bf::path legacy_path = kSmokePackagesDirectory / kLegacyExtImageDir;
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ if (test_uid_str == kDefaultUserIdStr ||
+ params.test_user.uid == kGlobalUserUid) {
+ ASSERT_EQ(backend.MigrateLegacyExternalImage(pkgid, path, legacy_path),
+ ci::AppInstaller::Result::OK);
+ ValidateExternalPackage(pkgid, {appid, exec}, params);
+ } else {
+ ASSERT_EQ(backend.MigrateLegacyExternalImage(pkgid, path, legacy_path),
+ ci::AppInstaller::Result::ERROR);
+ }
+}
+
+TEST_F(SmokeTest, InstallExternal_Tpk) {
+ ASSERT_TRUE(CheckAvailableExternalPath());
+ bf::path path = kSmokePackagesDirectory / "InstallExternal_Tpk.tpk";
+ std::string pkgid = "smokeapp29";
+ std::string appid = "smokeapp29.InstallExternalTpk";
+ std::string exec = "smokeapp29";
+ ASSERT_EQ(backend.InstallWithStorage(path, StorageType::EXTERNAL),
+ ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidateExternalPackage(pkgid, {appid, exec}, params));
+}
+
+#define TEP_TEST_STARTING_BLOCK(NUMBER) \
+ bf::path path = kSmokePackagesDirectory / "TEP_Tpk"; \
+ path += #NUMBER; \
+ path += ".tpk"; \
+ bf::path tep1 = kSmokePackagesDirectory / "tep1.tep"; \
+ bf::path tep2 = kSmokePackagesDirectory / "tep2.tep"; \
+ std::string number = std::to_string(50 + NUMBER - 1); \
+ std::string pkgid = std::string("smokeapp") + number; \
+ std::string appid = pkgid + ".TEP"; \
+ std::string exec = "native"; \
+
+TEST_F(SmokeTest, TEP_Tpk_TepInstall) {
+ TEP_TEST_STARTING_BLOCK(1)
+ ASSERT_EQ(backend.InstallWithTEP(path, tep1), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
+ params));
+}
+
+TEST_F(SmokeTest, TEP_Tpk_TepInstallTepUpdate) {
+ TEP_TEST_STARTING_BLOCK(2)
+ ASSERT_EQ(backend.InstallWithTEP(path, tep1), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithTEP(path, tep2), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep2.tep", "tep2\n",
+ params));
+}
+
+TEST_F(SmokeTest, TEP_Tpk_NoTepInstallTepUpdate) {
+ TEP_TEST_STARTING_BLOCK(3)
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithTEP(path, tep2), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep2.tep", "tep2\n",
+ params));
+}
+
+TEST_F(SmokeTest, TEP_Tpk_TepInstallNoTepUpdate) {
+ TEP_TEST_STARTING_BLOCK(4)
+ ASSERT_EQ(backend.InstallWithTEP(path, tep1), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
+ params));
+}
+
+TEST_F(RollbackSmokeTest, TEP_Tpk_TepInstallTepUpdateRollback) {
+ TEP_TEST_STARTING_BLOCK(5)
+ ASSERT_EQ(backend.InstallSuccessWithTEP(path, tep1),
+ ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithTEP(path, tep2),
+ ci::AppInstaller::Result::ERROR);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
+ params));
+}
+
+TEST_F(RollbackSmokeTest, TEP_Tpk_NoTepInstallTepUpdateRollback) {
+ TEP_TEST_STARTING_BLOCK(6)
+ ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithTEP(path, tep2),
+ ci::AppInstaller::Result::ERROR);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+ params.test_user.uid);
+ bf::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
+ ASSERT_FALSE(bf::exists(tep_file));
+}
+
+TEST_F(RollbackSmokeTest, TEP_Tpk_TepInstallNoTepUpdateRollback) {
+ TEP_TEST_STARTING_BLOCK(7)
+ ASSERT_EQ(backend.InstallSuccessWithTEP(path, tep1),
+ ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
+ params));
+}
+
+TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstall) {
+ TEP_TEST_STARTING_BLOCK(8)
+ ASSERT_EQ(backend.MountInstallWithTEP(path, tep1),
+ ci::AppInstaller::Result::OK);
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
+ params));
+}
+
+TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstallTepUpdate) {
+ TEP_TEST_STARTING_BLOCK(9)
+ ASSERT_EQ(backend.MountInstallWithTEP(path, tep1),
+ ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstallWithTEP(path, tep2),
+ ci::AppInstaller::Result::OK);
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep2.tep", "tep2\n",
+ params));
+}
+
+TEST_F(SmokeTest, TEP_Tpk_Mount_NoTepInstallTepUpdate) {
+ TEP_TEST_STARTING_BLOCK(10)
+ ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstallWithTEP(path, tep2),
+ ci::AppInstaller::Result::OK);
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep2.tep", "tep2\n",
+ params));
+}
+
+TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstallNoTepUpdate) {
+ TEP_TEST_STARTING_BLOCK(11)
+ ASSERT_EQ(backend.MountInstallWithTEP(path, tep1),
+ ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
+ params));
+}
+
+TEST_F(RollbackSmokeTest, TEP_Tpk_Mount_TepInstallTepUpdateRollback) {
+ TEP_TEST_STARTING_BLOCK(12)
+ ASSERT_EQ(backend.MountInstallSuccessWithTEP(path, tep1),
+ ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstallWithTEP(path, tep2),
+ ci::AppInstaller::Result::ERROR);
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
+ params));
+}
+
+TEST_F(RollbackSmokeTest, TEP_Tpk_Mount_NoTepInstallTepUpdateRollback) {
+ TEP_TEST_STARTING_BLOCK(13)
+ ASSERT_EQ(backend.MountInstallSuccess(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstallWithTEP(path, tep2),
+ ci::AppInstaller::Result::ERROR);
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+ params.test_user.uid);
+ bf::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
+ ASSERT_FALSE(bf::exists(tep_file));
+}
+
+TEST_F(RollbackSmokeTest, TEP_Tpk_Mount_TepInstallNoTepUpdateRollback) {
+ TEP_TEST_STARTING_BLOCK(14)
+ ASSERT_EQ(backend.MountInstallSuccessWithTEP(path, tep1),
+ ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::ERROR);
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "tep/tep1.tep", "tep1\n",
+ params));
+}
+
+TEST_F(PreloadSmokeTest, InstallationMode_Preload) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path path = kSmokePackagesDirectory / "InstallationMode_Preload.tpk";
+ std::string pkgid = "smoketpk29";
+ std::string appid = "smoketpk29.InstallationModePreload";
+ std::string exec = "native";
+ ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+}
+
+TEST_F(PreloadSmokeTest, UpdateMode_Preload) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Preload.tpk";
+ bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Preload2.tpk";
+ std::string pkgid = "smoketpk30";
+ std::string appid = "smoketpk30.UpdateModePreload";
+ std::string exec = "native";
+ ASSERT_EQ(backend.InstallPreload(path_old), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallPreload(path_new), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "2", params));
+}
+
+TEST_F(PreloadSmokeTest, DeinstallationMode_Preload) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path path = kSmokePackagesDirectory / "DeinstallationMode_Preload.tpk";
+ std::string pkgid = "smoketpk31";
+ ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.UninstallPreload(pkgid), ci::AppInstaller::Result::OK);
+ CheckPackageNonExistance(pkgid, params);
+}
+
+TEST_F(SmokeTest, InstallationMode_GoodSignature) {
+ bf::path path =
+ kSmokePackagesDirectory / "InstallationMode_GoodSignature.tpk";
+ ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Install(path));
+}
+
+TEST_F(SmokeTest, InstallationMode_WrongSignature) {
+ bf::path path =
+ kSmokePackagesDirectory / "InstallationMode_WrongSignature.tpk";
+ ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.Install(path));
+}
+
+TEST_F(RollbackSmokeTest, InstallationMode_Rollback) {
+ bf::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.tpk";
+ std::string pkgid = "smoketpk34";
+ ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.Install(path));
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForDelta) {
+ bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.tpk";
+ bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+ ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Install(path_old));
+ ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ std::string pkgid = "smoketpk35";
+ std::string appid = "smoketpk35.RecoveryMode_ForDelta";
+ std::string exec = "smoketpk35";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
+ GetRecoverFileInfo(recovery_file);
+ ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Recover(recovery_file));
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/MODIFIED", "version 1",
+ params));
+ bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+ params.test_user.uid);
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "res/DELETED"));
+ ASSERT_FALSE(bf::exists(root_path / pkgid / "res/ADDED"));
+ ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+}
+
+TEST_F(RollbackSmokeTest, UpdateMode) {
+ bf::path old_path = kSmokePackagesDirectory / "UpdateMode_Rollback.tpk";
+ bf::path new_path = kSmokePackagesDirectory / "UpdateMode_Rollback2.tpk";
+ std::string pkgid = "smoketpk36";
+ std::string appid = "smoketpk36.UpdateMode_Rollback";
+ std::string exec = "smoketpk36";
+ ASSERT_EQ(ci::AppInstaller::Result::OK, backend.InstallSuccess(old_path));
+ ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
+ std::string version_old = pkg_query.Version();
+ ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.Install(new_path));
+
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1",
+ params));
+ ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
+ std::string version_rollbacked = pkg_query2.Version();
+ ASSERT_TRUE(version_old == version_rollbacked);
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
+ bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.tpk";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+ ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-w", path.string(), "-u", test_uid_str.c_str());
+ ASSERT_NE(0, backend_crash.Wait());
+
+ std::string pkgid = "smoketpk37";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
+ GetRecoverFileInfo(recovery_file);
+ ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Recover(recovery_file));
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
+ bf::path path_old =
+ kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate.tpk";
+ bf::path path_new =
+ kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate2.tpk";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+ ASSERT_EQ(ci::AppInstaller::Result::OK, backend.MountInstall(path_old));
+
+ std::string pkgid = "smoketpk38";
+ std::string appid = "smoketpk38.RecoveryMode_ForMountUpdate";
+ std::string exec = "smoketpk38";
+ ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
+ std::string version_old = pkg_query.Version();
+
+ ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-w", path_new.string(), "-u", test_uid_str.c_str());
+ ASSERT_NE(0, backend_crash.Wait());
+
+ // Filesystem may be mounted after crash
+ ScopedTzipInterface poweroff_unmount_interface(pkgid, params.test_user.uid);
+ poweroff_unmount_interface.Release();
+
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
+ GetRecoverFileInfo(recovery_file);
+ ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Recover(recovery_file));
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1", params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "shared/res/VERSION", "1",
+ params));
+ ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+ ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
+ std::string version_recovered = pkg_query2.Version();
+ ASSERT_TRUE(version_old == version_recovered);
+}
+
+TEST_F(RollbackSmokeTest, MountInstallationMode) {
+ bf::path path =
+ kSmokePackagesDirectory / "MountInstallationMode_Rollback.tpk";
+ std::string pkgid = "smoketpk39";
+ ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.MountInstall(path));
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(RollbackSmokeTest, MountUpdateMode) {
+ bf::path old_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback.tpk";
+ bf::path new_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback2.tpk";
+ std::string pkgid = "smoketpk40";
+ std::string appid = "smoketpk40.MountUpdateMode_Rollback";
+ std::string exec = "smoketpk40";
+ ASSERT_EQ(ci::AppInstaller::Result::OK,
+ backend.MountInstallSuccess(old_path));
+ ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
+ std::string version_old = pkg_query.Version();
+ ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.MountInstall(new_path));
+ ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
+
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1", params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "shared/res/VERSION", "1",
+ params));
+ ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
+ std::string version_rollbacked = pkg_query2.Version();
+ ASSERT_TRUE(version_old == version_rollbacked);
+}
+
+TEST_F(SmokeTest, ManifestDirectInstallMode) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path src_path = kSmokePackagesDirectory / "ManifestDirectInstallMode";
+ std::string pkgid = "smoketpk41";
+ std::string appid = "smoketpk41.ManifestDirectInstallMode";
+ std::string exec = "basicui";
+ bf::path pkg_path = ci::GetRootAppPath(params.is_readonly,
+ params.test_user.uid);
+
+ ci::CopyDir(src_path / pkgid, pkg_path / pkgid);
+ ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
+ ASSERT_FALSE(pkg_query.IsPackageInstalled(
+ ci::GetRequestMode(params.test_user.uid)));
+ ASSERT_EQ(backend.ManifestDirectInstall(pkgid), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+}
+
+TEST_F(SmokeTest, ManifestDirectUpdateMode) {
+ bf::path path = kSmokePackagesDirectory / "ManifestDirectUpdateMode.tpk";
+ std::string pkgid = "smoketpk42";
+ std::string appid = "smoketpk42.ManifestDirectUpdateMode";
+ std::string exec = "basicui";
+
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ int install_time = GetAppInstalledTime(appid.c_str(), params.test_user.uid);
+ ASSERT_EQ(backend.ManifestDirectInstall(pkgid), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(GetAppInstalledTime(appid.c_str(),
+ params.test_user.uid) > install_time)
+ << "Package is not updated (app installed time didn't change).";
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+}
+
+TEST_F(PreloadSmokeTest, ReadonlyUpdateInstallMode) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path path = kSmokePackagesDirectory / "ReadonlyUpdateInstallMode.tpk";
+ std::string pkgid = "smoketpk43";
+ std::string appid = "smoketpk43.ReadonlyUpdateInstallMode";
+ std::string exec = "basicui";
+
+ ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ValidatePackage(pkgid, {appid, exec}, params);
+ TestParameters nonreadonly_params(params);
+ nonreadonly_params.is_readonly = false;
+ ValidatePackage(pkgid, {appid, exec}, nonreadonly_params);
+}
+
+TEST_F(PreloadSmokeTest, ReadonlyUpdateUninstallMode) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path path = kSmokePackagesDirectory / "ReadonlyUpdateUninstallMode.tpk";
+ std::string pkgid = "smoketpk44";
+ std::string appid = "smoketpk44.ReadonlyUpdateUninstallMode";
+ std::string exec = "basicui";
+
+ ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
+ ci::PkgQueryInterface pkg_query1(pkgid, params.test_user.uid);
+ PackageAttributes original(pkg_query1);
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ValidatePackage(pkgid, {appid, exec}, params);
+ TestParameters nonreadonly_params(params);
+ nonreadonly_params.is_readonly = false;
+ ValidatePackage(pkgid, {appid, exec}, nonreadonly_params);
+ ASSERT_EQ(backend.Uninstall(pkgid), ci::AppInstaller::Result::OK);
+ ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
+ PackageAttributes restored(pkg_query2);
+ ASSERT_EQ(original, restored);
+ ValidatePackage(pkgid, {appid, exec}, params);
+}
+
+TEST_F(SmokeTest, InstallExtended_Tpk) {
+ ASSERT_TRUE(CheckAvailableExtendedPath());
+ bf::path path = kSmokePackagesDirectory / "InstallExtended_Tpk.tpk";
+ std::string pkgid = "smoketpk45";
+ std::string appid = "smoketpk45.InstallExtendedTpk";
+ std::string exec = "smoketpk45.InstallExtendedTpk";
+ ASSERT_EQ(backend.InstallWithStorage(path, StorageType::EXTENDED),
+ ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidateExtendedPackage(pkgid, {appid, exec}, params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_CrashAfterUnzip) {
+ bf::path path = kSmokePackagesDirectory / "RecoveryMode_CrashAfterUnzip.tpk";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+ ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-i", path.string(), "-u", test_uid_str.c_str(),
+ "-step_name", "Unzip");
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ std::string pkgid = "smokeapp47";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
+ GetRecoverFileInfo(recovery_file);
+ ASSERT_TRUE(recovery_info);
+ ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+}
+
+TEST_F(RollbackSmokeTest, UpdateMode_RollbackSharedDataUpdate) {
+ bf::path path_old = kSmokePackagesDirectory / "UpdateMode_SharedData.tpk";
+ bf::path path_new = kSmokePackagesDirectory / "UpdateMode_SharedData_2.tpk";
+ std::string pkgid = "smoketpk.shareddata";
+ std::string appid = "smoketpk.shareddata";
+ std::string exec = "shareddata";
+ ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::ERROR);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(CheckSharedDataExistance(pkgid, params));
+}
+
+TEST_F(RollbackSmokeTest, UpdateMode_RollbackNonSharedDataUpdate) {
+ bf::path path_old = kSmokePackagesDirectory / "UpdateMode_NonSharedData.tpk";
+ bf::path path_new =
+ kSmokePackagesDirectory / "UpdateMode_NonSharedData_2.tpk";
+ std::string pkgid = "smoketpk.non-shareddata";
+ std::string appid = "smoketpk.non-shareddata";
+ std::string exec = "shareddata";
+ ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::ERROR);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(CheckSharedDataNonExistance(pkgid, params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_SharedDataUpdate) {
+ bf::path path_old =
+ kSmokePackagesDirectory / "RecoveryMode_SharedData.tpk";
+ bf::path path_new =
+ kSmokePackagesDirectory / "RecoveryMode_SharedData_2.tpk";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+ ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
+ ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ std::string pkgid = "smoketpk.recovery-shareddata";
+ std::string appid = "smoketpk.recovery-shareddata";
+ std::string exec = "shareddata";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
+ GetRecoverFileInfo(recovery_file);
+ ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
+
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(CheckSharedDataExistance(pkgid, params));
+ ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+}
+
+TEST_F(SmokeTest, RecoveryMode_NonSharedDataUpdate) {
+ bf::path path_old =
+ kSmokePackagesDirectory / "RecoveryMode_NonSharedData.tpk";
+ bf::path path_new =
+ kSmokePackagesDirectory / "RecoveryMode_NonSharedData_2.tpk";
+ RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
+ ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
+ ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ std::string pkgid = "smoketpk.recovery-non-shareddata";
+ std::string appid = "smoketpk.recovery-non-shareddata";
+ std::string exec = "shareddata";
+ bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
+ GetRecoverFileInfo(recovery_file);
+ ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
+
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
+ ASSERT_TRUE(CheckSharedDataNonExistance(pkgid, params));
+ ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+}
+
+} // namespace smoke_test
+
+int main(int argc, char** argv) {
+ try {
+ bool no_backup = false;
+ BackupType backup_type = BackupType::MOVE;
+
+ ci::RequestMode request_mode = st::ParseRequestMode(argc, argv);
+ if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
+ std::cout << "Skip tests for preload request" << std::endl;
+ ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
+ }
+ testing::InitGoogleTest(&argc, argv);
+
+ bpo::options_description options("Allowed options");
+ bpo::variables_map opt_map;
+ try {
+ options.add_options()
+ ("help", "display this help message")
+ ("no-backup", "Do test without backup")
+ ("backup-type", bpo::value<std::string>(), "<move|copy> set test's "
+ "backup type \'move\', \'copy and remove\'");
+ bpo::store(bpo::command_line_parser(argc, argv).
+ options(options).allow_unregistered().run(), opt_map);
+ if (opt_map.count("help")) {
+ std::cerr << options << std::endl;
+ return -1;
+ }
+
+ if (opt_map.count("no-backup"))
+ no_backup = true;
+ if (opt_map.count("backup-type")) {
+ if (opt_map["backup-type"].as<std::string>() == "move") {
+ backup_type = BackupType::MOVE;
+ } else if (opt_map["backup-type"].as<std::string>() == "copy") {
+ backup_type = BackupType::COPY_AND_REMOVE;
+ } else {
+ std::cerr << options << std::endl;
+ return -1;
+ }
+ }
+ bpo::notify(opt_map);
+ } catch (...) {
+ std::cerr << "Exception occurred: "
+ << boost::current_exception_diagnostic_information()
+ << std::endl;
+ return -1;
+ }
+
+ ::env = static_cast<smoke_test::SmokeEnvironment*>(
+ testing::AddGlobalTestEnvironment(
+ new smoke_test::SmokeEnvironment(request_mode,
+ no_backup, backup_type)));
+
+ signal(SIGINT, ::signalHandler);
+ signal(SIGSEGV, ::signalHandler);
+ return RUN_ALL_TESTS();
+ } catch (...) {
+ std::cout << "Exception occurred during testing" << std::endl;
+ return 1;
+ }
+}
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include <common/pkgmgr_interface.h>
+#include <manifest_parser/utils/logging.h>
+
+#include "tpk/tpk_app_query_interface.h"
+#include "tpk/tpk_installer.h"
+#include "smoke_tests/tpk_smoke_utils.h"
+
+namespace ci = common_installer;
+
+static int RunCrashTpkInstaller(ci::PkgMgrPtr pkgmgr,
+ int index,
+ std::string step_name,
+ smoke_test::CrashStepType type) {
+ smoke_test::CrashTpkInstaller t(pkgmgr, index, step_name, type);
+
+ if (t.Run() != ci::AppInstaller::Result::OK) {
+ LOG(ERROR) << "CrashTpkInstaller run failure";
+ return -1;
+ }
+ return 0;
+}
+
+static int RunTpkInstallerWithoutParserPlugins(ci::PkgMgrPtr pkgmgr) {
+ smoke_test::TpkInstallerWithoutPasrserPlugins t(pkgmgr);
+
+ if (t.Run() != ci::AppInstaller::Result::OK) {
+ LOG(ERROR) << "TpkInstallerWithoutPasrserPlugins run failure";
+ return -1;
+ }
+ return 0;
+}
+
+// This version of backend will crash in the end
+// it is used for recovery testcase
+int main(const int argc, char* argv[]) {
+ try {
+ int index = -1;
+ int backend_argc = argc;
+ std::string step_name;
+ bool remove_plugins = false;
+ smoke_test::CrashStepType type = smoke_test::CrashStepType::PROCESS;
+
+ if (!strcmp(argv[backend_argc-2], "-idx")) {
+ index = atoi(argv[backend_argc-1]);
+ backend_argc -= 2;
+ LOG(DEBUG) << "Step crash after " << index << " step.";
+ }
+
+ if (!strcmp(argv[backend_argc-2], "-step_name")) {
+ step_name = argv[backend_argc-1];
+ backend_argc -= 2;
+ LOG(DEBUG) << "Step crash after " << step_name << " step.";
+ }
+
+ if (!strcmp(argv[backend_argc-1], "-remove_plugin_steps")) {
+ backend_argc--;
+ remove_plugins = true;
+ LOG(DEBUG) << "Remove parser plugins steps";
+ }
+
+ if (!strcmp(argv[backend_argc-1], "-type_clean")) {
+ backend_argc--;
+ type = smoke_test::CrashStepType::CLEAN;
+ LOG(DEBUG) << "step will be crashed in clean operation";
+ }
+
+ ci::PkgmgrInstaller pkgmgr_installer;
+ tpk::TpkAppQueryInterface interface;
+ ci::PkgMgrPtr pkgmgr = ci::PkgMgrInterface::Create(backend_argc, argv,
+ &pkgmgr_installer,
+ &interface);
+ if (!pkgmgr) {
+ LOG(ERROR) << "Failed to create pkgmgr interface";
+ return -1;
+ }
+
+ if (remove_plugins)
+ return RunTpkInstallerWithoutParserPlugins(pkgmgr);
+ else
+ return RunCrashTpkInstaller(pkgmgr, index, step_name, type);
+ } catch (...) {
+ std::cout << "Exception occurred during testing" << std::endl;
+ return 1;
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <privileges>
+ <appdefined-privilege>http://package2id/appdefined/test.read</appdefined-privilege>
+ </privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <privileges>
+ <appdefined-privilege>package0id/appdefined/test.read</appdefined-privilege>
+ </privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <privileges>
+ <appdefined-privilege>http://package0id/appdefined/longnameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.read</appdefined-privilege>
+ </privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <privileges>
+ <appdefined-privilege>http://package0id/appdefined/test.read</appdefined-privilege>
+ <appdefined-privilege>http://package0id/appdefined/test.write</appdefined-privilege>
+ </privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <privileges>
+ <appdefined-privilege>http://package0id/appdefined/test.read</appdefined-privilege>
+ </privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <privileges>
+ <appdefined-privilege license="res/cert">http://package0id/appdefined/test.read</appdefined-privilege>
+ <appdefined-privilege license="res/cert">http://package0id/appdefined/test.write</appdefined-privilege>
+ </privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <privileges>
+ <appdefined-privilege license="res/cert">http://package0id/appdefined/test.read</appdefined-privilege>
+ </privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <author href="http://site.domain.com" email="invalid@email.">Author</author>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <author href="http://site.domain.com" email="valid@email.com">Author</author>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <description xml:lang="non-existing-locale">text</description>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <description xml:lang="en-GB">text</description>
+ <description>text2</description>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <description xml:lang="en-GB"></description>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <description xml:lang="en-GB">text</description>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3a" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" install-location="auto">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" install-location="internal-only">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" install-location="invalid">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" install-location="prefer-external">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<widget xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</widget>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="packag/e0id" version="1.0.0">
+ <ui-application appid="packag/e0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" type="invalid">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" type="rpm">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" type="tpk">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0" type="wgt">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.256.3">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.2.3">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <privileges>
+ <privilege>http://tizen.org/privilege/application.admin</privilege>
+ <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+ <privilege>http://tizen.org/privilege/account.read</privilege>
+ </privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <privileges></privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <privileges>
+ <privilege>http://tizen.org/privilege/application.admin</privilege>
+ </privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <profile>text</profile>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <profile name="mobile" />
+ <profile name="wearable" />
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <profile name="mobile" />
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <provides-appdefined-privileges>
+ <appdefined-privilege>http://package2id/appdefined/test.read</appdefined-privilege>
+ </provides-appdefined-privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <provides-appdefined-privileges>
+ <appdefined-privilege>package0id/appdefined/test.read</appdefined-privilege>
+ </provides-appdefined-privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <provides-appdefined-privileges>
+ <appdefined-privilege>http://package0id/appdefined/longnameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.read</appdefined-privilege>
+ </provides-appdefined-privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <provides-appdefined-privileges>
+ <appdefined-privilege>http://package0id/appdefined/test.read</appdefined-privilege>
+ <appdefined-privilege>http://package0id/appdefined/test.write</appdefined-privilege>
+ </provides-appdefined-privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <provides-appdefined-privileges></provides-appdefined-privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <provides-appdefined-privileges>
+ <appdefined-privilege>http://package0id/appdefined/test.read</appdefined-privilege>
+ </provides-appdefined-privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <provides-appdefined-privileges>
+ <appdefined-privilege license="res/cert">http://package0id/appdefined/test.read</appdefined-privilege>
+ <appdefined-privilege license="res/cert">http://package0id/appdefined/test.write</appdefined-privilege>
+ </provides-appdefined-privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+ <provides-appdefined-privileges>
+ <appdefined-privilege license="res/cert">http://package0id/appdefined/test.read</appdefined-privilege>
+ </provides-appdefined-privileges>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose1" />
+ <operation name="http://tizen.org/appcontrol/operation/compose2" />
+ <uri name="scheme1://" />
+ <uri name="scheme2://" />
+ <mime name="application/pdf" />
+ <mime name="application/text" />
+ </app-control>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose1" />
+ <operation name="http://tizen.org/appcontrol/operation/compose2" />
+ <uri name="scheme1://" />
+ <uri name="scheme2://" />
+ </app-control>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose1" />
+ <operation name="http://tizen.org/appcontrol/operation/compose2" />
+ <mime name="application/pdf" />
+ <mime name="application/text" />
+ </app-control>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose" />
+ <uri name="scheme://" />
+ <mime name="application/pdf" />
+ </app-control>
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose2" />
+ <uri name="scheme2://" />
+ <mime name="application/text" />
+ </app-control>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose" />
+ <uri name="scheme://" />
+ <mime />
+ </app-control>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation />
+ <uri name="scheme://" />
+ <mime name="application/pdf" />
+ </app-control>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="invalid" />
+ <uri name="scheme://" />
+ <mime name="application/pdf" />
+ </app-control>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <uri name="scheme://" />
+ <mime name="application/pdf" />
+ </app-control>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose" />
+ <uri name="scheme://" />
+ </app-control>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose" />
+ <mime name="application/pdf" />
+ </app-control>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose" />
+ <uri />
+ <mime name="application/pdf" />
+ </app-control>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose" />
+ <uri name="scheme://" />
+ <mime name="application/pdf" />
+ </app-control>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package/id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp" auto-restart="false">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp" auto-restart="invalid">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp" auto-restart="true">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <background-category />
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <background-category value="bgcategory1" />
+ <background-category value="bgcategory2" />
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <background-category value="bgcategory" />
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <datacontrol providerid="providerid1" access="access1" type="type1" />
+ <datacontrol providerid="providerid2" access="access2" type="type2" />
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <datacontrol providerid="providerid" access="access" type="type" />
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <icon />
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <icon>test_icon.png</icon>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <label xml:lang="invalid">label</label>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <label>label</label>
+ <label xml:lang="en-GB">label_GB</label>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <label>label</label>
+ <label xml:lang="en-GB">label_GB</label>
+ <label xml:lang="en-US"></label>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <label></label>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <label>label</label>
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <metadata value="value" />
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <metadata key="key1" value="value1" />
+ <metadata key="key2" />
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ <metadata key="key" value="value" />
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp" multiple="false">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp" multiple="invalid">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp" multiple="true">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp" on-boot="false">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp" on-boot="invalid">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp" on-boot="true">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp" taskmanage="false">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp" taskmanage="invalid">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp" taskmanage="true">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="webapp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose1" />
+ <operation name="http://tizen.org/appcontrol/operation/compose2" />
+ <uri name="scheme1://" />
+ <uri name="scheme2://" />
+ <mime name="application/pdf" />
+ <mime name="application/text" />
+ </app-control>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose1" />
+ <operation name="http://tizen.org/appcontrol/operation/compose2" />
+ <uri name="scheme1://" />
+ <uri name="scheme2://" />
+ </app-control>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose1" />
+ <operation name="http://tizen.org/appcontrol/operation/compose2" />
+ <mime name="application/pdf" />
+ <mime name="application/text" />
+ </app-control>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose" />
+ <uri name="scheme://" />
+ <mime name="application/pdf" />
+ </app-control>
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose2" />
+ <uri name="scheme2://" />
+ <mime name="application/text" />
+ </app-control>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose" />
+ <uri name="scheme://" />
+ <mime />
+ </app-control>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation />
+ <uri name="scheme://" />
+ <mime name="application/pdf" />
+ </app-control>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="invalid" />
+ <uri name="scheme://" />
+ <mime name="application/pdf" />
+ </app-control>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <uri name="scheme://" />
+ <mime name="application/pdf" />
+ </app-control>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose" />
+ <uri name="scheme://" />
+ </app-control>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose" />
+ <mime name="application/pdf" />
+ </app-control>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose" />
+ <uri />
+ <mime name="application/pdf" />
+ </app-control>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/compose" />
+ <uri name="scheme://" />
+ <mime name="application/pdf" />
+ </app-control>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package/id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <background-category />
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <background-category value="bgcategory1" />
+ <background-category value="bgcategory2" />
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <background-category value="bgcategory" />
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <datacontrol providerid="providerid1" access="access1" type="type1" />
+ <datacontrol providerid="providerid2" access="access2" type="type2" />
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <datacontrol providerid="providerid" access="access" type="type" />
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" hw-acceleration="default">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" hw-acceleration="off">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" hw-acceleration="on">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <icon />
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <icon>test_icon.png</icon>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <label xml:lang="invalid">label</label>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <label>label</label>
+ <label xml:lang="en-GB">label_GB</label>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <label>label</label>
+ <label xml:lang="en-GB">label_GB</label>
+ <label xml:lang="en-US"></label>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <label></label>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <label>label</label>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" launch_mode="caller">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" launch_mode="group">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" launch_mode="invalid">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" launch_mode="single">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <metadata value="value" />
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <metadata key="key1" value="value1" />
+ <metadata key="key2" />
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <metadata key="key" value="value" />
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <service-application appid="package0id.appid" exec="testapp" type="capp">
+ </service-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" multiple="false">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" multiple="invalid">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" multiple="true">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" nodisplay="false">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" nodisplay="invalid">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" nodisplay="true">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="5.5" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <splash-screens>
+ <splash-screen src="test1.jpg" type="img" dpi="hdpi" orientation="landscape" app-control-operation="http://tizen.org/appcontrol/operation/default" />
+ <splash-screen src="test1.jpg" type="img" dpi="hdpi" orientation="landscape" app-control-operation="http://tizen.org/appcontrol/operation/default" />
+ <splash-screen src="test1.jpg" type="img" dpi="hdpi" orientation="landscape" app-control-operation="http://tizen.org/appcontrol/operation/test_operation" />
+ </splash-screens>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" taskmanage="false">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" taskmanage="invalid">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp" taskmanage="true">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="webapp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package0id.appid" exec="testapp" type="capp" ambient-support="false">
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package0id.appid" exec="testapp" type="capp" ambient-support="invalid">
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package0id.appid" exec="testapp" type="capp">
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package0id.appid" exec="testapp" type="capp" ambient-support="true">
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package/id.appid" exec="testapp" type="capp">
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application exec="testapp" type="capp">
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package0id.appid" exec="testapp" type="capp">
+ <icon />
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package0id.appid" exec="testapp" type="capp">
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package0id.appid" exec="testapp" type="capp">
+ <icon>test_icon.png</icon>
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package0id.appid" exec="testapp" type="capp">
+ <label></label>
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package0id.appid" exec="testapp" type="capp">
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package0id.appid" exec="testapp" type="capp">
+ <label>label</label>
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package0id.appid" exec="testapp" type="capp">
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <watch-application appid="package0id.appid" exec="testapp" type="capp">
+ </watch-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application appid="package/id.appid" exec="testapp" type="capp">
+ </widget-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application exec="testapp" type="capp">
+ </widget-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application appid="package0id.appid" exec="testapp" type="capp">
+ <icon />
+ </widget-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application appid="package0id.appid" exec="testapp" type="capp">
+ </widget-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application appid="package0id.appid" exec="testapp" type="capp">
+ <icon>test_icon.png</icon>
+ </widget-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application appid="package0id.appid" exec="testapp" type="capp">
+ <label xml:lang="invalid">label</label>
+ </widget-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application appid="package0id.appid" exec="testapp" type="capp">
+ <label>label</label>
+ <label xml:lang="en-GB">label_GB</label>
+ </widget-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application appid="package0id.appid" exec="testapp" type="capp">
+ <label>label</label>
+ <label xml:lang="en-GB">label_GB</label>
+ <label xml:lang="en-US"></label>
+ </widget-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application appid="package0id.appid" exec="testapp" type="capp">
+ </widget-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application appid="package0id.appid" exec="testapp" type="capp">
+ <label></label>
+ </widget-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application appid="package0id.appid" exec="testapp" type="capp">
+ <label>label</label>
+ </widget-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application appid="package0id.appid" exec="testapp" type="capp">
+ </widget-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+ <widget-application appid="package0id.appid" exec="testapp" type="capp">
+ </widget-application>
+</manifest>
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="bin%2Fbasicui">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>Yrs3GkHAMzZGL7qmFGAF7sdXg6shvOtthBSb/Hjzfjw=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fbasicui.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>vQ+rOr8hWb4TVBijWblCSAB+8eePv+QyN6wNXzvJgSE=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+ATfZj/k87yYSeapRBX0sMZ5tO6jMQDj4EWCCTLtj5cf+N1s8WCbl4sST53hWdTf+JgvAzTpF6x+t
+LcwC9zQZxfYTzHu0KqyKJy6uXj6tiB85SSlYhejOtDogxvGFCnRo6RZioYzF4SDtxha9NkYyh1PF
+L0UpraclVNYVc1MMfYY=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIICnDCCAYSgAwIBAgIGAVvS9uY8MA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz
+c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2
+ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBgxFjAUBgNVBAMMDUFw
+cF9pbnN0YWxsZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIKgQLsl5UIJdfdaDXbY+aQ6
+VHjwTPv5+aUlF1l6G9SDZ7tmJTCO1yAudmMr6vEN+ZL/bbOEAlyhkJPTmntPesO1h/WzjIlpFzTO
+UcHlEXAu1vZGTnPBoYTutBeVmbH9JY/dCSm2xFSioKaWHl+uMn0SB1DcvgIVSs4DkvO0F1+TAgMB
+AAGjMjAwMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMDMA0G
+CSqGSIb3DQEBBQUAA4IBAQBwNrj9b7/g4JI9K3wohRLHW5IpxOwBO9gUlkotSUNaiAvNwsQfB5pE
+k+rTUa4Nwxcq6rFfne1brXP1vbl/bVGW/WJqV6dF3BL1QfwGif0vvcO1Sz2QOpoc/Jtt8zlmsRne
+TIEMph6kDUT1oNUlTCGnxD24WagRxuGUe/RZ6L4y+6T8L+fBDtMyyM+GytqE72V+0KeyITJMTdzM
+wRMjN3XccXemcox73isLxSXlgwrFbotkTyYPTFphiZCRU7BlA3EClIk+3To0b3irROY/iIlg6ZyY
+gNbND9/aIJxqPqCghW7PMjGH/9KK2mtNhtJSFrIAvvUiW/fMrNj1opsAHGgJ
+</X509Certificate>
+<X509Certificate>
+MIIDOTCCAiGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRowGAYDVQQKDBFUaXplbiBBc3NvY2lh
+dGlvbjEaMBgGA1UECwwRVGl6ZW4gQXNzb2NpYXRpb24xHjAcBgNVBAMMFVRpemVuIERldmVsb3Bl
+cnMgUm9vdDAeFw0xMjAxMDEwMDAwMDBaFw0yNzAxMDEwMDAwMDBaMFYxGjAYBgNVBAoMEVRpemVu
+IEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4g
+RGV2ZWxvcGVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVGhRGmMIUyBA7o
+PCz8Sxut6z6HNkF4oDIuzuKaMzRYPeWodwe9O0gmqAkToQHfwg2giRhE5GoPld0fq+OYMMwSasCu
+g8dwODx1eDeSYVuOLWRxpAmbTXOsSFi6VoWeyaPEm18JBHvZBsU5YQtgZ6Kp7MqzvQg3pXOxtajj
+vyHxiatJl+xXrHgcXC1wgyG3buty7u/Fi2mvKXJ0PRJcCjjK81dqe/Vr20sRUCrbk02zbm5ggFt/
+jIEhV8wbFRQpliobc7J4dSTKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE
+dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
+AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH
+95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04
+1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M
++OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
+W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+Needed, because empty directories are skipped when copying, and directory structure will be invalid.
--- /dev/null
+Needed, because empty directories are skipped when copying, and directory structure will be invalid.
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>anhYz6XCClJebTJ+qamYS8R0Rk4xDr7LKqaWzyxvj0I=</DigestValue>
+</Reference>
+<Reference URI="bin%2Fbasicui">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>Yrs3GkHAMzZGL7qmFGAF7sdXg6shvOtthBSb/Hjzfjw=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fbasicui.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>vQ+rOr8hWb4TVBijWblCSAB+8eePv+QyN6wNXzvJgSE=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+NTEUK1tZpBTxjgfGxbwc1bZr8kAG8dc2+hx2xzUFxZUgIWwIIy/SdKy7VGUCAH3y/HApfaNBL1SL
+RnGoQ/R3L/eQvQnzq/iTpZcCSpYnnvH9fJHAmgSod5XgH9IS+QKU/fzJ1rhlMBMD8oGxrDa4JrQJ
+65+mUCgDS7LZUp6olx8=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIICnTCCAgYCCQDE9MbMmJ/yCzANBgkqhkiG9w0BAQUFADCBkDELMAkGA1UEBhMCS1IxDjAMBgNV
+BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE
+CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTElMCMGA1UEAwwcVGl6ZW4gUGFydG5lciBEaXN0
+cmlidXRvciBDQTAeFw0xMjEwMjcwNzQ4MzNaFw0yMjEwMjUwNzQ4MzNaMIGUMQswCQYDVQQGEwJL
+UjEOMAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENB
+MSIwIAYDVQQLDBlUaXplbiBEaXN0cmlidXRvciBUZXN0IENBMSkwJwYDVQQDDCBUaXplbiBQYXJ0
+bmVyIERpc3RyaWJ1dG9yIFNpZ25lcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAy9mg2x4B
+zxlK3LJL81GsLq/pJfK1evdCKG/IOBpdoRO0rLhYnsL5+KvToPFa5g9GTZo32LikpW1NZ7++3EHE
+fnO2IGLUau4kquvhmz1LNg5xBTx7IbucmwLMRGo1BPGdsAQQLyXeQKJ5PCERmVg4MIoiL2zT/JsL
+sZ9UPT6GEB8CAwEAATANBgkqhkiG9w0BAQUFAAOBgQAw5xPBFR1XKuZ8QpsCtSE0zXVHvwIa+Ha4
+YBdRtGwEoZmiKGZV/wAhPRdmR0kISkTz20kIGz/ZwRZCVGhsr5hkkpFknYlKeKkEJ/tJfZl4D7ec
+GFAnynOzlWZqSIPz+yxX8ah9E6lTv4Vs9DhNb08nxVvxLqlpyVdk9RUsCx/yIA==
+</X509Certificate>
+<X509Certificate>
+MIICtTCCAh6gAwIBAgIJAKORBcIiXygIMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYDVQQGEwJLUjEO
+MAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENBMSIw
+IAYDVQQLDBlUaXplbiBEaXN0cmlidXRvciBUZXN0IENBMSowKAYDVQQDDCFUaXplbiBQYXJ0bmVy
+IERpc3RyaWJ1dG9yIFJvb3QgQ0EwHhcNMTIxMDI3MDc0NTIwWhcNMjIxMDI1MDc0NTIwWjCBkDEL
+MAkGA1UEBhMCS1IxDjAMBgNVBAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6
+ZW4gVGVzdCBDQTEiMCAGA1UECwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTElMCMGA1UEAwwc
+VGl6ZW4gUGFydG5lciBEaXN0cmlidXRvciBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+2ZQrdEowjqxUmB8FX8ej19VKY6jGHKNIRE5wrhBkuZ1b0FLRPiN3/Cl9wMkCnyJui4QhC28g1aBg
+w/JnaObcDqW1NgFVH3006+gZvCTDlw1nIEjvZa6P+uWOOi05xPPAE0feKPkO1POnOjnapfkkEVNU
+8TXsLbLYBylWT8rxZC8CAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBJ
+yJ7p6qs0JI+1iKOk/sYWVP6dMueY72qOc/wVj5c3ejOlgJNNXDMAQ14QcRRexffc68ipTwybU/3m
+tcNwydzKJe+GFa4b2zyKOvOgrfs4MKSR0T9XEPmTKeR+NDT2CbA6/kQoRYm0fSORzD2UXJzNZWe/
+WjwSA66hv4q+0QZQFQ==
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="smoketpk41" version="1.0.0">
+ <profile name="mobile" />
+ <ui-application appid="smoketpk41.ManifestDirectInstallMode" exec="basicui" type="capp" multiple="false" taskmanage="true" nodisplay="false" launch_mode="single">
+ <icon>basicui.png</icon>
+ <label>basicui</label>
+ </ui-application>
+</manifest>
--- /dev/null
+#add
+ADDED
+#modify
+MODIFIED
+#delete
+DELETED
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="DELETED">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>4W8VliAYUP1KY2gLJ/YDy2TmcXYVm+PY7XikQD/bFwA=</DigestValue>
+</Reference>
+<Reference URI="MODIFIED">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>m76Dq+1hU8YC3/kYBle8rJLovpCFYy3/HQCUS74IeSY=</DigestValue>
+</Reference>
+<Reference URI="bin%2Fnative">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ZmAZCVzbwHUNfKaJi3rtgc6aF+/+Qk4MoetKx2sXEsI=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fnative.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>SY77G0wHiFZyXUI2qoDEbKCfT2LP1V8D+qS4ec17yWM=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+C69U/+6mOukXlqpfx1KRXm8hPJ6+CAuQJBrR0thQemMBaAwt6Jzk1zgDJt+AYlenNamj24HqoULa
+sl7Cibfp+FU/zeNC587JPQT/GRaErr4ifgGLDpJ41BNr62ODeMbiBgct8eX0igWl622VqZUSy1YD
+SWKKkwN7OeoCUv4fKgQ=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIIClTCCAX2gAwIBAgIGAVSVy18QMA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz
+c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2
+ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBExDzANBgNVBAMMBmF1
+dGhvcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArRGCnZnlc9C4Gl1ywl02AajwD/UO249R
+AZHgI3IPGhbzo2XT7gWDJvh1AqS8v6lKvMwkwRoEq7kXK9oJ3u4blP+K0pAj6cLXR9kHdfY0/ZaT
+ficImTEgFxSKFHLGvsDX2S3QmeHS3y4pvmLdFr+fqsvBIDz+SISMvJ8Vlemm7PkCAwEAAaMyMDAw
+DAYDVR0TAQH/BAIwADALBgNVHQ8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwMwDQYJKoZIhvcN
+AQEFBQADggEBAAoIjlzjeo0hdBxhJdrTZZG29KzpBDAXEKn9JvGqAhH5UdKxnqXDn5jt+Yode2a4
+/lQq9jFnzPCr7e+uBAnpOcH/sf3sKVI1J+Ssxo4j3tOwL74wNLUSONvXrfGFtLboof5d/JdnffME
+WLQTgd95k3OTQzZSLYrR9tXgpnBgDBaZpnnE7XKiAEZ1IetexkD6f78gDe/yucYO3VESzsrenLaQ
+MPcTF5kzi3QZGKJDMGhzC88bKDP96ZvhY+LOAUg3WNAk8Uyqpef6GuKSBZXXURN9EJErU2KoCMkx
+hQmjVgQRwHdLy5iCWMgkWr5LEUMJocOG4DozrZ5XWBPiKSoYcNc=
+</X509Certificate>
+<X509Certificate>
+MIIDOTCCAiGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRowGAYDVQQKDBFUaXplbiBBc3NvY2lh
+dGlvbjEaMBgGA1UECwwRVGl6ZW4gQXNzb2NpYXRpb24xHjAcBgNVBAMMFVRpemVuIERldmVsb3Bl
+cnMgUm9vdDAeFw0xMjAxMDEwMDAwMDBaFw0yNzAxMDEwMDAwMDBaMFYxGjAYBgNVBAoMEVRpemVu
+IEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4g
+RGV2ZWxvcGVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVGhRGmMIUyBA7o
+PCz8Sxut6z6HNkF4oDIuzuKaMzRYPeWodwe9O0gmqAkToQHfwg2giRhE5GoPld0fq+OYMMwSasCu
+g8dwODx1eDeSYVuOLWRxpAmbTXOsSFi6VoWeyaPEm18JBHvZBsU5YQtgZ6Kp7MqzvQg3pXOxtajj
+vyHxiatJl+xXrHgcXC1wgyG3buty7u/Fi2mvKXJ0PRJcCjjK81dqe/Vr20sRUCrbk02zbm5ggFt/
+jIEhV8wbFRQpliobc7J4dSTKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE
+dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
+AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH
+95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04
+1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M
++OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
+W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="DELETED">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>4W8VliAYUP1KY2gLJ/YDy2TmcXYVm+PY7XikQD/bFwA=</DigestValue>
+</Reference>
+<Reference URI="MODIFIED">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>m76Dq+1hU8YC3/kYBle8rJLovpCFYy3/HQCUS74IeSY=</DigestValue>
+</Reference>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>p2OKn1M4try6sjsAi7//u2Og5vg1yrPQ7biD4FOHnK4=</DigestValue>
+</Reference>
+<Reference URI="bin%2Fnative">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ZmAZCVzbwHUNfKaJi3rtgc6aF+/+Qk4MoetKx2sXEsI=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fnative.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>SY77G0wHiFZyXUI2qoDEbKCfT2LP1V8D+qS4ec17yWM=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+CgAdWvIj11sAxwLplwiC6UHnM2AFSqcr2tBFoLO3BRKEpCwwC1tsCG9gwQTT4BDWjMUG7f93C6kC
+KyLV689eeZf5e4yk9yfvAu30kLpIXYF5fOMfmMP6LuLYOomf2u84wY9s51hzwMyL5lz2PgrQda6T
+fIxSAXcOtC2vxGWsSa4=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIICmzCCAgQCCQDXI7WLdVZwiTANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCS1IxDjAMBgNV
+BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE
+CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwbVGl6ZW4gUHVibGljIERpc3Ry
+aWJ1dG9yIENBMB4XDTEyMTAyOTEzMDMwNFoXDTIyMTAyNzEzMDMwNFowgZMxCzAJBgNVBAYTAktS
+MQ4wDAYDVQQIDAVTdXdvbjEOMAwGA1UEBwwFU3V3b24xFjAUBgNVBAoMDVRpemVuIFRlc3QgQ0Ex
+IjAgBgNVBAsMGVRpemVuIERpc3RyaWJ1dG9yIFRlc3QgQ0ExKDAmBgNVBAMMH1RpemVuIFB1Ymxp
+YyBEaXN0cmlidXRvciBTaWduZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALtMvlc5hENK
+90ZdA+y66+Sy0enD1gpZDBh5T9RP0oRsptJv5jjNTseQbQi0SZOdOXb6J7iQdlBCtR343RpIEz8H
+mrBy7mSY7mgwoU4EPpp4CTSUeAuKcmvrNOngTp5Hv7Ngf02TTHOLK3hZLpGayaDviyNZB5PdqQdB
+hokKjzAzAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAvGp1gxxAIlFfhJH1efjb9BJK/rtRkbYn9+Ez
+GEbEULg1svsgnyWisFimI3uFvgI/swzr1eKVY3Sc8MQ3+Fdy3EkbDZ2+WAubhcEkorTWjzWz2fL1
+vKaYjeIsuEX6TVRUugHWudPzcEuQRLQf8ibZWjbQdBmpeQYBMg5x+xKLCJc=
+</X509Certificate>
+<X509Certificate>
+MIICtDCCAh2gAwIBAgIJAMDbehElPNKvMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYDVQQGEwJLUjEO
+MAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENBMSMw
+IQYDVQQLDBpUVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEpMCcGA1UEAwwgVGl6ZW4gUHVibGlj
+IERpc3RyaWJ1dG9yIFJvb3QgQ0EwHhcNMTIxMDI5MTMwMjUwWhcNMjIxMDI3MTMwMjUwWjCBjzEL
+MAkGA1UEBhMCS1IxDjAMBgNVBAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6
+ZW4gVGVzdCBDQTEiMCAGA1UECwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwb
+VGl6ZW4gUHVibGljIERpc3RyaWJ1dG9yIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDe
+OTS/3nXvkDEmsFCJIvRlQ3RKDcxdWJJp625pFqHdmoJBdV+x6jl1raGK2Y1sp2Gdvpjc/z92yzAp
+bE/UVLPh/tRNZPeGhzU4ejDDm7kzdr2f7Ia0U98K+OoY12ucwg7TYNItj9is7Cj4blGfuMDzd2ah
+2AgnCGlwNwV/pv+uVQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBACqJ
+KO33YdoGudwanZIxMdXuxnnD9R6u72ltKk1S4zPfMJJv482CRGCI4FK6djhlsI4i0Lt1SVIJEed+
+yc3qckGm19dW+4xdlkekon7pViEBWuyHw8OWv3RXtTum1+PGHjBJ2eYY4ZKIpz73U/1NC16sTB/0
+VhfnkHwPltmrpYVe
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="smokeapp25" version="1.0.0">
+ <profile name="mobile"/>
+ <ui-application appid="smokeapp25.ReinstallModeTpk" exec="native" multiple="false" nodisplay="false" taskmanage="true" type="capp">
+ <label>native</label>
+ <icon>native.png</icon>
+ </ui-application>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="org.tizen.testapp" version="1.0.0">
+ <author email="tester@samsung.com" href="www.tizen.org">tester</author>
+ <description>This is default description</description>
+ <description xml:lang="en-us">This is test description</description>
+ <ui-application appid="org.tizen.testapp" exec="testapp" multiple="false" nodisplay="false" taskmanage="true" type="capp">
+ <label>testapp</label>
+ <label xml:lang="en-us">Test</label>
+ <icon>testapp.png</icon>
+ <app-control>
+ <mime name="EditMime"/>
+ <operation name="http://tizen.org/appcontrol/operation/edit"/>
+ <uri name="EditUri"/>
+ </app-control>
+ <app-control>
+ <operation name="http://tizen.org/appcontrol/operation/view"/>
+ <uri name="ViewUri"/>
+ <mime name="ViewMime"/>
+ </app-control>
+ <metadata key="metakey1" value="metaval1"/>
+ <metadata key="metakey2" value="metaval2"/>
+ <datacontrol access="ReadOnly" providerid="http://testapp.com/datacontrol/provider/testapp" type="Sql"/>
+ <datacontrol access="ReadOnly" providerid="http://testapp.com/datacontrol/provider/testapp" type="Map"/>
+ </ui-application>
+ <account>
+ <account-provider appid="org.tizen.testapp" multiple-accounts-support="false" providerid="com.samsung">
+ <icon section="account">testapp.png</icon>
+ <icon section="account-small">testapp.png</icon>
+ <label xml:lang="en-gb">account icon</label>
+ <label>Samsung</label>
+ <capability>http://tizen.org/account/capability/calendar</capability>
+ <capability>http://tizen.org/account/capability/photo</capability>
+ </account-provider>
+ </account>
+ <privileges>
+ <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+ <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+ </privileges>
+ <feature name="http://tizen.org/feature/camera.front.flash">true</feature>
+ <feature name="http://tizen.org/feature/camera">true</feature>
+ <feature name="http://tizen.org/feature/camera.back.flash">true</feature>
+ <feature name="http://tizen.org/feature/camera.front">true</feature>
+</manifest>
--- /dev/null
+// Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include "smoke_tests/tpk_smoke_utils.h"
+
+#include <unit_tests/common/smoke_utils.h>
+
+#include <string>
+#include <utility>
+
+#include "tpk/tpk_installer.h"
+
+namespace ci = common_installer;
+namespace st = smoke_test;
+
+namespace smoke_test {
+
+const bf::path kSmokePackagesDirectory =
+ "/usr/share/tpk-installer-ut/test_samples/smoke/";
+
+bool ValidatePackage(const std::string& pkgid,
+ const std::pair<std::string, std::string>& app,
+ const TestParameters& params) {
+ return ValidatePackage(pkgid, Apps{ app }, params);
+}
+
+bool ValidateExternalPackage(const std::string& pkgid,
+ const std::pair<std::string, std::string>& app,
+ const TestParameters& params) {
+ return ValidateExternalPackage(pkgid, Apps{ app }, params);
+}
+
+bool ValidateExtendedPackage(const std::string& pkgid,
+ const std::pair<std::string, std::string>& app,
+ const TestParameters& params) {
+ return ValidateExtendedPackage(pkgid, Apps{ app }, params);
+}
+
+TpkBackendInterface::AppQueryInterfacePtr
+TpkBackendInterface::CreateQueryInterface() const {
+ return AppQueryInterfacePtr(new tpk::TpkAppQueryInterface());
+}
+
+TpkBackendInterface::AppInstallerPtr
+TpkBackendInterface::CreateInstaller(
+ ci::PkgMgrPtr pkgmgr) const {
+ return AppInstallerPtr(new tpk::TpkInstaller(pkgmgr));
+}
+
+TpkBackendInterface::AppInstallerPtr
+TpkBackendInterface::CreateFailExpectedInstaller(
+ ci::PkgMgrPtr pkgmgr, int fail_at) const {
+ return AppInstallerPtr(new FailExpectedTpkInstaller(pkgmgr, fail_at));
+}
+
+TpkBackendInterface::CommandResult
+TpkBackendInterface::InstallWithTEP(
+ const bf::path& path, const bf::path& tep) const {
+ const char* argv[] = {"", "-i", path.c_str(), "-u", uid_str_.c_str(),
+ "-e", tep.c_str()};
+ return CallBackend(SIZEOFARRAY(argv), argv);
+}
+
+TpkBackendInterface::CommandResult
+TpkBackendInterface::MountInstallWithTEP(
+ const bf::path& path, const bf::path& tep) const {
+ const char* argv[] = {"", "-w", path.c_str(), "-u", uid_str_.c_str(),
+ "-e", tep.c_str()};
+ return CallBackend(SIZEOFARRAY(argv), argv);
+}
+
+TpkBackendInterface::CommandResult
+TpkBackendInterface::InstallSuccessWithTEP(
+ const bf::path& path, const bf::path& tep) const {
+ RequestResult tmp_mode = mode_;
+ RequestResult &original_mode = const_cast<RequestResult&>(mode_);
+ original_mode = RequestResult::NORMAL;
+ if (InstallWithTEP(path, tep) != BackendInterface::CommandResult::OK) {
+ LOG(ERROR) << "Failed to install application with tep. Cannot update";
+ return BackendInterface::CommandResult::UNKNOWN;
+ }
+ original_mode = tmp_mode;
+ return BackendInterface::CommandResult::OK;
+}
+
+TpkBackendInterface::CommandResult
+TpkBackendInterface::MountInstallSuccessWithTEP(
+ const bf::path& path, const bf::path& tep) const {
+ RequestResult tmp_mode = mode_;
+ RequestResult &original_mode = const_cast<RequestResult&>(mode_);
+ original_mode = RequestResult::NORMAL;
+ if (MountInstallWithTEP(path, tep) != BackendInterface::CommandResult::OK) {
+ LOG(ERROR) << "Failed to mount install application with tep. Cannot update";
+ return BackendInterface::CommandResult::UNKNOWN;
+ }
+ original_mode = tmp_mode;
+ return BackendInterface::CommandResult::OK;
+}
+
+} // namespace smoke_test
--- /dev/null
+// Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#ifndef SMOKE_TESTS_TPK_SMOKE_UTILS_H_
+#define SMOKE_TESTS_TPK_SMOKE_UTILS_H_
+
+#include <common/installer/app_installer.h>
+#include <common/pkgmgr_interface.h>
+#include <common/step/configuration/step_fail.h>
+#include <unit_tests/common/smoke_utils.h>
+
+#include <memory>
+#include <string>
+#include <utility>
+
+#include "tpk/tpk_app_query_interface.h"
+#include "tpk/tpk_installer.h"
+
+namespace smoke_test {
+
+extern const bf::path kSmokePackagesDirectory;
+
+bool ValidatePackage(const std::string& pkgid,
+ const std::pair<std::string, std::string>& app,
+ const TestParameters& params);
+
+bool ValidateExternalPackage(const std::string& pkgid,
+ const std::pair<std::string, std::string>& app,
+ const TestParameters& params);
+
+bool ValidateExtendedPackage(const std::string& pkgid,
+ const std::pair<std::string, std::string>& app,
+ const TestParameters& params);
+
+class TpkBackendInterface: public BackendInterface {
+ public:
+ using BackendInterface::BackendInterface;
+ CommandResult InstallWithTEP(const bf::path& path,
+ const bf::path& tep) const;
+ CommandResult InstallSuccessWithTEP(const bf::path& path,
+ const bf::path& tep) const;
+ CommandResult MountInstallWithTEP(const bf::path& path,
+ const bf::path& tep) const;
+ CommandResult MountInstallSuccessWithTEP(const bf::path& path,
+ const bf::path& tep) const;
+
+ AppQueryInterfacePtr CreateQueryInterface() const override;
+ AppInstallerPtr CreateInstaller(
+ common_installer::PkgMgrPtr pkgmgr) const override;
+ AppInstallerPtr CreateFailExpectedInstaller(
+ common_installer::PkgMgrPtr pkgmgr, int fail_at) const override;
+};
+
+class TpkSmokeTestHelperRunner : public SmokeTestHelperRunner {
+ private:
+ common_installer::Subprocess CreateSubprocess() const {
+ return common_installer::Subprocess(
+ "/usr/bin/tpk-installer-ut/smoke-test-helper");
+ }
+};
+
+#ifdef OVERRIDE_STEPS_BLOCK
+#undef OVERRIDE_STEPS_BLOCK
+#endif
+#define OVERRIDE_STEPS_BLOCK(STEPS) \
+ void STEPS() override { \
+ tpk::TpkInstaller::STEPS(); \
+ if (fail_at_ > -1) \
+ AddStepAtIndex<common_installer::configuration::StepFail>(fail_at_); \
+ else \
+ AddStep<common_installer::configuration::StepFail>(); \
+ } \
+
+class FailExpectedTpkInstaller : public tpk::TpkInstaller {
+ public:
+ explicit FailExpectedTpkInstaller(
+ common_installer::PkgMgrPtr pkgmgr, int fail_at)
+ : tpk::TpkInstaller(pkgmgr), fail_at_(fail_at) { }
+
+ private:
+ OVERRIDE_STEPS_BLOCK(InstallSteps)
+ OVERRIDE_STEPS_BLOCK(UpdateSteps)
+ OVERRIDE_STEPS_BLOCK(UninstallSteps)
+ OVERRIDE_STEPS_BLOCK(ReinstallSteps)
+ OVERRIDE_STEPS_BLOCK(DeltaSteps)
+ OVERRIDE_STEPS_BLOCK(MoveSteps)
+ OVERRIDE_STEPS_BLOCK(RecoverySteps)
+ OVERRIDE_STEPS_BLOCK(MountInstallSteps)
+ OVERRIDE_STEPS_BLOCK(MountUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(ManifestDirectInstallSteps)
+ OVERRIDE_STEPS_BLOCK(ManifestDirectUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(ManifestPartialInstallSteps)
+ OVERRIDE_STEPS_BLOCK(ManifestPartialUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(PartialUninstallSteps)
+ OVERRIDE_STEPS_BLOCK(ReadonlyUpdateInstallSteps)
+ OVERRIDE_STEPS_BLOCK(ReadonlyUpdateUninstallSteps)
+ OVERRIDE_STEPS_BLOCK(DisablePkgSteps)
+ OVERRIDE_STEPS_BLOCK(EnablePkgSteps)
+ OVERRIDE_STEPS_BLOCK(MigrateExtImgSteps)
+ OVERRIDE_STEPS_BLOCK(RecoverDBSteps)
+
+ int fail_at_;
+};
+
+#ifdef OVERRIDE_STEPS_BLOCK
+#undef OVERRIDE_STEPS_BLOCK
+#endif
+#define OVERRIDE_STEPS_BLOCK(STEPS) \
+ void STEPS() override { \
+ tpk::TpkInstaller::STEPS(); \
+ if (crash_at_ > -1) \
+ AddStepAtIndex<StepCrash>(crash_at_, type_); \
+ else if (step_name_.size()) \
+ AddStepAfter<StepCrash>(step_name_, type_); \
+ else \
+ AddStep<StepCrash>(type_); \
+ } \
+
+class CrashTpkInstaller : public tpk::TpkInstaller {
+ public:
+ explicit CrashTpkInstaller(common_installer::PkgMgrPtr pkgmgr, int crash_at,
+ std::string step_name, CrashStepType type) :
+ tpk::TpkInstaller(pkgmgr), crash_at_(crash_at),
+ step_name_(step_name), type_(type) {}
+
+ private:
+ OVERRIDE_STEPS_BLOCK(InstallSteps)
+ OVERRIDE_STEPS_BLOCK(UpdateSteps)
+ OVERRIDE_STEPS_BLOCK(UninstallSteps)
+ OVERRIDE_STEPS_BLOCK(ReinstallSteps)
+ OVERRIDE_STEPS_BLOCK(DeltaSteps)
+ OVERRIDE_STEPS_BLOCK(MoveSteps)
+ OVERRIDE_STEPS_BLOCK(RecoverySteps)
+ OVERRIDE_STEPS_BLOCK(MountInstallSteps)
+ OVERRIDE_STEPS_BLOCK(MountUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(ManifestDirectInstallSteps)
+ OVERRIDE_STEPS_BLOCK(ManifestDirectUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(ManifestPartialInstallSteps)
+ OVERRIDE_STEPS_BLOCK(ManifestPartialUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(PartialUninstallSteps)
+ OVERRIDE_STEPS_BLOCK(ReadonlyUpdateInstallSteps)
+ OVERRIDE_STEPS_BLOCK(ReadonlyUpdateUninstallSteps)
+ OVERRIDE_STEPS_BLOCK(DisablePkgSteps)
+ OVERRIDE_STEPS_BLOCK(EnablePkgSteps)
+ OVERRIDE_STEPS_BLOCK(MigrateExtImgSteps)
+ OVERRIDE_STEPS_BLOCK(RecoverDBSteps)
+
+ int crash_at_;
+ std::string step_name_;
+ CrashStepType type_;
+};
+
+#ifdef OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS
+#undef OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS
+#endif
+#define OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(STEPS) \
+ void STEPS() override { \
+ tpk::TpkInstaller::STEPS(); \
+ RemoveStep("RunParserPlugin"); \
+ } \
+
+class TpkInstallerWithoutPasrserPlugins : public tpk::TpkInstaller {
+ public:
+ explicit TpkInstallerWithoutPasrserPlugins(
+ common_installer::PkgMgrPtr pkgmgr) : tpk::TpkInstaller(pkgmgr) { }
+
+ private:
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(InstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(UpdateSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(UninstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ReinstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(DeltaSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(MoveSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(MountInstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(MountUpdateSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ManifestDirectInstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ManifestDirectUpdateSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ManifestPartialInstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ManifestPartialUpdateSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(PartialUninstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ReadonlyUpdateInstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(ReadonlyUpdateUninstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(DisablePkgSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(EnablePkgSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(MigrateExtImgSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(RecoverDBSteps)
+ void RecoverySteps() override {
+ tpk::TpkInstaller::RecoverySteps();
+ RemoveStep("RecoverParserPlugin");
+ }
+};
+
+} // namespace smoke_test
+
+
+#endif // SMOKE_TESTS_TPK_SMOKE_UTILS_H_