This tpk-smoke-utils library is used at smoke test of unified-installer.
Requires:
- https://review.tizen.org/gerrit/c/platform/core/appfw/app-installers/+/228720
Change-Id: I342c1827141c3331459a2d752c133aa86ee408dd
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
SET(TARGET_SMOKE_TEST_HELPER "smoke-test-helper")
SET(TARGET_MANIFEST_TEST "manifest-test")
SET(TARGET_RECOVERY_TEST "recovery-test")
+SET(TARGET_TPK_SMOKE_UTILS "tpk-smoke-utils")
ADD_DEFINITIONS("-DPROJECT_TAG=\"TPK_BACKEND\"")
%manifest tpk-installer-tests.manifest
%{_bindir}/tpk-installer-ut/*
%{_datadir}/tpk-installer-ut/*
+%{_libdir}/libtpk-smoke-utils.so*
+%{_includedir}/app-installers/unit_tests/tpk_smoke_utils.h
%changelog
* Thu Dec 18 2015 Pawel Sikorski <p.sikorski@samsung.com> 0.1-1
# Executables
ADD_EXECUTABLE(${TARGET_SMOKE_TEST}
smoke_test.cc
- smoke_utils.h
- smoke_utils.cc
)
ADD_EXECUTABLE(${TARGET_SMOKE_TEST_EXTENSIVE}
extensive_smoke_test.cc
- smoke_utils.h
- smoke_utils.cc
)
ADD_EXECUTABLE(${TARGET_SMOKE_TEST_HELPER}
ADD_EXECUTABLE(${TARGET_RECOVERY_TEST}
recovery_test.cc
- smoke_utils.h
- smoke_utils.cc
+)
+
+ADD_LIBRARY(${TARGET_TPK_SMOKE_UTILS} SHARED
+ tpk_smoke_utils.cc
)
TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
Boost
GTEST
GUM_DEPS
- VCONF_DEPS
)
APPLY_PKG_CONFIG(${TARGET_SMOKE_TEST_EXTENSIVE} PUBLIC
Boost
GTEST
GUM_DEPS
- VCONF_DEPS
)
APPLY_PKG_CONFIG(${TARGET_MANIFEST_TEST} PUBLIC
Boost
Boost
GTEST
GUM_DEPS
- VCONF_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_LINK_LIBRARIES(${TARGET_SMOKE_TEST_EXTENSIVE} PRIVATE ${TARGET_LIBNAME_TPK} ${GTEST_MAIN_LIBRARIES} ${TARGET_SMOKE_UTILS})
+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_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_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/)
#include <gtest/gtest.h>
#include <gtest/gtest-death-test.h>
-#include "unit_tests/smoke_utils.h"
+#include "unit_tests/tpk_smoke_utils.h"
namespace bpo = boost::program_options;
namespace ci = common_installer;
#include <string>
#include <vector>
-#include "unit_tests/smoke_utils.h"
+#include "unit_tests/tpk_smoke_utils.h"
namespace bf = boost::filesystem;
namespace bpo = boost::program_options;
#include <gtest/gtest.h>
#include <gtest/gtest-death-test.h>
-#include "unit_tests/smoke_utils.h"
+#include "unit_tests/tpk_smoke_utils.h"
namespace st = smoke_test;
namespace bf = boost::filesystem;
// 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 "tpk/tpk_installer.h"
-#include "unit_tests/smoke_utils.h"
-
namespace ci = common_installer;
namespace st = smoke_test;
// Use of this source code is governed by an apache-2.0 license that can be
// found in the LICENSE file.
-#ifndef UNIT_TESTS_SMOKE_UTILS_H_
-#define UNIT_TESTS_SMOKE_UTILS_H_
+#ifndef UNIT_TESTS_TPK_SMOKE_UTILS_H_
+#define UNIT_TESTS_TPK_SMOKE_UTILS_H_
#include <common/app_installer.h>
#include <common/pkgmgr_interface.h>
CommandResult MountInstallSuccessWithTEP(const bf::path& path,
const bf::path& tep) const;
- private:
AppQueryInterfacePtr CreateQueryInterface() const override;
AppInstallerPtr CreateInstaller(
common_installer::PkgMgrPtr pkgmgr) const override;
}
};
+#ifdef OVERRIDE_STEPS_BLOCK
+#undef OVERRIDE_STEPS_BLOCK
+#endif
#define OVERRIDE_STEPS_BLOCK(STEPS) \
void STEPS() override { \
tpk::TpkInstaller::STEPS(); \
} // namespace smoke_test
-#endif // UNIT_TESTS_SMOKE_UTILS_H_
+#endif // UNIT_TESTS_TPK_SMOKE_UTILS_H_