summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Linke <christian.linke@bmw.de>2014-11-03 08:44:18 +0100
committerChristian Linke <christian.linke@bmw.de>2014-11-03 18:37:32 +0100
commit6737f225604b116185225c6647a2c59f1b03ae24 (patch)
treea7de365e6598fb679ef06669f29bf9da72c0b4bc
parentbfd958452e5005a8a7a484afdfa3b1065e1e0c82 (diff)
downloadaudiomanager-6737f225604b116185225c6647a2c59f1b03ae24.tar.gz
* Make Audiomanager compile without sqlite
Signed-off-by: Christian Linke <christian.linke@bmw.de>
-rw-r--r--AudioManagerDaemon/CMakeLists.txt2
-rw-r--r--AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp2
-rw-r--r--AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.h5
-rw-r--r--AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt6
-rw-r--r--AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt4
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt4
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CMakeLists.txt4
-rw-r--r--AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp2
-rw-r--r--AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.h4
-rw-r--r--AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt3
-rw-r--r--AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.cpp2
-rw-r--r--AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.h4
-rw-r--r--AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt3
-rw-r--r--AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.cpp4
-rw-r--r--AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt1
-rw-r--r--PluginRoutingInterfaceAsync/test/CMakeLists.txt4
16 files changed, 30 insertions, 24 deletions
diff --git a/AudioManagerDaemon/CMakeLists.txt b/AudioManagerDaemon/CMakeLists.txt
index 37842a1..e263aea 100644
--- a/AudioManagerDaemon/CMakeLists.txt
+++ b/AudioManagerDaemon/CMakeLists.txt
@@ -157,6 +157,7 @@ INCLUDE_DIRECTORIES(
IF(WITH_CAPI_WRAPPER)
+IF(WITH_NSM)
# Find the common-api sources.
# The sources can be placed in the build directory (DESTINATION) or in the source tree (ALT_DESTINATION).
# The ALT_DESTINATION is used as fall back if the DESTINATION directory dosen't contain the sources or you just don't want to use the generator.
@@ -166,6 +167,7 @@ COMMON_API_GENERATE_SOUCRES(TARGET COMMON_API
DESTINATION src-gen # a relative path to the build directory or an absolute path
ALT_DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src-gen # an alternative relative/absolute path with common-api sources, usually in the source tree
DBUS)
+ENDIF(WITH_NSM)
INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES}
${COMMON_API_INCLUDE_DIRS}
diff --git a/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp b/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp
index 5448c7d..2dd059f 100644
--- a/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp
+++ b/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp
@@ -35,7 +35,7 @@ CAmControlInterfaceTest::CAmControlInterfaceTest() :
pDBusWrapper((CAmDbusWrapper*) 1), //
plistCommandPluginDirs(), //
plistRoutingPluginDirs(), //
- pDatabaseHandler(std::string(":memory:")), //
+ pDatabaseHandler(), //
pRoutingSender(plistRoutingPluginDirs), //RoutingReceiver
pCommandSender(plistCommandPluginDirs), //
pMockControlInterface(), //
diff --git a/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.h b/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.h
index a65d9fd..861b9ac 100644
--- a/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.h
+++ b/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.h
@@ -24,7 +24,8 @@
#include "gtest/gtest.h"
#include "gmock/gmock.h"
-#include "CAmDatabaseHandlerSQLite.h"
+//#include "CAmDatabaseHandlerSQLite.h"
+#include "CAmDatabaseHandlerMap.h"
#include "CAmControlReceiver.h"
#include "CAmRoutingReceiver.h"
#include "CAmDatabaseObserver.h"
@@ -52,7 +53,7 @@ public:
CAmDbusWrapper* pDBusWrapper;
std::vector<std::string> plistCommandPluginDirs;
std::vector<std::string> plistRoutingPluginDirs;
- CAmDatabaseHandlerSQLite pDatabaseHandler;
+ CAmDatabaseHandlerMap pDatabaseHandler;
CAmRoutingSender pRoutingSender;
CAmCommandSender pCommandSender;
MockIAmControlSend pMockControlInterface;
diff --git a/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt b/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt
index 80bfa90..a2238b1 100644
--- a/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt
@@ -22,7 +22,9 @@ PROJECT(AmControlInterfaceTest)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1 -DDLT_CONTEXT=AudioManager")
FIND_PACKAGE(PkgConfig)
-pkg_check_modules(SQLITE REQUIRED sqlite3)
+IF(WITH_DATABASE_STORAGE)
+ pkg_check_modules(SQLITE REQUIRED sqlite3)
+ENDIF(WITH_DATABASE_STORAGE)
IF(WITH_DLT)
pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0)
@@ -43,7 +45,7 @@ INCLUDE_DIRECTORIES(
)
file(GLOB CONTROL_INTERFACE_SRCS_CXX
- "../../src/CAmDatabaseHandlerSQLite.cpp"
+ "../../src/CAmDatabaseHandlerMap.cpp"
"../../src/CAmDatabaseObserver.cpp"
"../../src/CAmRoutingSender.cpp"
"../../src/CAmRoutingReceiver.cpp"
diff --git a/AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt b/AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt
index 032cdbb..99dd576 100644
--- a/AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt
@@ -23,7 +23,8 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1 -DDLT_CONTEXT=AudioMan
FIND_PACKAGE(PkgConfig)
-pkg_check_modules(SQLITE REQUIRED sqlite3)
+IF(WITH_DATABASE_STORAGE)
+ pkg_check_modules(SQLITE REQUIRED sqlite3)
IF(WITH_DLT)
pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0)
@@ -88,4 +89,5 @@ INSTALL(TARGETS AmDatabaseHandlerTest
SET(ADD_DEPEND "audiomanager-bin" "sqlite3(>=3.6.22)" "dlt" "libdbus-1-3(>=1.2.16)" "libpthread-stubs0")
set_property(GLOBAL APPEND PROPERTY tests_prop "${ADD_DEPEND}")
+ENDIF(WITH_DATABASE_STORAGE)
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt
index d317b62..3a58b24 100644
--- a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt
@@ -28,7 +28,9 @@ set(EXECUTABLE_OUTPUT_PATH ${TEST_EXECUTABLE_OUTPUT_PATH})
FIND_PACKAGE(Threads)
FIND_PACKAGE(PkgConfig)
FIND_PACKAGE(CommonAPI REQUIRED)
-pkg_check_modules(SQLITE REQUIRED sqlite3)
+IF(WITH_DATABASE_STORAGE)
+ pkg_check_modules(SQLITE REQUIRED sqlite3)
+ENDIF(WITH_DATABASE_STORAGE)
IF(WITH_DLT)
pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0)
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CMakeLists.txt b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CMakeLists.txt
index 4ecd421..242aff4 100644
--- a/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CMakeLists.txt
@@ -27,7 +27,9 @@ set(EXECUTABLE_OUTPUT_PATH ${TEST_EXECUTABLE_OUTPUT_PATH})
FIND_PACKAGE(Threads)
FIND_PACKAGE(DBUS REQUIRED)
FIND_PACKAGE(PkgConfig)
-pkg_check_modules(SQLITE REQUIRED sqlite3)
+IF(WITH_DATABASE_STORAGE)
+ pkg_check_modules(SQLITE REQUIRED sqlite3)
+ENDIF(WITH_DATABASE_STORAGE)
IF(WITH_DLT)
diff --git a/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp b/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp
index 46f9577..2f29e33 100644
--- a/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp
+++ b/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp
@@ -30,7 +30,7 @@ CAmRouterTest::CAmRouterTest() :
plistCommandPluginDirs(), //
pSocketHandler(), //
pControlSender(), //
- pDatabaseHandler(std::string(":memory:")),
+ pDatabaseHandler(),
pRouter(&pDatabaseHandler, &pControlSender), //
pRoutingSender(plistRoutingPluginDirs), //
pCommandSender(plistCommandPluginDirs), //
diff --git a/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.h b/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.h
index 9ed8f74..ee66bf3 100644
--- a/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.h
+++ b/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.h
@@ -30,7 +30,7 @@
#include <string>
#include <vector>
#include <set>
-#include "CAmDatabaseHandlerSQLite.h"
+#include "CAmDatabaseHandlerMap.h"
#include "CAmControlReceiver.h"
#include "CAmControlSender.h"
#include "CAmDatabaseObserver.h"
@@ -56,7 +56,7 @@ public:
std::vector<std::string> plistCommandPluginDirs;
CAmSocketHandler pSocketHandler;
CAmControlSender pControlSender;
- CAmDatabaseHandlerSQLite pDatabaseHandler;
+ CAmDatabaseHandlerMap pDatabaseHandler;
CAmRouter pRouter;
CAmRoutingSender pRoutingSender;
CAmCommandSender pCommandSender;
diff --git a/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt b/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt
index 602767b..7a7b890 100644
--- a/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt
@@ -23,7 +23,6 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1 -DDLT_CONTEXT=AudioMan
FIND_PACKAGE(PkgConfig)
-pkg_check_modules(SQLITE REQUIRED sqlite3)
IF(WITH_DLT)
pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0)
@@ -44,7 +43,7 @@ INCLUDE_DIRECTORIES(
)
file(GLOB ROUTING_SRCS_CXX
- "../../src/CAmDatabaseHandlerSQLite.cpp"
+ "../../src/CAmDatabaseHandlerMap.cpp"
"../../src/CAmDatabaseObserver.cpp"
"../../src/CAmCommandSender.cpp"
"../../src/CAmRoutingSender.cpp"
diff --git a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.cpp b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.cpp
index 42ef261..ea94f7b 100644
--- a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.cpp
+++ b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.cpp
@@ -28,7 +28,7 @@ CAmRoutingInterfaceTest::CAmRoutingInterfaceTest() :
plistRoutingPluginDirs(), //
plistCommandPluginDirs(), //
pSocketHandler(), //
- pDatabaseHandler(std::string(":memory:")), //
+ pDatabaseHandler(), //
pRoutingSender(plistRoutingPluginDirs), //
pCommandSender(plistCommandPluginDirs), //
pControlSender(), //
diff --git a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.h b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.h
index 74130e8..c354f75 100644
--- a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.h
+++ b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.h
@@ -27,7 +27,7 @@
#include <string>
#include <vector>
#include <set>
-#include "CAmDatabaseHandlerSQLite.h"
+#include "CAmDatabaseHandlerMap.h"
#include "CAmControlReceiver.h"
#include "CAmControlSender.h"
#include "CAmDatabaseObserver.h"
@@ -49,7 +49,7 @@ public:
std::vector<std::string> plistRoutingPluginDirs;
std::vector<std::string> plistCommandPluginDirs;
CAmSocketHandler pSocketHandler;
- CAmDatabaseHandlerSQLite pDatabaseHandler;
+ CAmDatabaseHandlerMap pDatabaseHandler;
CAmRoutingSender pRoutingSender;
CAmCommandSender pCommandSender;
CAmControlSender pControlSender;
diff --git a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt
index 122ea69..d619b02 100644
--- a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt
@@ -24,7 +24,6 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUNIT_TEST=1 -DDLT_CONTEXT=AudioManage
FIND_PACKAGE(PkgConfig)
-pkg_check_modules(SQLITE REQUIRED sqlite3)
IF(WITH_DLT)
pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0)
@@ -46,7 +45,7 @@ INCLUDE_DIRECTORIES(
file(GLOB ROUTING_INTERFACE_SRCS_CXX
"../../src/CAmControlReceiver.cpp"
- "../../src/CAmDatabaseHandlerSQLite.cpp"
+ "../../src/CAmDatabaseHandlerMap.cpp"
"../../src/CAmDatabaseObserver.cpp"
"../../src/CAmCommandSender.cpp"
"../../src/CAmRoutingSender.cpp"
diff --git a/AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.cpp b/AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.cpp
index 429ceda..e940423 100644
--- a/AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.cpp
+++ b/AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.cpp
@@ -54,11 +54,7 @@ CAmEnvironment::CAmEnvironment()
: mlistRoutingPluginDirs()
, mlistCommandPluginDirs()
, mSocketHandler()
-#ifdef WITH_DATABASE_STORAGE
-, mDatabasehandler(std::string(":memory:"))
-#else
, mDatabasehandler()
-#endif
, mRoutingSender(mlistRoutingPluginDirs)
, mCommandSender(mlistRoutingPluginDirs)
, mControlSender(controllerPlugin,&mSocketHandler)
diff --git a/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt b/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt
index 26c83d9..e765859 100644
--- a/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt
@@ -55,7 +55,6 @@ file(GLOB TELNET_SRCS_CXX
"../../src/CAmControlReceiver.cpp"
"../../src/CAmControlSender.cpp"
"../../src/CAmDatabaseHandlerMap.cpp"
- "../../src/CAmDatabaseHandlerSQLite.cpp"
"../../src/CAmDatabaseObserver.cpp"
"../../src/CAmRoutingReceiver.cpp"
"../../src/CAmRoutingSender.cpp"
diff --git a/PluginRoutingInterfaceAsync/test/CMakeLists.txt b/PluginRoutingInterfaceAsync/test/CMakeLists.txt
index 434c6f9..8df4bdd 100644
--- a/PluginRoutingInterfaceAsync/test/CMakeLists.txt
+++ b/PluginRoutingInterfaceAsync/test/CMakeLists.txt
@@ -30,7 +30,9 @@ IF(WITH_DLT)
pkg_check_modules(DLT REQUIRED automotive-dlt)
ENDIF(WITH_DLT)
-pkg_check_modules(SQLITE REQUIRED sqlite3)
+IF(WITH_DATABASE_STORAGE)
+ pkg_check_modules(SQLITE REQUIRED sqlite3)
+ENDIF(WITH_DATABASE_STORAGE)
INCLUDE_DIRECTORIES(
${STD_INCLUDE_DIRS}