From fc60700e1b18c6b5267bf177339028590907f543 Mon Sep 17 00:00:00 2001 From: Stanislav Angelovic Date: Thu, 28 Mar 2019 18:25:31 +0100 Subject: [PATCH] Rename test executables for consistency --- test/CMakeLists.txt | 56 +++++++++---------- test/integrationtests/adaptor-glue.h | 2 +- test/integrationtests/defs.h | 2 +- ...onf => org.sdbuscpp.integrationtests.conf} | 6 +- ...ts.cpp => sdbus-c++-integration-tests.cpp} | 2 +- test/perftests/client.cpp | 4 +- ...ftest.conf => org.sdbuscpp.perftests.conf} | 6 +- ...erftest.xml => org.sdbuscpp.perftests.xml} | 0 test/perftests/perftest-adaptor.h | 2 +- test/perftests/perftest-proxy.h | 2 +- test/perftests/server.cpp | 4 +- .../stresstests/celsius-thermometer-adaptor.h | 2 +- test/stresstests/celsius-thermometer-proxy.h | 2 +- test/stresstests/concatenator-adaptor.h | 2 +- test/stresstests/concatenator-proxy.h | 2 +- .../fahrenheit-thermometer-adaptor.h | 2 +- .../fahrenheit-thermometer-proxy.h | 2 +- ...est.conf => org.sdbuscpp.stresstests.conf} | 12 ++-- ...sstests.cpp => sdbus-c++-stress-tests.cpp} | 12 ++-- ...unittests.cpp => sdbus-c++-unit-tests.cpp} | 2 +- 20 files changed, 62 insertions(+), 62 deletions(-) rename test/integrationtests/files/{libsdbus-cpp-test.conf => org.sdbuscpp.integrationtests.conf} (71%) rename test/integrationtests/{libsdbus-c++_integrationtests.cpp => sdbus-c++-integration-tests.cpp} (95%) rename test/perftests/files/{org.sdbuscpp.perftest.conf => org.sdbuscpp.perftests.conf} (74%) rename test/perftests/{org.sdbuscpp.perftest.xml => org.sdbuscpp.perftests.xml} (100%) rename test/stresstests/files/{org.sdbuscpp.stresstest.conf => org.sdbuscpp.stresstests.conf} (56%) rename test/stresstests/{stresstests.cpp => sdbus-c++-stress-tests.cpp} (97%) rename test/unittests/{libsdbus-c++_unittests.cpp => sdbus-c++-unit-tests.cpp} (96%) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6906de1..574adfa 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -33,7 +33,7 @@ add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src set(UNITTESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/unittests) 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}/Types_test.cpp ${UNITTESTS_SOURCE_DIR}/TypeTraits_test.cpp @@ -44,7 +44,7 @@ set(INTEGRATIONTESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/integrationtests) set(INTEGRATIONTESTS_SRCS ${INTEGRATIONTESTS_SOURCE_DIR}/AdaptorAndProxy_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}/defs.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_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-proxy.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. set(CMAKE_NO_SYSTEM_FROM_IMPORTED "1") -add_executable(libsdbus-c++_unittests ${UNITTESTS_SRCS} $) -target_link_libraries(libsdbus-c++_unittests ${SYSTEMD_LIBRARIES} gmock gmock_main) +add_executable(sdbus-c++-unit-tests ${UNITTESTS_SRCS} $) +target_link_libraries(sdbus-c++-unit-tests ${SYSTEMD_LIBRARIES} gmock gmock_main) -add_executable(libsdbus-c++_integrationtests ${INTEGRATIONTESTS_SRCS}) -target_link_libraries(libsdbus-c++_integrationtests sdbus-c++ gmock gmock_main) +add_executable(sdbus-c++-integration-tests ${INTEGRATIONTESTS_SRCS}) +target_link_libraries(sdbus-c++-integration-tests 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 ${STRESSTESTS_CLIENT_SRCS}) - target_link_libraries(libsdbus-c++_perftests_client sdbus-c++) - add_executable(libsdbus-c++_perftests_server ${STRESSTESTS_SERVER_SRCS}) - target_link_libraries(libsdbus-c++_perftests_server sdbus-c++) +option(ENABLE_PERF_TESTS "Build and install manual performance tests (default OFF)" OFF) +if(ENABLE_PERF_TESTS) + add_executable(sdbus-c++-perf-tests-client ${STRESSTESTS_CLIENT_SRCS}) + target_link_libraries(sdbus-c++-perf-tests-client sdbus-c++) + add_executable(sdbus-c++-perf-tests-server ${STRESSTESTS_SERVER_SRCS}) + target_link_libraries(sdbus-c++-perf-tests-server sdbus-c++) endif() # Manual stress tests -option(ENABLE_STRESSTESTS "Build and install manual stress tests (default OFF)" ON) -if(ENABLE_STRESSTESTS) +option(ENABLE_STRESS_TESTS "Build and install manual stress tests (default OFF)" OFF) +if(ENABLE_STRESS_TESTS) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) @@ -110,19 +110,19 @@ endif() # INSTALLATION #---------------------------------- -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) +install(TARGETS sdbus-c++-unit-tests DESTINATION /opt/test/bin) +install(TARGETS sdbus-c++-integration-tests DESTINATION /opt/test/bin) +install(FILES ${INTEGRATIONTESTS_SOURCE_DIR}/files/org.sdbuscpp.integrationtests.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) +if(ENABLE_PERF_TESTS) + install(TARGETS sdbus-c++-perf-tests-client DESTINATION /opt/test/bin) + install(TARGETS sdbus-c++-perf-tests-server DESTINATION /opt/test/bin) + install(FILES ${PERFTESTS_SOURCE_DIR}/files/org.sdbuscpp.perftests.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d) endif() -if(ENABLE_STRESSTESTS) +if(ENABLE_STRESS_TESTS) 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() #---------------------------------- @@ -140,9 +140,9 @@ if(CMAKE_CROSSCOMPILING) 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") endif() - add_test(NAME libsdbus-c++_unittests COMMAND ${UNIT_TESTS_RUNNER} --deviceip=${TEST_DEVICE_IP} --testbin=libsdbus-c++_unittests) - add_test(NAME libsdbus-c++_integrationtests COMMAND ${UNIT_TESTS_RUNNER} --deviceip=${TEST_DEVICE_IP} --testbin=libsdbus-c++_integrationtests) + add_test(NAME sdbus-c++-unit-tests COMMAND ${UNIT_TESTS_RUNNER} --deviceip=${TEST_DEVICE_IP} --testbin=sdbus-c++-unit-tests) + add_test(NAME sdbus-c++-integration-tests COMMAND ${UNIT_TESTS_RUNNER} --deviceip=${TEST_DEVICE_IP} --testbin=sdbus-c++-integration-tests) else() - add_test(NAME libsdbus-c++_unittests COMMAND libsdbus-c++_unittests) - add_test(NAME libsdbus-c++_integrationtests COMMAND libsdbus-c++_integrationtests) + add_test(NAME sdbus-c++_unit-tests COMMAND sdbus-c++-unit-tests) + add_test(NAME sdbus-c++_integration-tests COMMAND sdbus-c++-integration-tests) endif() diff --git a/test/integrationtests/adaptor-glue.h b/test/integrationtests/adaptor-glue.h index 5615ce7..78f1713 100644 --- a/test/integrationtests/adaptor-glue.h +++ b/test/integrationtests/adaptor-glue.h @@ -210,7 +210,7 @@ R"delimiter( - + diff --git a/test/integrationtests/defs.h b/test/integrationtests/defs.h index a3aa5f5..61a9fe0 100644 --- a/test/integrationtests/defs.h +++ b/test/integrationtests/defs.h @@ -28,7 +28,7 @@ #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{"/"}; constexpr const uint8_t UINT8_VALUE{1}; diff --git a/test/integrationtests/files/libsdbus-cpp-test.conf b/test/integrationtests/files/org.sdbuscpp.integrationtests.conf similarity index 71% rename from test/integrationtests/files/libsdbus-cpp-test.conf rename to test/integrationtests/files/org.sdbuscpp.integrationtests.conf index 7876e3e..7eb3c2c 100644 --- a/test/integrationtests/files/libsdbus-cpp-test.conf +++ b/test/integrationtests/files/org.sdbuscpp.integrationtests.conf @@ -8,9 +8,9 @@ - - - + + + diff --git a/test/integrationtests/libsdbus-c++_integrationtests.cpp b/test/integrationtests/sdbus-c++-integration-tests.cpp similarity index 95% rename from test/integrationtests/libsdbus-c++_integrationtests.cpp rename to test/integrationtests/sdbus-c++-integration-tests.cpp index 2f373ea..3cc10ca 100644 --- a/test/integrationtests/libsdbus-c++_integrationtests.cpp +++ b/test/integrationtests/sdbus-c++-integration-tests.cpp @@ -1,7 +1,7 @@ /** * (C) 2017 KISTLER INSTRUMENTE AG, Winterthur, Switzerland * - * @file libsdbus-c++_integrationtests.cpp + * @file sdbus-c++-integration-tests.cpp * * Created on: Jan 2, 2017 * Project: sdbus-c++ diff --git a/test/perftests/client.cpp b/test/perftests/client.cpp index 3d02579..d4455a0 100644 --- a/test/perftests/client.cpp +++ b/test/perftests/client.cpp @@ -89,8 +89,8 @@ std::string createRandomString(size_t length) //----------------------------------------- int main(int /*argc*/, char */*argv*/[]) { - const char* destinationName = "org.sdbuscpp.perftest"; - const char* objectPath = "/org/sdbuscpp/perftest"; + const char* destinationName = "org.sdbuscpp.perftests"; + const char* objectPath = "/org/sdbuscpp/perftests"; PerftestClient client(destinationName, objectPath); const unsigned int repetitions{20}; diff --git a/test/perftests/files/org.sdbuscpp.perftest.conf b/test/perftests/files/org.sdbuscpp.perftests.conf similarity index 74% rename from test/perftests/files/org.sdbuscpp.perftest.conf rename to test/perftests/files/org.sdbuscpp.perftests.conf index c5bae6e..9e20f5a 100644 --- a/test/perftests/files/org.sdbuscpp.perftest.conf +++ b/test/perftests/files/org.sdbuscpp.perftests.conf @@ -8,9 +8,9 @@ - - - + + + diff --git a/test/perftests/org.sdbuscpp.perftest.xml b/test/perftests/org.sdbuscpp.perftests.xml similarity index 100% rename from test/perftests/org.sdbuscpp.perftest.xml rename to test/perftests/org.sdbuscpp.perftests.xml diff --git a/test/perftests/perftest-adaptor.h b/test/perftests/perftest-adaptor.h index e06c0ed..35e886b 100644 --- a/test/perftests/perftest-adaptor.h +++ b/test/perftests/perftest-adaptor.h @@ -16,7 +16,7 @@ namespace sdbuscpp { class perftest_adaptor { public: - static constexpr const char* interfaceName = "org.sdbuscpp.perftest"; + static constexpr const char* interfaceName = "org.sdbuscpp.perftests"; protected: perftest_adaptor(sdbus::IObject& object) diff --git a/test/perftests/perftest-proxy.h b/test/perftests/perftest-proxy.h index 16b80ed..96edea4 100644 --- a/test/perftests/perftest-proxy.h +++ b/test/perftests/perftest-proxy.h @@ -16,7 +16,7 @@ namespace sdbuscpp { class perftest_proxy { public: - static constexpr const char* interfaceName = "org.sdbuscpp.perftest"; + static constexpr const char* interfaceName = "org.sdbuscpp.perftests"; protected: perftest_proxy(sdbus::IObjectProxy& object) diff --git a/test/perftests/server.cpp b/test/perftests/server.cpp index e5c1c86..c705b32 100644 --- a/test/perftests/server.cpp +++ b/test/perftests/server.cpp @@ -85,10 +85,10 @@ std::string createRandomString(size_t length) //----------------------------------------- int main(int /*argc*/, char */*argv*/[]) { - const char* serviceName = "org.sdbuscpp.perftest"; + const char* serviceName = "org.sdbuscpp.perftests"; auto connection = sdbus::createSystemBusConnection(serviceName); - const char* objectPath = "/org/sdbuscpp/perftest"; + const char* objectPath = "/org/sdbuscpp/perftests"; PerftestServer server(*connection, objectPath); connection->enterProcessingLoop(); diff --git a/test/stresstests/celsius-thermometer-adaptor.h b/test/stresstests/celsius-thermometer-adaptor.h index 372efdd..7b7100b 100644 --- a/test/stresstests/celsius-thermometer-adaptor.h +++ b/test/stresstests/celsius-thermometer-adaptor.h @@ -18,7 +18,7 @@ namespace celsius { class thermometer_adaptor { public: - static constexpr const char* interfaceName = "org.sdbuscpp.stresstest.celsius.thermometer"; + static constexpr const char* interfaceName = "org.sdbuscpp.stresstests.celsius.thermometer"; protected: thermometer_adaptor(sdbus::IObject& object) diff --git a/test/stresstests/celsius-thermometer-proxy.h b/test/stresstests/celsius-thermometer-proxy.h index b17c4b8..15ccfbd 100644 --- a/test/stresstests/celsius-thermometer-proxy.h +++ b/test/stresstests/celsius-thermometer-proxy.h @@ -18,7 +18,7 @@ namespace celsius { class thermometer_proxy { public: - static constexpr const char* interfaceName = "org.sdbuscpp.stresstest.celsius.thermometer"; + static constexpr const char* interfaceName = "org.sdbuscpp.stresstests.celsius.thermometer"; protected: thermometer_proxy(sdbus::IObjectProxy& object) diff --git a/test/stresstests/concatenator-adaptor.h b/test/stresstests/concatenator-adaptor.h index d59b8fc..25a072d 100644 --- a/test/stresstests/concatenator-adaptor.h +++ b/test/stresstests/concatenator-adaptor.h @@ -17,7 +17,7 @@ namespace stresstest { class concatenator_adaptor { public: - static constexpr const char* interfaceName = "org.sdbuscpp.stresstest.concatenator"; + static constexpr const char* interfaceName = "org.sdbuscpp.stresstests.concatenator"; protected: concatenator_adaptor(sdbus::IObject& object) diff --git a/test/stresstests/concatenator-proxy.h b/test/stresstests/concatenator-proxy.h index 5fbf526..6751b51 100644 --- a/test/stresstests/concatenator-proxy.h +++ b/test/stresstests/concatenator-proxy.h @@ -17,7 +17,7 @@ namespace stresstest { class concatenator_proxy { public: - static constexpr const char* interfaceName = "org.sdbuscpp.stresstest.concatenator"; + static constexpr const char* interfaceName = "org.sdbuscpp.stresstests.concatenator"; protected: concatenator_proxy(sdbus::IObjectProxy& object) diff --git a/test/stresstests/fahrenheit-thermometer-adaptor.h b/test/stresstests/fahrenheit-thermometer-adaptor.h index 8a6f8ac..998ddd1 100644 --- a/test/stresstests/fahrenheit-thermometer-adaptor.h +++ b/test/stresstests/fahrenheit-thermometer-adaptor.h @@ -18,7 +18,7 @@ namespace fahrenheit { class thermometer_adaptor { public: - static constexpr const char* interfaceName = "org.sdbuscpp.stresstest.fahrenheit.thermometer"; + static constexpr const char* interfaceName = "org.sdbuscpp.stresstests.fahrenheit.thermometer"; protected: thermometer_adaptor(sdbus::IObject& object) diff --git a/test/stresstests/fahrenheit-thermometer-proxy.h b/test/stresstests/fahrenheit-thermometer-proxy.h index 5cfe898..491a9d0 100644 --- a/test/stresstests/fahrenheit-thermometer-proxy.h +++ b/test/stresstests/fahrenheit-thermometer-proxy.h @@ -18,7 +18,7 @@ namespace fahrenheit { class thermometer_proxy { public: - static constexpr const char* interfaceName = "org.sdbuscpp.stresstest.fahrenheit.thermometer"; + static constexpr const char* interfaceName = "org.sdbuscpp.stresstests.fahrenheit.thermometer"; protected: thermometer_proxy(sdbus::IObjectProxy& object) diff --git a/test/stresstests/files/org.sdbuscpp.stresstest.conf b/test/stresstests/files/org.sdbuscpp.stresstests.conf similarity index 56% rename from test/stresstests/files/org.sdbuscpp.stresstest.conf rename to test/stresstests/files/org.sdbuscpp.stresstests.conf index 3810e4f..3cbcfc1 100644 --- a/test/stresstests/files/org.sdbuscpp.stresstest.conf +++ b/test/stresstests/files/org.sdbuscpp.stresstests.conf @@ -8,15 +8,15 @@ - - - + + + - - - + + + diff --git a/test/stresstests/stresstests.cpp b/test/stresstests/sdbus-c++-stress-tests.cpp similarity index 97% rename from test/stresstests/stresstests.cpp rename to test/stresstests/sdbus-c++-stress-tests.cpp index 424039e..2aed9fd 100644 --- a/test/stresstests/stresstests.cpp +++ b/test/stresstests/sdbus-c++-stress-tests.cpp @@ -1,7 +1,7 @@ /** * (C) 2019 KISTLER INSTRUMENTE AG, Winterthur, Switzerland * - * @file stresstests.cpp + * @file sdbus-c++-stress-tests.cpp * * Created on: Jan 25, 2019 * Project: sdbus-c++ @@ -46,11 +46,11 @@ using namespace std::chrono_literals; using namespace std::string_literals; -#define SERVICE_1_BUS_NAME "org.sdbuscpp.stresstest.service1" -#define SERVICE_2_BUS_NAME "org.sdbuscpp.stresstest.service2" -#define CELSIUS_THERMOMETER_OBJECT_PATH "/org/sdbuscpp/stresstest/celsius/thermometer" -#define FAHRENHEIT_THERMOMETER_OBJECT_PATH "/org/sdbuscpp/stresstest/fahrenheit/thermometer" -#define CONCATENATOR_OBJECT_PATH "/org/sdbuscpp/stresstest/concatenator" +#define SERVICE_1_BUS_NAME "org.sdbuscpp.stresstests.service1" +#define SERVICE_2_BUS_NAME "org.sdbuscpp.stresstests.service2" +#define CELSIUS_THERMOMETER_OBJECT_PATH "/org/sdbuscpp/stresstests/celsius/thermometer" +#define FAHRENHEIT_THERMOMETER_OBJECT_PATH "/org/sdbuscpp/stresstests/fahrenheit/thermometer" +#define CONCATENATOR_OBJECT_PATH "/org/sdbuscpp/stresstests/concatenator" class CelsiusThermometerAdaptor : public sdbus::Interfaces { diff --git a/test/unittests/libsdbus-c++_unittests.cpp b/test/unittests/sdbus-c++-unit-tests.cpp similarity index 96% rename from test/unittests/libsdbus-c++_unittests.cpp rename to test/unittests/sdbus-c++-unit-tests.cpp index 2214537..1f176d0 100644 --- a/test/unittests/libsdbus-c++_unittests.cpp +++ b/test/unittests/sdbus-c++-unit-tests.cpp @@ -1,7 +1,7 @@ /** * (C) 2017 KISTLER INSTRUMENTE AG, Winterthur, Switzerland * - * @file libsdbus-c++_unittests.cpp + * @file sdbus-c++-unit-tests.cpp * * Created on: Nov 27, 2016 * Project: sdbus-c++