Rename test executables for consistency

This commit is contained in:
Stanislav Angelovic
2019-03-28 18:25:31 +01:00
parent a04ab9f445
commit fc60700e1b
20 changed files with 62 additions and 62 deletions

View File

@@ -33,7 +33,7 @@ add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src
set(UNITTESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/unittests) set(UNITTESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/unittests)
set(UNITTESTS_SRCS set(UNITTESTS_SRCS
${UNITTESTS_SOURCE_DIR}/libsdbus-c++_unittests.cpp ${UNITTESTS_SOURCE_DIR}/sdbus-c++-unit-tests.cpp
${UNITTESTS_SOURCE_DIR}/Message_test.cpp ${UNITTESTS_SOURCE_DIR}/Message_test.cpp
${UNITTESTS_SOURCE_DIR}/Types_test.cpp ${UNITTESTS_SOURCE_DIR}/Types_test.cpp
${UNITTESTS_SOURCE_DIR}/TypeTraits_test.cpp ${UNITTESTS_SOURCE_DIR}/TypeTraits_test.cpp
@@ -44,7 +44,7 @@ set(INTEGRATIONTESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/integrationtests)
set(INTEGRATIONTESTS_SRCS set(INTEGRATIONTESTS_SRCS
${INTEGRATIONTESTS_SOURCE_DIR}/AdaptorAndProxy_test.cpp ${INTEGRATIONTESTS_SOURCE_DIR}/AdaptorAndProxy_test.cpp
${INTEGRATIONTESTS_SOURCE_DIR}/Connection_test.cpp ${INTEGRATIONTESTS_SOURCE_DIR}/Connection_test.cpp
${INTEGRATIONTESTS_SOURCE_DIR}/libsdbus-c++_integrationtests.cpp ${INTEGRATIONTESTS_SOURCE_DIR}/sdbus-c++-integration-tests.cpp
${INTEGRATIONTESTS_SOURCE_DIR}/adaptor-glue.h ${INTEGRATIONTESTS_SOURCE_DIR}/adaptor-glue.h
${INTEGRATIONTESTS_SOURCE_DIR}/defs.h ${INTEGRATIONTESTS_SOURCE_DIR}/defs.h
${INTEGRATIONTESTS_SOURCE_DIR}/proxy-glue.h ${INTEGRATIONTESTS_SOURCE_DIR}/proxy-glue.h
@@ -61,7 +61,7 @@ set(STRESSTESTS_SERVER_SRCS
set(STRESSTESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/stresstests) set(STRESSTESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/stresstests)
set(STRESSTESTS_SRCS set(STRESSTESTS_SRCS
${STRESSTESTS_SOURCE_DIR}/stresstests.cpp ${STRESSTESTS_SOURCE_DIR}/sdbus-c++-stress-tests.cpp
${STRESSTESTS_SOURCE_DIR}/fahrenheit-thermometer-adaptor.h ${STRESSTESTS_SOURCE_DIR}/fahrenheit-thermometer-adaptor.h
${STRESSTESTS_SOURCE_DIR}/fahrenheit-thermometer-proxy.h ${STRESSTESTS_SOURCE_DIR}/fahrenheit-thermometer-proxy.h
${STRESSTESTS_SOURCE_DIR}/concatenator-adaptor.h ${STRESSTESTS_SOURCE_DIR}/concatenator-adaptor.h
@@ -81,24 +81,24 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# targets even when INTERFACE_INCLUDE_DIRECTORIES is used. # targets even when INTERFACE_INCLUDE_DIRECTORIES is used.
set(CMAKE_NO_SYSTEM_FROM_IMPORTED "1") set(CMAKE_NO_SYSTEM_FROM_IMPORTED "1")
add_executable(libsdbus-c++_unittests ${UNITTESTS_SRCS} $<TARGET_OBJECTS:sdbuscppobjects>) add_executable(sdbus-c++-unit-tests ${UNITTESTS_SRCS} $<TARGET_OBJECTS:sdbuscppobjects>)
target_link_libraries(libsdbus-c++_unittests ${SYSTEMD_LIBRARIES} gmock gmock_main) target_link_libraries(sdbus-c++-unit-tests ${SYSTEMD_LIBRARIES} gmock gmock_main)
add_executable(libsdbus-c++_integrationtests ${INTEGRATIONTESTS_SRCS}) add_executable(sdbus-c++-integration-tests ${INTEGRATIONTESTS_SRCS})
target_link_libraries(libsdbus-c++_integrationtests sdbus-c++ gmock gmock_main) target_link_libraries(sdbus-c++-integration-tests sdbus-c++ gmock gmock_main)
# Manual performance tests # Manual performance tests
option(ENABLE_PERFTESTS "Build and install manual performance tests (default OFF)" OFF) option(ENABLE_PERF_TESTS "Build and install manual performance tests (default OFF)" OFF)
if(ENABLE_PERFTESTS) if(ENABLE_PERF_TESTS)
add_executable(libsdbus-c++_perftests_client ${STRESSTESTS_CLIENT_SRCS}) add_executable(sdbus-c++-perf-tests-client ${STRESSTESTS_CLIENT_SRCS})
target_link_libraries(libsdbus-c++_perftests_client sdbus-c++) target_link_libraries(sdbus-c++-perf-tests-client sdbus-c++)
add_executable(libsdbus-c++_perftests_server ${STRESSTESTS_SERVER_SRCS}) add_executable(sdbus-c++-perf-tests-server ${STRESSTESTS_SERVER_SRCS})
target_link_libraries(libsdbus-c++_perftests_server sdbus-c++) target_link_libraries(sdbus-c++-perf-tests-server sdbus-c++)
endif() endif()
# Manual stress tests # Manual stress tests
option(ENABLE_STRESSTESTS "Build and install manual stress tests (default OFF)" ON) option(ENABLE_STRESS_TESTS "Build and install manual stress tests (default OFF)" OFF)
if(ENABLE_STRESSTESTS) if(ENABLE_STRESS_TESTS)
set(THREADS_PREFER_PTHREAD_FLAG ON) set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
@@ -110,19 +110,19 @@ endif()
# INSTALLATION # INSTALLATION
#---------------------------------- #----------------------------------
install(TARGETS libsdbus-c++_unittests DESTINATION /opt/test/bin) install(TARGETS sdbus-c++-unit-tests DESTINATION /opt/test/bin)
install(TARGETS libsdbus-c++_integrationtests DESTINATION /opt/test/bin) install(TARGETS sdbus-c++-integration-tests DESTINATION /opt/test/bin)
install(FILES ${INTEGRATIONTESTS_SOURCE_DIR}/files/libsdbus-cpp-test.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d) install(FILES ${INTEGRATIONTESTS_SOURCE_DIR}/files/org.sdbuscpp.integrationtests.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d)
if(ENABLE_PERFTESTS) if(ENABLE_PERF_TESTS)
install(TARGETS libsdbus-c++_perftests_client DESTINATION /opt/test/bin) install(TARGETS sdbus-c++-perf-tests-client DESTINATION /opt/test/bin)
install(TARGETS libsdbus-c++_perftests_server DESTINATION /opt/test/bin) install(TARGETS sdbus-c++-perf-tests-server DESTINATION /opt/test/bin)
install(FILES perftests/files/org.sdbuscpp.perftest.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d) install(FILES ${PERFTESTS_SOURCE_DIR}/files/org.sdbuscpp.perftests.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d)
endif() endif()
if(ENABLE_STRESSTESTS) if(ENABLE_STRESS_TESTS)
install(TARGETS sdbus-c++-stress-tests DESTINATION /opt/test/bin) install(TARGETS sdbus-c++-stress-tests DESTINATION /opt/test/bin)
install(FILES perftests/files/org.sdbuscpp.stresstest.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d) install(FILES ${STRESSTESTS_SOURCE_DIR}/files/org.sdbuscpp.stresstests.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d)
endif() endif()
#---------------------------------- #----------------------------------
@@ -140,9 +140,9 @@ if(CMAKE_CROSSCOMPILING)
if(NOT (UNIT_TESTS_RUNNER AND TEST_DEVICE_IP)) if(NOT (UNIT_TESTS_RUNNER AND TEST_DEVICE_IP))
message(WARNING "UNIT_TESTS_RUNNER and TEST_DEVICE_IP variables must be defined to run tests remotely") message(WARNING "UNIT_TESTS_RUNNER and TEST_DEVICE_IP variables must be defined to run tests remotely")
endif() endif()
add_test(NAME libsdbus-c++_unittests COMMAND ${UNIT_TESTS_RUNNER} --deviceip=${TEST_DEVICE_IP} --testbin=libsdbus-c++_unittests) add_test(NAME sdbus-c++-unit-tests COMMAND ${UNIT_TESTS_RUNNER} --deviceip=${TEST_DEVICE_IP} --testbin=sdbus-c++-unit-tests)
add_test(NAME libsdbus-c++_integrationtests COMMAND ${UNIT_TESTS_RUNNER} --deviceip=${TEST_DEVICE_IP} --testbin=libsdbus-c++_integrationtests) add_test(NAME sdbus-c++-integration-tests COMMAND ${UNIT_TESTS_RUNNER} --deviceip=${TEST_DEVICE_IP} --testbin=sdbus-c++-integration-tests)
else() else()
add_test(NAME libsdbus-c++_unittests COMMAND libsdbus-c++_unittests) add_test(NAME sdbus-c++_unit-tests COMMAND sdbus-c++-unit-tests)
add_test(NAME libsdbus-c++_integrationtests COMMAND libsdbus-c++_integrationtests) add_test(NAME sdbus-c++_integration-tests COMMAND sdbus-c++-integration-tests)
endif() endif()

View File

@@ -210,7 +210,7 @@ R"delimiter(<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspectio
<arg type="as" name="invalidated_properties"/> <arg type="as" name="invalidated_properties"/>
</signal> </signal>
</interface> </interface>
<interface name="com.kistler.testsdbuscpp"> <interface name="org.sdbuscpp.integrationtests">
<annotation name="org.freedesktop.DBus.Deprecated" value="true"/> <annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
<method name="doOperation"> <method name="doOperation">
<arg type="u" direction="in"/> <arg type="u" direction="in"/>

View File

@@ -28,7 +28,7 @@
#include "sdbus-c++/Types.h" #include "sdbus-c++/Types.h"
const std::string INTERFACE_NAME{"com.kistler.testsdbuscpp"}; const std::string INTERFACE_NAME{"org.sdbuscpp.integrationtests"};
const std::string OBJECT_PATH{"/"}; const std::string OBJECT_PATH{"/"};
constexpr const uint8_t UINT8_VALUE{1}; constexpr const uint8_t UINT8_VALUE{1};

View File

@@ -8,9 +8,9 @@
<!-- ../system.conf have denied everything, so we just punch some holes --> <!-- ../system.conf have denied everything, so we just punch some holes -->
<policy context="default"> <policy context="default">
<allow own="com.kistler.testsdbuscpp"/> <allow own="org.sdbuscpp.integrationtests"/>
<allow send_destination="com.kistler.testsdbuscpp"/> <allow send_destination="org.sdbuscpp.integrationtests"/>
<allow send_interface="com.kistler.testsdbuscpp"/> <allow send_interface="org.sdbuscpp.integrationtests"/>
</policy> </policy>
</busconfig> </busconfig>

View File

@@ -1,7 +1,7 @@
/** /**
* (C) 2017 KISTLER INSTRUMENTE AG, Winterthur, Switzerland * (C) 2017 KISTLER INSTRUMENTE AG, Winterthur, Switzerland
* *
* @file libsdbus-c++_integrationtests.cpp * @file sdbus-c++-integration-tests.cpp
* *
* Created on: Jan 2, 2017 * Created on: Jan 2, 2017
* Project: sdbus-c++ * Project: sdbus-c++

View File

@@ -89,8 +89,8 @@ std::string createRandomString(size_t length)
//----------------------------------------- //-----------------------------------------
int main(int /*argc*/, char */*argv*/[]) int main(int /*argc*/, char */*argv*/[])
{ {
const char* destinationName = "org.sdbuscpp.perftest"; const char* destinationName = "org.sdbuscpp.perftests";
const char* objectPath = "/org/sdbuscpp/perftest"; const char* objectPath = "/org/sdbuscpp/perftests";
PerftestClient client(destinationName, objectPath); PerftestClient client(destinationName, objectPath);
const unsigned int repetitions{20}; const unsigned int repetitions{20};

View File

@@ -8,9 +8,9 @@
<!-- ../system.conf have denied everything, so we just punch some holes --> <!-- ../system.conf have denied everything, so we just punch some holes -->
<policy context="default"> <policy context="default">
<allow own="org.sdbuscpp.perftest"/> <allow own="org.sdbuscpp.perftests"/>
<allow send_destination="org.sdbuscpp.perftest"/> <allow send_destination="org.sdbuscpp.perftests"/>
<allow send_interface="org.sdbuscpp.perftest"/> <allow send_interface="org.sdbuscpp.perftests"/>
</policy> </policy>
</busconfig> </busconfig>

View File

@@ -16,7 +16,7 @@ namespace sdbuscpp {
class perftest_adaptor class perftest_adaptor
{ {
public: public:
static constexpr const char* interfaceName = "org.sdbuscpp.perftest"; static constexpr const char* interfaceName = "org.sdbuscpp.perftests";
protected: protected:
perftest_adaptor(sdbus::IObject& object) perftest_adaptor(sdbus::IObject& object)

View File

@@ -16,7 +16,7 @@ namespace sdbuscpp {
class perftest_proxy class perftest_proxy
{ {
public: public:
static constexpr const char* interfaceName = "org.sdbuscpp.perftest"; static constexpr const char* interfaceName = "org.sdbuscpp.perftests";
protected: protected:
perftest_proxy(sdbus::IObjectProxy& object) perftest_proxy(sdbus::IObjectProxy& object)

View File

@@ -85,10 +85,10 @@ std::string createRandomString(size_t length)
//----------------------------------------- //-----------------------------------------
int main(int /*argc*/, char */*argv*/[]) int main(int /*argc*/, char */*argv*/[])
{ {
const char* serviceName = "org.sdbuscpp.perftest"; const char* serviceName = "org.sdbuscpp.perftests";
auto connection = sdbus::createSystemBusConnection(serviceName); auto connection = sdbus::createSystemBusConnection(serviceName);
const char* objectPath = "/org/sdbuscpp/perftest"; const char* objectPath = "/org/sdbuscpp/perftests";
PerftestServer server(*connection, objectPath); PerftestServer server(*connection, objectPath);
connection->enterProcessingLoop(); connection->enterProcessingLoop();

View File

@@ -18,7 +18,7 @@ namespace celsius {
class thermometer_adaptor class thermometer_adaptor
{ {
public: public:
static constexpr const char* interfaceName = "org.sdbuscpp.stresstest.celsius.thermometer"; static constexpr const char* interfaceName = "org.sdbuscpp.stresstests.celsius.thermometer";
protected: protected:
thermometer_adaptor(sdbus::IObject& object) thermometer_adaptor(sdbus::IObject& object)

View File

@@ -18,7 +18,7 @@ namespace celsius {
class thermometer_proxy class thermometer_proxy
{ {
public: public:
static constexpr const char* interfaceName = "org.sdbuscpp.stresstest.celsius.thermometer"; static constexpr const char* interfaceName = "org.sdbuscpp.stresstests.celsius.thermometer";
protected: protected:
thermometer_proxy(sdbus::IObjectProxy& object) thermometer_proxy(sdbus::IObjectProxy& object)

View File

@@ -17,7 +17,7 @@ namespace stresstest {
class concatenator_adaptor class concatenator_adaptor
{ {
public: public:
static constexpr const char* interfaceName = "org.sdbuscpp.stresstest.concatenator"; static constexpr const char* interfaceName = "org.sdbuscpp.stresstests.concatenator";
protected: protected:
concatenator_adaptor(sdbus::IObject& object) concatenator_adaptor(sdbus::IObject& object)

View File

@@ -17,7 +17,7 @@ namespace stresstest {
class concatenator_proxy class concatenator_proxy
{ {
public: public:
static constexpr const char* interfaceName = "org.sdbuscpp.stresstest.concatenator"; static constexpr const char* interfaceName = "org.sdbuscpp.stresstests.concatenator";
protected: protected:
concatenator_proxy(sdbus::IObjectProxy& object) concatenator_proxy(sdbus::IObjectProxy& object)

View File

@@ -18,7 +18,7 @@ namespace fahrenheit {
class thermometer_adaptor class thermometer_adaptor
{ {
public: public:
static constexpr const char* interfaceName = "org.sdbuscpp.stresstest.fahrenheit.thermometer"; static constexpr const char* interfaceName = "org.sdbuscpp.stresstests.fahrenheit.thermometer";
protected: protected:
thermometer_adaptor(sdbus::IObject& object) thermometer_adaptor(sdbus::IObject& object)

View File

@@ -18,7 +18,7 @@ namespace fahrenheit {
class thermometer_proxy class thermometer_proxy
{ {
public: public:
static constexpr const char* interfaceName = "org.sdbuscpp.stresstest.fahrenheit.thermometer"; static constexpr const char* interfaceName = "org.sdbuscpp.stresstests.fahrenheit.thermometer";
protected: protected:
thermometer_proxy(sdbus::IObjectProxy& object) thermometer_proxy(sdbus::IObjectProxy& object)

View File

@@ -8,15 +8,15 @@
<!-- ../system.conf have denied everything, so we just punch some holes --> <!-- ../system.conf have denied everything, so we just punch some holes -->
<policy context="default"> <policy context="default">
<allow own="org.sdbuscpp.stresstest.service1"/> <allow own="org.sdbuscpp.stresstests.service1"/>
<allow send_destination="org.sdbuscpp.stresstest.service1"/> <allow send_destination="org.sdbuscpp.stresstests.service1"/>
<allow send_interface="org.sdbuscpp.stresstest.service1"/> <allow send_interface="org.sdbuscpp.stresstests.service1"/>
</policy> </policy>
<policy context="default"> <policy context="default">
<allow own="org.sdbuscpp.stresstest.service2"/> <allow own="org.sdbuscpp.stresstests.service2"/>
<allow send_destination="org.sdbuscpp.stresstest.service2"/> <allow send_destination="org.sdbuscpp.stresstests.service2"/>
<allow send_interface="org.sdbuscpp.stresstest.service2"/> <allow send_interface="org.sdbuscpp.stresstests.service2"/>
</policy> </policy>
</busconfig> </busconfig>

View File

@@ -1,7 +1,7 @@
/** /**
* (C) 2019 KISTLER INSTRUMENTE AG, Winterthur, Switzerland * (C) 2019 KISTLER INSTRUMENTE AG, Winterthur, Switzerland
* *
* @file stresstests.cpp * @file sdbus-c++-stress-tests.cpp
* *
* Created on: Jan 25, 2019 * Created on: Jan 25, 2019
* Project: sdbus-c++ * Project: sdbus-c++
@@ -46,11 +46,11 @@
using namespace std::chrono_literals; using namespace std::chrono_literals;
using namespace std::string_literals; using namespace std::string_literals;
#define SERVICE_1_BUS_NAME "org.sdbuscpp.stresstest.service1" #define SERVICE_1_BUS_NAME "org.sdbuscpp.stresstests.service1"
#define SERVICE_2_BUS_NAME "org.sdbuscpp.stresstest.service2" #define SERVICE_2_BUS_NAME "org.sdbuscpp.stresstests.service2"
#define CELSIUS_THERMOMETER_OBJECT_PATH "/org/sdbuscpp/stresstest/celsius/thermometer" #define CELSIUS_THERMOMETER_OBJECT_PATH "/org/sdbuscpp/stresstests/celsius/thermometer"
#define FAHRENHEIT_THERMOMETER_OBJECT_PATH "/org/sdbuscpp/stresstest/fahrenheit/thermometer" #define FAHRENHEIT_THERMOMETER_OBJECT_PATH "/org/sdbuscpp/stresstests/fahrenheit/thermometer"
#define CONCATENATOR_OBJECT_PATH "/org/sdbuscpp/stresstest/concatenator" #define CONCATENATOR_OBJECT_PATH "/org/sdbuscpp/stresstests/concatenator"
class CelsiusThermometerAdaptor : public sdbus::Interfaces<org::sdbuscpp::stresstest::celsius::thermometer_adaptor> class CelsiusThermometerAdaptor : public sdbus::Interfaces<org::sdbuscpp::stresstest::celsius::thermometer_adaptor>
{ {

View File

@@ -1,7 +1,7 @@
/** /**
* (C) 2017 KISTLER INSTRUMENTE AG, Winterthur, Switzerland * (C) 2017 KISTLER INSTRUMENTE AG, Winterthur, Switzerland
* *
* @file libsdbus-c++_unittests.cpp * @file sdbus-c++-unit-tests.cpp
* *
* Created on: Nov 27, 2016 * Created on: Nov 27, 2016
* Project: sdbus-c++ * Project: sdbus-c++