Put perftests in proper place

This commit is contained in:
sangelovic
2019-01-26 23:16:37 +01:00
parent 3839c3ffd7
commit 97c47cb6df
9 changed files with 65 additions and 9 deletions

View File

@ -124,15 +124,6 @@ if(BUILD_CODE_GEN)
add_subdirectory("${CMAKE_SOURCE_DIR}/stub-generator")
endif()
#----------------------------------
# PERFORMANCE TESTS
#----------------------------------
option(ENABLE_PERFTESTS "Build and install performance tests (default OFF)" OFF)
if(ENABLE_PERFTESTS)
add_subdirectory("${CMAKE_SOURCE_DIR}/perftest")
endif()
#----------------------------------
# DOCUMENTATION

View File

@ -69,6 +69,15 @@ target_link_libraries(libsdbus-c++_unittests ${SYSTEMD_LIBRARIES} gmock gmock_ma
add_executable(libsdbus-c++_integrationtests ${INTEGRATIONTESTS_SRCS})
target_link_libraries(libsdbus-c++_integrationtests sdbus-c++ gmock gmock_main)
# Manual performance tests
option(ENABLE_PERFTESTS "Build and install manual performance tests (default OFF)" OFF)
if(ENABLE_PERFTESTS)
add_executable(libsdbus-c++_perftests_client perftests/client.cpp perftests/perftest-proxy.h)
target_link_libraries(libsdbus-c++_perftests_client sdbus-c++)
add_executable(libsdbus-c++_perftests_server perftests/server.cpp perftests/perftest-adaptor.h)
target_link_libraries(libsdbus-c++_perftests_server sdbus-c++)
endif()
#----------------------------------
# INSTALLATION
#----------------------------------
@ -77,6 +86,12 @@ install(TARGETS libsdbus-c++_unittests DESTINATION /opt/test/bin)
install(TARGETS libsdbus-c++_integrationtests DESTINATION /opt/test/bin)
install(FILES ${INTEGRATIONTESTS_SOURCE_DIR}/files/libsdbus-cpp-test.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d)
if(ENABLE_PERFTESTS)
install(TARGETS libsdbus-c++_perftests_client DESTINATION /opt/test/bin)
install(TARGETS libsdbus-c++_perftests_server DESTINATION /opt/test/bin)
install(FILES perftests/files/org.sdbuscpp.perftest.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d)
endif()
#----------------------------------
# RUNNING THE TESTS UPON BUILD
#----------------------------------

View File

@ -1,3 +1,28 @@
/**
* (C) 2019 KISTLER INSTRUMENTE AG, Winterthur, Switzerland
*
* @file client.cpp
*
* Created on: Jan 25, 2019
* Project: sdbus-c++
* Description: High-level D-Bus IPC C++ library based on sd-bus
*
* This file is part of sdbus-c++.
*
* sdbus-c++ is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* sdbus-c++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with sdbus-c++. If not, see <http://www.gnu.org/licenses/>.
*/
#include "perftest-proxy.h"
#include <sdbus-c++/sdbus-c++.h>
#include <vector>

View File

@ -1,3 +1,28 @@
/**
* (C) 2019 KISTLER INSTRUMENTE AG, Winterthur, Switzerland
*
* @file server.cpp
*
* Created on: Jan 25, 2019
* Project: sdbus-c++
* Description: High-level D-Bus IPC C++ library based on sd-bus
*
* This file is part of sdbus-c++.
*
* sdbus-c++ is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* sdbus-c++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with sdbus-c++. If not, see <http://www.gnu.org/licenses/>.
*/
#include "perftest-adaptor.h"
#include <sdbus-c++/sdbus-c++.h>
#include <vector>