--- /dev/null
- # Dependencies
- PKG_CHECK_MODULES(SEC_MGR_TESTS_DEP
- REQUIRED
- security-manager
- )
-
+# Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# @file CMakeLists.txt
+# @author Piotr Sawicki (p.sawicki2@partner.samsung.com)
+# @brief CMake configuration file
+#
+
+INCLUDE(FindPkgConfig)
+
- ${PROJECT_SOURCE_DIR}/src/security-manager-tests/common/tzplatform.cpp
- ${PROJECT_SOURCE_DIR}/src/security-manager-tests/common/sm_api.cpp
+SET(TARGET_NETHER_TESTS "nether-tests")
+
+SET(NETHER_TESTS_SOURCES
+ ${PROJECT_SOURCE_DIR}/src/nether-tests/nether_tests.cpp
+ ${PROJECT_SOURCE_DIR}/src/common/tests_common.cpp
- ${PROJECT_SOURCE_DIR}/src/security-manager-tests/common/sm_request.cpp
- ${PROJECT_SOURCE_DIR}/src/security-manager-tests/common/sm_user_request.cpp
- ${PROJECT_SOURCE_DIR}/src/security-manager-tests/common/sm_policy_request.cpp
- ${PROJECT_SOURCE_DIR}/src/security-manager-tests/common/app_install_helper.cpp
++ ${PROJECT_SOURCE_DIR}/src/common/tzplatform.cpp
++ ${PROJECT_SOURCE_DIR}/src/common/sm_api.cpp
++ ${PROJECT_SOURCE_DIR}/src/common/sm_request.cpp
++ ${PROJECT_SOURCE_DIR}/src/common/sm_user_request.cpp
++ ${PROJECT_SOURCE_DIR}/src/common/sm_policy_request.cpp
++ ${PROJECT_SOURCE_DIR}/src/common/app_install_helper.cpp
+ ${PROJECT_SOURCE_DIR}/src/security-manager-tests/common/sm_commons.cpp
+ ${PROJECT_SOURCE_DIR}/src/security-manager-tests/common/policy_configuration.cpp
+ ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_client.cpp
+ )
+
+INCLUDE_DIRECTORIES(SYSTEM
+ ${SEC_MGR_TESTS_DEP_INCLUDE_DIRS}
+ )
+
+INCLUDE_DIRECTORIES(SYSTEM
+ ${CYNARA_TARGET_DEP_INCLUDE_DIRS}
+ )
+
+INCLUDE_DIRECTORIES(
+ ${PROJECT_SOURCE_DIR}/src/common/
+ ${PROJECT_SOURCE_DIR}/src/security-manager-tests/common/
+ ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/
+ )
+
+FIND_PACKAGE(Threads)
+
+ADD_EXECUTABLE(${TARGET_NETHER_TESTS} ${NETHER_TESTS_SOURCES})
+
+TARGET_LINK_LIBRARIES(${TARGET_NETHER_TESTS}
+ ${SEC_MGR_TESTS_DEP_LIBRARIES}
+ dpl-test-framework
+ tests-common
+ ${CMAKE_THREAD_LIBS_INIT}
+ )
+
+INSTALL(TARGETS ${TARGET_NETHER_TESTS} DESTINATION /usr/bin)
+
+INSTALL(FILES
+ ${PROJECT_SOURCE_DIR}/src/nether-tests/setup-nether-tests-nns.sh
+ ${PROJECT_SOURCE_DIR}/src/nether-tests/teardown-nether-tests-nns.sh
+ ${PROJECT_SOURCE_DIR}/src/nether-tests/setup-nether-tests-dns.sh
+ ${PROJECT_SOURCE_DIR}/src/nether-tests/teardown-nether-tests-dns.sh
+ DESTINATION bin
+ PERMISSIONS OWNER_READ
+ OWNER_WRITE
+ OWNER_EXECUTE
+ GROUP_READ
+ GROUP_EXECUTE
+ WORLD_READ
+ WORLD_EXECUTE
+ )