Add cynara_creds_get_[client|user]_method UT
[platform/core/security/cynara.git] / test / CMakeLists.txt
1 # Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
2 #
3 #    Licensed under the Apache License, Version 2.0 (the "License");
4 #    you may not use this file except in compliance with the License.
5 #    You may obtain a copy of the License at
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #    Unless required by applicable law or agreed to in writing, software
10 #    distributed under the License is distributed on an "AS IS" BASIS,
11 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #    See the License for the specific language governing permissions and
13 #    limitations under the License.
14 #
15 # @file        CMakeLists.txt
16 # @author      Aleksander Zdyb <a.zdyb@samsung.com>
17 # @author      Radoslaw Bartosiak <r.bartosiak@samsung.com>
18 # @brief       Cmake for tests
19 #
20 PKG_CHECK_MODULES(PKGS REQUIRED gmock)
21
22 ADD_DEFINITIONS("-DCYNARA_NO_LOGS")
23 SET(CYNARA_SRC ${PROJECT_SOURCE_DIR}/src)
24
25 SET(CYNARA_SOURCES_FOR_TESTS
26     ${CYNARA_SRC}/common/types/PolicyBucket.cpp
27     ${CYNARA_SRC}/common/types/PolicyKey.cpp
28     ${CYNARA_SRC}/common/types/PolicyKeyHelpers.cpp
29     ${CYNARA_SRC}/common/types/PolicyResult.cpp
30     ${CYNARA_SRC}/common/types/PolicyType.cpp
31     ${CYNARA_SRC}/helpers/creds-commons/CredsCommonsInner.cpp
32     ${CYNARA_SRC}/helpers/creds-commons/creds-commons.cpp
33     ${CYNARA_SRC}/storage/BucketDeserializer.cpp
34     ${CYNARA_SRC}/storage/InMemoryStorageBackend.cpp
35     ${CYNARA_SRC}/storage/Storage.cpp
36     ${CYNARA_SRC}/storage/StorageDeserializer.cpp
37     ${CYNARA_SRC}/storage/StorageSerializer.cpp
38 )
39
40 SET(CYNARA_TESTS_SOURCES
41     TestEventListenerProxy.cpp
42     common/exceptions/bucketrecordcorrupted.cpp
43     common/types/policybucket.cpp
44     credsCommons/parser/Parser.cpp
45     helpers.cpp
46     storage/performance/bucket.cpp
47     storage/storage/policies.cpp
48     storage/storage/check.cpp
49     storage/storage/buckets.cpp
50     storage/inmemorystoragebackend/inmemorystoragebackend.cpp
51     storage/inmemorystoragebackend/search.cpp
52     storage/inmemorystoragebackend/buckets.cpp
53     storage/serializer/bucket_load.cpp
54     storage/serializer/deserialize.cpp
55     storage/serializer/dump.cpp
56     storage/serializer/dump_load.cpp
57     storage/serializer/serialize.cpp
58     tests.cpp
59     types/policykey.cpp
60 )
61
62 INCLUDE_DIRECTORIES(
63     ${PKGS_INCLUDE_DIRS}
64     ${CYNARA_SRC}/common
65     ${CYNARA_SRC}/include
66     ${CYNARA_SRC}
67     credsCommons/parser
68 )
69
70 ADD_EXECUTABLE(${TARGET_CYNARA_TESTS}
71     ${CYNARA_SOURCES_FOR_TESTS}
72     ${CYNARA_TESTS_SOURCES}
73 )
74
75 TARGET_LINK_LIBRARIES(${TARGET_CYNARA_TESTS}
76     ${PKGS_LDFLAGS} ${PKGS_LIBRARIES}
77 )
78 INSTALL(TARGETS ${TARGET_CYNARA_TESTS} DESTINATION ${BIN_INSTALL_DIR})