Cleanup tests cmake file
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 2 Jul 2014 13:18:31 +0000 (15:18 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 3 Jul 2014 12:19:10 +0000 (14:19 +0200)
Requires: https://mcdsrvbld02.digital.local/review/#/c/15770/

Change-Id: I41e82319aa1ecaf647c303345fe30fb84010e568

17 files changed:
CMakeLists.txt
test/CMakeLists.txt
test/common/exceptions/bucketrecordcorrupted.cpp
test/common/types/policybucket.cpp
test/helpers.cpp
test/helpers.h
test/storage/inmemorystoragebackend/buckets.cpp
test/storage/inmemorystoragebackend/fakeinmemorystoragebackend.h
test/storage/inmemorystoragebackend/inmemeorystoragebackendfixture.h
test/storage/inmemorystoragebackend/inmemorystoragebackend.cpp
test/storage/inmemorystoragebackend/search.cpp
test/storage/serializer/bucket_load.cpp
test/storage/serializer/dump.cpp
test/storage/storage/buckets.cpp
test/storage/storage/check.cpp
test/storage/storage/policies.cpp
test/types/policykey.cpp

index 98a2f1f..7923083 100644 (file)
@@ -57,6 +57,7 @@ SET(TARGET_CYNARA "cynara")
 SET(TARGET_LIB_CYNARA "cynara-client")
 SET(TARGET_LIB_CYNARA_ADMIN "cynara-admin")
 SET(TARGET_CYNARA_COMMON "cynara-commons")
+SET(TARGET_CYNARA_TESTS "cynara-tests")
 
 ADD_SUBDIRECTORY(src)
 ADD_SUBDIRECTORY(build)
index 0b53fe5..5828e62 100644 (file)
 #
 # @file        CMakeLists.txt
 # @author      Aleksander Zdyb <a.zdyb@partner.samsung.com>
-# @brief       Temporary cmake for tests
+# @brief       Cmake for tests
 #
 
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
-PROJECT("cynara-tests")
-
 PKG_CHECK_MODULES(PKGS REQUIRED gmock_main)
 
-SET(CYNARA_SRC ${PROJECT_SOURCE_DIR}/../src)
+SET(CYNARA_SRC ${PROJECT_SOURCE_DIR}/src)
 
 SET(CYNARA_SOURCES_FOR_TESTS
     ${CYNARA_SRC}/service/storage/Storage.cpp
@@ -53,24 +50,17 @@ SET(CYNARA_TESTS_SOURCES
 
 INCLUDE_DIRECTORIES(
     ${PKGS_INCLUDE_DIRS}
-    ${CYNARA_SRC}
     ${CYNARA_SRC}/common
     ${CYNARA_SRC}/include
     ${CYNARA_SRC}/service
 )
 
-ADD_EXECUTABLE(cynara-tests
+ADD_EXECUTABLE(${TARGET_CYNARA_TESTS}
     ${CYNARA_SOURCES_FOR_TESTS}
     ${CYNARA_TESTS_SOURCES}
 )
 
-SET(CMAKE_CXX_FLAGS "-std=c++0x -O0 -g -gdwarf-2")
-
-FIND_PACKAGE(Threads)
-
-TARGET_LINK_LIBRARIES(cynara-tests
-    ${CMAKE_THREAD_LIBS_INIT}
+TARGET_LINK_LIBRARIES(${TARGET_CYNARA_TESTS}
     ${PKGS_LDFLAGS} ${PKGS_LIBRARIES}
 )
-
-INSTALL(TARGETS cynara-tests DESTINATION bin)
+INSTALL(TARGETS ${TARGET_CYNARA_TESTS} DESTINATION bin)
index 80aaadb..ddc6039 100644 (file)
@@ -24,7 +24,7 @@
 #include <gtest/gtest.h>
 #include <gmock/gmock.h>
 
-#include "common/exceptions/BucketRecordCorruptedException.h"
+#include "exceptions/BucketRecordCorruptedException.h"
 
 using namespace Cynara;
 
index b48283f..db6c761 100644 (file)
@@ -23,9 +23,9 @@
 #include <gtest/gtest.h>
 #include <gmock/gmock.h>
 
-#include "common/types/PolicyBucket.h"
-#include "common/types/PolicyKey.h"
-#include "common/types/PolicyCollection.h"
+#include "types/PolicyBucket.h"
+#include "types/PolicyKey.h"
+#include "types/PolicyCollection.h"
 
 #include "../../helpers.h"
 
index 17676cf..b6c5bd9 100644 (file)
@@ -22,7 +22,7 @@
 
 
 #include "helpers.h"
-#include "common/types/PolicyKey.h"
+#include "types/PolicyKey.h"
 
 namespace Cynara {
 namespace Helpers {
index a3ca9ea..1f678d5 100644 (file)
@@ -23,8 +23,8 @@
 #ifndef HELPERS_H
 #define HELPERS_H
 
-#include "common/types/PolicyKey.h"
-#include "common/types/PolicyBucketId.h"
+#include "types/PolicyKey.h"
+#include "types/PolicyBucketId.h"
 
 namespace Cynara {
 namespace Helpers {
index bcdca54..bf2c87c 100644 (file)
@@ -25,8 +25,8 @@
 #include "inmemeorystoragebackendfixture.h"
 #include "fakeinmemorystoragebackend.h"
 
-#include "common/types/PolicyResult.h"
-#include "common/types/PolicyBucket.h"
+#include "types/PolicyResult.h"
+#include "types/PolicyBucket.h"
 
 using namespace Cynara;
 
index 60e3ed4..52e046f 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef FAKEINMEMORYSTORAGEBACKEND_H_
 #define FAKEINMEMORYSTORAGEBACKEND_H_
 
-#include "service/storage/InMemoryStorageBackend.h"
+#include "storage/InMemoryStorageBackend.h"
 
 class FakeInMemoryStorageBackend : public Cynara::InMemoryStorageBackend {
 public:
index ed07ebe..21ae4fc 100644 (file)
@@ -25,9 +25,9 @@
 
 #include "gmock/gmock.h"
 
-#include "common/types/PolicyBucket.h"
-#include "common/types/PolicyCollection.h"
-#include "service/storage/InMemoryStorageBackend.h"
+#include "types/PolicyBucket.h"
+#include "types/PolicyCollection.h"
+#include "storage/InMemoryStorageBackend.h"
 
 class InMemeoryStorageBackendFixture : public ::testing::Test {
 
index 9cfe8cb..bd682b3 100644 (file)
 #include <gtest/gtest.h>
 #include <gmock/gmock.h>
 
-#include "common/types/PolicyType.h"
-#include "common/types/PolicyKey.h"
-#include "common/types/PolicyResult.h"
-#include "common/types/PolicyCollection.h"
-#include "common/exceptions/DefaultBucketDeletionException.h"
-#include "common/exceptions/BucketAlreadyExistsException.h"
-#include "common/exceptions/BucketNotExistsException.h"
-#include "service/storage/StorageBackend.h"
-#include "service/storage/InMemoryStorageBackend.h"
+#include "types/PolicyType.h"
+#include "types/PolicyKey.h"
+#include "types/PolicyResult.h"
+#include "types/PolicyCollection.h"
+#include "exceptions/DefaultBucketDeletionException.h"
+#include "exceptions/BucketAlreadyExistsException.h"
+#include "exceptions/BucketNotExistsException.h"
+#include "storage/StorageBackend.h"
+#include "storage/InMemoryStorageBackend.h"
 
 #include "../../helpers.h"
 #include "fakeinmemorystoragebackend.h"
index 705c075..65c9057 100644 (file)
@@ -26,7 +26,7 @@
 #include "inmemeorystoragebackendfixture.h"
 #include "fakeinmemorystoragebackend.h"
 
-#include "common/types/PolicyBucket.h"
+#include "types/PolicyBucket.h"
 
 #include "../../helpers.h"
 
index 87d6fb0..b43d12f 100644 (file)
@@ -25,7 +25,7 @@
 #include <gtest/gtest.h>
 
 #include <exceptions/BucketRecordCorruptedException.h>
-#include <service/storage/BucketDeserializer.h>
+#include <storage/BucketDeserializer.h>
 #include <types/Policy.h>
 
 #include "../../helpers.h"
index 9d53e17..b75928e 100644 (file)
 #include <gtest/gtest.h>
 #include <gmock/gmock.h>
 
-#include "service/storage/StorageSerializer.h"
-#include "common/types/PolicyBucket.h"
-#include "common/types/PolicyType.h"
-#include "common/types/PolicyKey.h"
-#include "common/types/Policy.h"
+#include "storage/StorageSerializer.h"
+#include "types/PolicyBucket.h"
+#include "types/PolicyType.h"
+#include "types/PolicyKey.h"
+#include "types/Policy.h"
 
 #include "../../helpers.h"
 
index e34c67a..44e4cfd 100644 (file)
 #include <gtest/gtest.h>
 #include <gmock/gmock.h>
 
-#include "common/types/PolicyType.h"
-#include "common/types/PolicyKey.h"
-#include "common/types/PolicyResult.h"
-#include "common/types/PolicyCollection.h"
-#include "common/types/pointers.h"
-#include "common/exceptions/DefaultBucketDeletionException.h"
-#include "common/exceptions/BucketAlreadyExistsException.h"
-#include "service/storage/Storage.h"
-#include "service/storage/StorageBackend.h"
+#include "types/PolicyType.h"
+#include "types/PolicyKey.h"
+#include "types/PolicyResult.h"
+#include "types/PolicyCollection.h"
+#include "types/pointers.h"
+#include "exceptions/DefaultBucketDeletionException.h"
+#include "exceptions/BucketAlreadyExistsException.h"
+#include "storage/Storage.h"
+#include "storage/StorageBackend.h"
 
 
 #include "fakestoragebackend.h"
index 129eb8d..c91cd1f 100644 (file)
 #include <gtest/gtest.h>
 #include <gmock/gmock.h>
 
-#include "common/types/PolicyType.h"
-#include "common/types/PolicyKey.h"
-#include "common/types/PolicyResult.h"
-#include "common/types/PolicyCollection.h"
-#include "common/types/pointers.h"
-#include "common/exceptions/DefaultBucketDeletionException.h"
-#include "common/exceptions/BucketAlreadyExistsException.h"
-#include "service/storage/Storage.h"
-#include "service/storage/StorageBackend.h"
+#include "types/PolicyType.h"
+#include "types/PolicyKey.h"
+#include "types/PolicyResult.h"
+#include "types/PolicyCollection.h"
+#include "types/pointers.h"
+#include "exceptions/DefaultBucketDeletionException.h"
+#include "exceptions/BucketAlreadyExistsException.h"
+#include "storage/Storage.h"
+#include "storage/StorageBackend.h"
 
 #include "fakestoragebackend.h"
 #include "../../helpers.h"
index fc067be..d43d918 100644 (file)
 #include <gtest/gtest.h>
 #include <gmock/gmock.h>
 
-#include "common/types/PolicyType.h"
-#include "common/types/PolicyKey.h"
-#include "common/types/PolicyResult.h"
-#include "common/types/PolicyCollection.h"
-#include "common/types/pointers.h"
-#include "common/exceptions/DefaultBucketDeletionException.h"
-#include "common/exceptions/BucketAlreadyExistsException.h"
-#include "service/storage/Storage.h"
-#include "service/storage/StorageBackend.h"
+#include "types/PolicyType.h"
+#include "types/PolicyKey.h"
+#include "types/PolicyResult.h"
+#include "types/PolicyCollection.h"
+#include "types/pointers.h"
+#include "exceptions/DefaultBucketDeletionException.h"
+#include "exceptions/BucketAlreadyExistsException.h"
+#include "storage/Storage.h"
+#include "storage/StorageBackend.h"
 
 
 #include "fakestoragebackend.h"
index 4ed7fd2..0c8bd3b 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "../helpers.h"
 
-#include "common/types/PolicyKey.h"
+#include "types/PolicyKey.h"
 
 using namespace Cynara;