blob: 4440cdc418b347edbf19e53751993c06eb187ac1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
include(${CMAKE_SOURCE_DIR}/tools/intergen/GenerateInterfaceLibrary.cmake)
if (${HMI_DBUS_API})
GenerateInterfaceLibrary("test_interface.xml" test_rpc_interface DBUS_SUPPORT)
else()
GenerateInterfaceLibrary("test_interface.xml" test_rpc_interface)
endif()
set (TEST_HMI_INTERFACES
common
buttons
navigation
basic_communication
tts
ui
)
if (${HMI_DBUS_API})
GenerateInterfaceLibrary("test_hmi_interafce.xml" "${TEST_HMI_INTERFACES}" AUTO_FUNC_IDS DBUS_SUPPORT)
else()
GenerateInterfaceLibrary("test_hmi_interafce.xml" "${TEST_HMI_INTERFACES}" AUTO_FUNC_IDS)
endif()
include_directories (
${CMAKE_SOURCE_DIR}/src/components/rpc_base/include
${GMOCK_INCLUDE_DIRECTORY}
${JSONCPP_INCLUDE_DIRECTORY}
${CMAKE_CURRENT_BINARY_DIR}
)
set (LIBRARIES
gtest
gtest_main
gmock
gmock_main
test_rpc_interface
)
set (SOURCES
src/generated_interface_json_tests.cc
)
if (${HMI_DBUS_API})
# Build dbus tests
include_directories(
${CMAKE_SOURCE_DIR}/src/components/dbus/include
${DBUS_INCLUDE_DIRS}
)
set (LIBRARIES ${LIBRARIES} DBus)
set (SOURCES ${SOURCES} src/generated_interface_dbus_tests.cc)
endif ()
create_test(test_generated_interface "${SOURCES}" "${LIBRARIES}")
|