X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=tests%2FCMakeLists.txt;h=b1b4d87805c9fda0a1cbbcb7dac40486739827ac;hb=17db03f16c4f6da317e326ecdbdf3dbe177051ee;hp=a4bba5f0207f4ea7504555f6e564932bdf329aff;hpb=49ed794c5a7f7670793ba8a84ef56d5a2db1c6dd;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a4bba5f..b1b4d87 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved +# Copyright (c) 2015 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. @@ -13,32 +13,46 @@ # limitations under the License. # -INSTALL(FILES ${PROJECT_SOURCE_DIR}/tests/security-tests.sh - DESTINATION bin - PERMISSIONS OWNER_READ - OWNER_WRITE - OWNER_EXECUTE - GROUP_READ - GROUP_EXECUTE - WORLD_READ - WORLD_EXECUTE +cmake_minimum_required(VERSION 2.8.3) + +INCLUDE(FindPkgConfig) +SET(INNER_TARGET_TEST "security-tests-inner-test") + +PKG_CHECK_MODULES(INNER_TARGET_DEP + REQUIRED + glib-2.0 ) -INSTALL(FILES ${PROJECT_SOURCE_DIR}/tests/security-tests-all.sh - DESTINATION bin - PERMISSIONS OWNER_READ - OWNER_WRITE - OWNER_EXECUTE - GROUP_READ - GROUP_EXECUTE - WORLD_READ - WORLD_EXECUTE +#files to compile +SET(INNER_TARGET_TEST_SOURCES + ${PROJECT_SOURCE_DIR}/tests/inner-test.cpp + ${PROJECT_SOURCE_DIR}/tests/common/test_cases_timeout.cpp + ${PROJECT_SOURCE_DIR}/tests/framework/test_cases_deferred.cpp + ) + +#header directories +INCLUDE_DIRECTORIES(SYSTEM + ${INNER_TARGET_DEP_INCLUDE_DIRS} ) -INSTALL(FILES - ${PROJECT_SOURCE_DIR}/tests/test-performance-check.sh - ${PROJECT_SOURCE_DIR}/tests/perf - DESTINATION bin +INCLUDE_DIRECTORIES( + ${PROJECT_SOURCE_DIR}/src/framework/include/ + ${PROJECT_SOURCE_DIR}/src/ + ) + +#output format +ADD_EXECUTABLE(${INNER_TARGET_TEST} ${INNER_TARGET_TEST_SOURCES}) + +#linker directories +TARGET_LINK_LIBRARIES(${INNER_TARGET_TEST} + ${INNER_TARGET_DEP_LIBRARIES} + tests-common + dpl-test-framework + ) + +#place for output file +INSTALL(TARGETS ${INNER_TARGET_TEST} + DESTINATION /usr/bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE @@ -47,8 +61,3 @@ INSTALL(FILES WORLD_READ WORLD_EXECUTE ) - -ADD_SUBDIRECTORY(libprivilege-control-tests) -ADD_SUBDIRECTORY(libsmack-tests) -ADD_SUBDIRECTORY(security-server-tests) -ADD_SUBDIRECTORY(security-server-client)