INCLUDE(ApplyPkgConfig)
PKG_CHECK_MODULES(MANIFEST_PARSER_UTILS_DEPS REQUIRED manifest-parser-utils)
+PKG_CHECK_MODULES(MANIFEST_PARSER_DEPS REQUIRED manifest-parser)
PKG_CHECK_MODULES(GMOCK_DEPS REQUIRED gmock)
FIND_PACKAGE(Boost REQUIRED COMPONENTS system filesystem)
%endif
%check
-#export LD_LIBRARY_PATH=../../src/unified
+export LD_LIBRARY_PATH=../../src/tpk_manifest_handlers
ctest -V
%if 0%{?gcov:1}
lcov -c --ignore-errors graph --no-external -q -d . -o tpk-manifest-handlers.info
APPLY_PKG_CONFIG(${TARGET_TPK_MANIFEST_HANDLERS_UNIT_TEST} PUBLIC
GMOCK_DEPS
MANIFEST_PARSER_UTILS_DEPS
+ MANIFEST_PARSER_DEPS
)
-#TARGET_LINK_LIBRARIES(${TARGET_TPK_MANIFEST_HANDLERS_UNIT_TEST} PRIVATE ${TARGET_LIBNAME_UNIFIED})
+TARGET_LINK_LIBRARIES(${TARGET_TPK_MANIFEST_HANDLERS_UNIT_TEST} PRIVATE ${TARGET_LIBNAME_TPK_MANIFEST_HANDLERS})
SET_TARGET_PROPERTIES(${TARGET_TPK_MANIFEST_HANDLERS_UNIT_TEST} PROPERTIES COMPILE_FLAGS "-fPIE")
SET_TARGET_PROPERTIES(${TARGET_TPK_MANIFEST_HANDLERS_UNIT_TEST} PROPERTIES LINK_FLAGS "-pie")
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="4.0" package="org.example.tpk40sample" version="5.0.0">
+ <profile name="mobile"/>
+ <ui-application appid="org.example.tpk40sample.1" exec="tpk40sample" launch_mode="single" multiple="false" nodisplay="false" taskmanage="true" type="capp">
+ <label>tpk40sample-nolocale</label>
+ <label xml:lang="en-us">tpk40-en_us</label>
+ <label xml:lang="ko-kr">tpk40-ko_kr</label>
+ <icon>tpk40sample.png</icon>
+ <icon xml:lang="en-us">tpk40sample-en_us.png</icon>
+ <icon xml:lang="ko-kr">tpk40sample-ko_kr.png</icon>
+ </ui-application>
+ <privileges>
+ <privilege>http://developer.samsung.com/privilege/samsungpass.admin</privilege>
+ </privileges>
+</manifest>
--- /dev/null
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <gtest/gtest.h>
+
+#include "tpk_manifest_handlers/tpk_config_parser.h"
+
+// If code should uses GMock, this should be changed
+class TpkManifestHandlerTest : public testing::Test {
+ public:
+ TpkManifestHandlerTest() {}
+};
+
+TEST_F(TpkManifestHandlerTest, TpkConfigParser) {
+ std::unique_ptr<tpk::parse::TPKConfigParser> parser;
+ bool ret;
+
+ parser.reset(new tpk::parse::TPKConfigParser());
+ ret = parser->ParseManifest("test_samples/tizen-manifest.xml");
+ EXPECT_TRUE(ret) << "Failed to parse sample manifest";
+}