diff options
author | Juergen Gehring <juergen.gehring@bmw.de> | 2017-02-28 03:57:20 -0800 |
---|---|---|
committer | Juergen Gehring <juergen.gehring@bmw.de> | 2017-02-28 03:57:20 -0800 |
commit | 07d7573c007322be07689575ce5d73c45f030d6d (patch) | |
tree | 6a6acbf7536de451391d9d50b7f5cdde49d67fd8 /test | |
parent | 1a230558936ec84b4fb44b2346dc5ae52d6f2805 (diff) | |
download | vSomeIP-07d7573c007322be07689575ce5d73c45f030d6d.tar.gz |
vSomeIP 2.5.32.5.3
Diffstat (limited to 'test')
103 files changed, 482 insertions, 182 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fb8a89f..91605ad 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -115,12 +115,21 @@ if(NOT ${TESTS_BAT}) ${TEST_LINK_LIBRARIES} ) + set(TEST_APPLICATION_AVAILABILITY_NAME ${TEST_APPLICATION}_availability) + add_executable(${TEST_APPLICATION_AVAILABILITY_NAME} application_tests/${TEST_APPLICATION_AVAILABILITY_NAME}.cpp) + target_link_libraries(${TEST_APPLICATION_AVAILABILITY_NAME} + vsomeip + ${Boost_LIBRARIES} + ${DL_LIBRARY} + ${TEST_LINK_LIBRARIES} + ) + set(TEST_APPLICATION_SINGLE_PROCESS_CONFIGURATION_FILE ${TEST_APPLICATION}_single_process.json) copy_to_builddir(${PROJECT_SOURCE_DIR}/test/application_tests/${TEST_APPLICATION_SINGLE_PROCESS_CONFIGURATION_FILE} ${PROJECT_BINARY_DIR}/test/${TEST_APPLICATION_SINGLE_PROCESS_CONFIGURATION_FILE} ${TEST_APPLICATION}_single_process ) - + set(TEST_APPLICATION_CONFIGURATION_FILE ${TEST_APPLICATION}.json) configure_file( ${PROJECT_SOURCE_DIR}/test/application_tests/conf/${TEST_APPLICATION_CONFIGURATION_FILE}.in @@ -172,6 +181,12 @@ if(NOT ${TESTS_BAT}) ${PROJECT_BINARY_DIR}/test/${TEST_APPLICATION_SINGLE_PROCESS_STARTER} ${TEST_APPLICATION}_single_process ) + + set(TEST_APPLICATION_AVAILABILITY_STARTER ${TEST_APPLICATION_AVAILABILITY_NAME}_starter.sh) + copy_to_builddir(${PROJECT_SOURCE_DIR}/test/application_tests/${TEST_APPLICATION_AVAILABILITY_STARTER} + ${PROJECT_BINARY_DIR}/test/${TEST_APPLICATION_AVAILABILITY_STARTER} + ${TEST_APPLICATION_SINGLE_PROCESS_NAME} + ) endif() ############################################################################## # magic-cookies-test-client @@ -1630,6 +1645,7 @@ if(NOT ${TESTS_BAT}) add_dependencies(${TEST_CONFIGURATION} gtest) add_dependencies(${TEST_APPLICATION} gtest) add_dependencies(${TEST_APPLICATION_SINGLE_PROCESS_NAME} gtest) + add_dependencies(${TEST_APPLICATION_AVAILABILITY_NAME} gtest) add_dependencies(${TEST_MAGIC_COOKIES_CLIENT} gtest) add_dependencies(${TEST_MAGIC_COOKIES_SERVICE} gtest) add_dependencies(${TEST_HEADER_FACTORY} gtest) @@ -1669,6 +1685,7 @@ if(NOT ${TESTS_BAT}) add_dependencies(build_tests ${TEST_CONFIGURATION}) add_dependencies(build_tests ${TEST_APPLICATION}) add_dependencies(build_tests ${TEST_APPLICATION_SINGLE_PROCESS_NAME}) + add_dependencies(build_tests ${TEST_APPLICATION_AVAILABILITY_NAME}) add_dependencies(build_tests ${TEST_MAGIC_COOKIES_CLIENT}) add_dependencies(build_tests ${TEST_MAGIC_COOKIES_SERVICE}) add_dependencies(build_tests ${TEST_HEADER_FACTORY}) @@ -1724,6 +1741,11 @@ if(NOT ${TESTS_BAT}) ) set_tests_properties(${TEST_APPLICATION_SINGLE_PROCESS_NAME} PROPERTIES TIMEOUT 120) + add_test(NAME ${TEST_APPLICATION_AVAILABILITY_NAME} + COMMAND ${PROJECT_BINARY_DIR}/test/${TEST_APPLICATION_AVAILABILITY_STARTER} + ) + set_tests_properties(${TEST_APPLICATION_AVAILABILITY_NAME} PROPERTIES TIMEOUT 120) + # magic cookies test add_test(NAME ${TEST_MAGIC_COOKIES_NAME} COMMAND ${PROJECT_BINARY_DIR}/test/${TEST_MAGIC_COOKIES_STARTER} diff --git a/test/application_tests/application_test.cpp b/test/application_tests/application_test.cpp index c6c1b03..71ded2e 100644 --- a/test/application_tests/application_test.cpp +++ b/test/application_tests/application_test.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -206,13 +206,16 @@ protected: } void send_shutdown_message() { - std::unique_lock<std::mutex> its_lock(mutex_); - while(!is_registered_) { - cv_.wait(its_lock); - } - app_->offer_service(vsomeip_test::TEST_SERVICE_SERVICE_ID, vsomeip_test::TEST_SERVICE_INSTANCE_ID); - while(!is_available_) { - cv_.wait(its_lock); + { + std::unique_lock<std::mutex> its_lock(mutex_); + while(!is_registered_) { + cv_.wait(its_lock); + } + app_->offer_service(vsomeip_test::TEST_SERVICE_SERVICE_ID, + vsomeip_test::TEST_SERVICE_INSTANCE_ID); + while(!is_available_) { + cv_.wait(its_lock); + } } std::shared_ptr<message> r = runtime::get()->create_request(); @@ -237,7 +240,7 @@ TEST_F(someip_application_shutdown_test, stop_application_from_dispatcher_thread } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/application_tests/application_test_availability.cpp b/test/application_tests/application_test_availability.cpp new file mode 100644 index 0000000..06fd33e --- /dev/null +++ b/test/application_tests/application_test_availability.cpp @@ -0,0 +1,39 @@ +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. +#include <gtest/gtest.h> + +#include "application_test_client_availability.cpp" +#include "application_test_service.cpp" +#include "application_test_daemon.cpp" + +TEST(someip_application_test_availability, register_availability_handlers) +{ + // start application acting as daemon + application_test_daemon its_daemon; + + // start receiver service + application_test_service its_receiver(application_test::service); + + // start client + application_test_client_availability its_client(application_test::service); + int counter(0); + while (!its_client.all_availability_handlers_called() && counter < 500) { + std::this_thread::sleep_for(std::chrono::milliseconds(10)); + counter++; + } + + //shutdown + its_receiver.stop(); + its_client.stop(); + its_daemon.stop(); +} + +#ifndef _WIN32 +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} +#endif diff --git a/test/application_tests/application_test_availability_starter.sh b/test/application_tests/application_test_availability_starter.sh new file mode 100755 index 0000000..645e347 --- /dev/null +++ b/test/application_tests/application_test_availability_starter.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +export VSOMEIP_CONFIGURATION=application_test_single_process.json +./application_test_availability + + exit $?
\ No newline at end of file diff --git a/test/application_tests/application_test_client.cpp b/test/application_tests/application_test_client.cpp index ba39417..25f7c09 100644 --- a/test/application_tests/application_test_client.cpp +++ b/test/application_tests/application_test_client.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -12,6 +12,7 @@ #include <map> #include <algorithm> #include <future> +#include <atomic> #include <gtest/gtest.h> @@ -28,12 +29,12 @@ public: service_available_(false), wait_until_registered_(true), wait_until_service_available_(true), - send_thread_(std::bind(&application_test_client::send, this)), wait_for_stop_(true), - stop_thread_(std::bind(&application_test_client::wait_for_stop, this)), received_responses_(0), sent_requests_(0), - stop_called_(false) { + stop_called_(false), + stop_thread_(std::bind(&application_test_client::wait_for_stop, this)), + send_thread_(std::bind(&application_test_client::send, this)) { if (!app_->init()) { ADD_FAILURE() << "Couldn't initialize application"; return; @@ -183,16 +184,16 @@ private: bool wait_until_service_available_; std::mutex mutex_; std::condition_variable condition_; - std::thread send_thread_; bool wait_for_stop_; std::mutex stop_mutex_; std::condition_variable stop_condition_; - std::thread stop_thread_; - std::uint32_t received_responses_; - std::uint32_t sent_requests_; + std::atomic<std::uint32_t> received_responses_; + std::atomic<std::uint32_t> sent_requests_; + std::atomic<bool> stop_called_; + std::thread stop_thread_; + std::thread send_thread_; std::thread application_thread_; - bool stop_called_; }; diff --git a/test/application_tests/application_test_client_availability.cpp b/test/application_tests/application_test_client_availability.cpp new file mode 100644 index 0000000..5148d58 --- /dev/null +++ b/test/application_tests/application_test_client_availability.cpp @@ -0,0 +1,203 @@ +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#include <chrono> +#include <condition_variable> +#include <iomanip> +#include <iostream> +#include <sstream> +#include <thread> +#include <map> +#include <algorithm> +#include <future> +#include <atomic> + +#include <gtest/gtest.h> + +#include <vsomeip/vsomeip.hpp> +#include "../../implementation/logging/include/logger.hpp" + +#include "application_test_globals.hpp" + +class application_test_client_availability { +public: + application_test_client_availability(struct application_test::service_info _service_info) : + service_info_(_service_info), + app_(vsomeip::runtime::get()->create_application("client")), + wait_until_registered_(true), + all_availability_handlers_called_(false), + run_thread_(std::bind(&application_test_client_availability::run, this)) { + if (!app_->init()) { + ADD_FAILURE() << "Couldn't initialize application"; + return; + } + app_->register_state_handler( + std::bind(&application_test_client_availability::on_state, this, + std::placeholders::_1)); + + // register availability handler for every possiblity of + // ANY_SERVICE, ANY_INSTANCE, ANY_MAJOR, ANY_MINOR + for (std::uint32_t i = 0; i < 16; i++) { + vsomeip::service_t its_service = (i & 0x8) ? service_info_.service_id : vsomeip::ANY_SERVICE; + vsomeip::instance_t its_instance = (i & 0x4) ? service_info_.instance_id : vsomeip::ANY_INSTANCE; + vsomeip::major_version_t its_major = (i & 0x2) ? service_info_.major_version : vsomeip::ANY_MAJOR; + vsomeip::minor_version_t its_minor = (i & 0x1) ? service_info_.minor_version : vsomeip::ANY_MINOR; + app_->register_availability_handler(its_service, + its_instance, + std::bind(&application_test_client_availability::on_availability, this, + std::placeholders::_1, std::placeholders::_2, + std::placeholders::_3, i), + its_major, its_minor); + VSOMEIP_DEBUG << "Registering: " + << std::setw(4) << std::setfill('0') << std::hex << its_service << "." + << std::setw(4) << std::setfill('0') << std::hex << its_instance << "." + << std::setw(2) << std::setfill('0') << std::hex << (std::uint32_t)its_major << "." + << std::setw(4) << std::setfill('0') << std::hex << its_minor << "." + << i; + + } + app_->register_availability_handler(service_info_.service_id, + service_info_.instance_id, + std::bind(&application_test_client_availability::on_availability, this, + std::placeholders::_1, std::placeholders::_2, + std::placeholders::_3, 16), + service_info_.major_version, vsomeip::DEFAULT_MINOR); + VSOMEIP_DEBUG << "Registering: " + << std::setw(4) << std::setfill('0') << std::hex << service_info_.service_id << "." + << std::setw(4) << std::setfill('0') << std::hex << service_info_.instance_id << "." + << std::setw(2) << std::setfill('0') << std::hex << (std::uint32_t)service_info_.service_id << "." + << std::setw(4) << std::setfill('0') << std::hex << vsomeip::DEFAULT_MINOR << "." + << 16; + app_->request_service(service_info_.service_id, + service_info_.instance_id); + std::promise<bool> its_promise; + application_thread_ = std::thread([&](){ + its_promise.set_value(true); + app_->start(); + }); + EXPECT_TRUE(its_promise.get_future().get()); + } + + ~application_test_client_availability() { + run_thread_.join(); + application_thread_.join(); + } + + void on_state(vsomeip::state_type_e _state) { + VSOMEIP_INFO << "Application " << app_->get_name() << " is " + << (_state == vsomeip::state_type_e::ST_REGISTERED ? + "registered." : "deregistered."); + + if (_state == vsomeip::state_type_e::ST_REGISTERED) { + std::lock_guard<std::mutex> its_lock(mutex_); + wait_until_registered_ = false; + condition_.notify_one(); + } + } + + void on_availability(vsomeip::service_t _service, + vsomeip::instance_t _instance, bool _is_available, + std::uint32_t _handler_index) + { + VSOMEIP_DEBUG<< "Service [" << std::setw(4) << std::setfill('0') << std::hex + << _service << "." << std::setw(4) << std::setfill('0') << _instance << "] is " + << (_is_available ? "available." : "NOT available.") << ". " + << _handler_index; + if(service_info_.service_id == _service + && service_info_.instance_id == _instance) { + std::lock_guard<std::mutex> its_lock(availability_handler_called_mutex_); + availability_handler_called_[_handler_index] = _is_available; + availability_condition_.notify_one(); + } + } + + void run() { + { + std::unique_lock<std::mutex> its_lock(mutex_); + while (wait_until_registered_) { + condition_.wait(its_lock); + } + } + while(!app_->is_available(service_info_.service_id, + service_info_.instance_id, service_info_.major_version, + service_info_.minor_version)) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } + for (std::uint32_t i = 0; i < 16; i++) { + vsomeip::service_t its_service = (i & 0x8) ? service_info_.service_id : vsomeip::ANY_SERVICE; + vsomeip::instance_t its_instance = (i & 0x4) ? service_info_.instance_id : vsomeip::ANY_INSTANCE; + vsomeip::major_version_t its_major = (i & 0x2) ? service_info_.major_version : vsomeip::ANY_MAJOR; + vsomeip::minor_version_t its_minor = (i & 0x1) ? service_info_.minor_version : vsomeip::ANY_MINOR; + + VSOMEIP_DEBUG << "Calling is_available: " + << std::setw(4) << std::setfill('0') << std::hex << its_service << "." + << std::setw(4) << std::setfill('0') << std::hex << its_instance << "." + << std::setw(2) << std::setfill('0') << std::hex << (std::uint32_t)its_major << "." + << std::setw(4) << std::setfill('0') << std::hex << its_minor; + EXPECT_TRUE(app_->is_available(its_service, its_instance, its_major, its_minor)); + + VSOMEIP_DEBUG << "Calling are_available: " + << std::setw(4) << std::setfill('0') << std::hex << its_service << "." + << std::setw(4) << std::setfill('0') << std::hex << its_instance << "." + << std::setw(2) << std::setfill('0') << std::hex << (std::uint32_t)its_major << "." + << std::setw(4) << std::setfill('0') << std::hex << its_minor; + vsomeip::application::available_t are_available; + EXPECT_TRUE(app_->are_available(are_available, its_service, its_instance, its_major, its_minor)); + bool found(false); + auto found_service = are_available.find(service_info_.service_id); + if(found_service != are_available.end()) { + auto found_instance = found_service->second.find(service_info_.instance_id); + if(found_instance != found_service->second.end()) { + auto found_major = found_instance->second.find(service_info_.major_version); + if (found_major != found_instance->second.end()) { + if (found_major->second == service_info_.minor_version) { + found = true; + } + } + } + } + EXPECT_TRUE(found); + + } + { + std::unique_lock<std::mutex> its_lock(availability_handler_called_mutex_); + while(!std::all_of(availability_handler_called_.cbegin(), + availability_handler_called_.cend(), + [&](const availability_handler_called_t::value_type &v) { + return v; + })) { + availability_condition_.wait(its_lock); + } + } + VSOMEIP_INFO <<" Everything is available"; + all_availability_handlers_called_ = true; + } + + void stop() { + VSOMEIP_INFO << "going down"; + app_->clear_all_handler(); + app_->stop(); + } + + bool all_availability_handlers_called() const { + return all_availability_handlers_called_; + } + +private: + struct application_test::service_info service_info_; + std::shared_ptr<vsomeip::application> app_; + std::mutex availability_handler_called_mutex_; + std::condition_variable availability_condition_; + typedef std::array<bool, 17> availability_handler_called_t; + availability_handler_called_t availability_handler_called_; + + + bool wait_until_registered_; + std::mutex mutex_; + std::condition_variable condition_; + std::atomic<bool> all_availability_handlers_called_; + std::thread run_thread_; + std::thread application_thread_; +}; diff --git a/test/application_tests/application_test_daemon.cpp b/test/application_tests/application_test_daemon.cpp index c244e5a..43876ea 100644 --- a/test/application_tests/application_test_daemon.cpp +++ b/test/application_tests/application_test_daemon.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/application_tests/application_test_globals.hpp b/test/application_tests/application_test_globals.hpp index ea82255..7caa9db 100644 --- a/test/application_tests/application_test_globals.hpp +++ b/test/application_tests/application_test_globals.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -15,9 +15,12 @@ struct service_info { vsomeip::event_t event_id; vsomeip::eventgroup_t eventgroup_id; vsomeip::method_t shutdown_method_id; + vsomeip::major_version_t major_version; + vsomeip::minor_version_t minor_version; }; -struct service_info service = { 0x1111, 0x1, 0x1111, 0x1111, 0x1000, 0x1404 }; + +struct service_info service = { 0x1111, 0x1, 0x1111, 0x1111, 0x1000, 0x1404, 0x2, 0x4711 }; static constexpr int number_of_messages_to_send = 150; } diff --git a/test/application_tests/application_test_service.cpp b/test/application_tests/application_test_service.cpp index d21ca68..0064fd3 100644 --- a/test/application_tests/application_test_service.cpp +++ b/test/application_tests/application_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -12,6 +12,7 @@ #include <map> #include <algorithm> #include <future> +#include <atomic> #include <gtest/gtest.h> @@ -30,8 +31,8 @@ public: app_(vsomeip::runtime::get()->create_application("service")), counter_(0), wait_until_registered_(true), - offer_thread_(std::bind(&application_test_service::run, this)), - stop_called_(false) { + stop_called_(false), + offer_thread_(std::bind(&application_test_service::run, this)) { if (!app_->init()) { ADD_FAILURE() << "Couldn't initialize application"; return; @@ -65,7 +66,8 @@ public: void offer() { - app_->offer_service(service_info_.service_id, service_info_.instance_id); + app_->offer_service(service_info_.service_id, service_info_.instance_id, + service_info_.major_version, service_info_.minor_version); } void on_state(vsomeip::state_type_e _state) { @@ -90,8 +92,13 @@ public: void on_shutdown_method_called(const std::shared_ptr<vsomeip::message> &_message) { (void)_message; + stop(); + } + + void stop() { stop_called_ = true; - app_->stop_offer_service(service_info_.service_id, service_info_.instance_id); + app_->stop_offer_service(service_info_.service_id, service_info_.instance_id, + service_info_.major_version, service_info_.minor_version); app_->clear_all_handler(); app_->stop(); } @@ -117,7 +124,7 @@ private: bool wait_until_registered_; std::mutex mutex_; std::condition_variable condition_; + std::atomic<bool> stop_called_; std::thread offer_thread_; std::thread application_thread_; - bool stop_called_; }; diff --git a/test/application_tests/application_test_single_process.cpp b/test/application_tests/application_test_single_process.cpp index eee636c..1d0d4a0 100644 --- a/test/application_tests/application_test_single_process.cpp +++ b/test/application_tests/application_test_single_process.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -38,7 +38,7 @@ TEST(someip_application_test_single_process, notify_increasing_counter) } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/application_tests/application_test_single_process_starter.sh b/test/application_tests/application_test_single_process_starter.sh index 0ac3330..3919358 100755 --- a/test/application_tests/application_test_single_process_starter.sh +++ b/test/application_tests/application_test_single_process_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/application_tests/application_test_starter.sh b/test/application_tests/application_test_starter.sh index 40ae927..3efc1b4 100755 --- a/test/application_tests/application_test_starter.sh +++ b/test/application_tests/application_test_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/big_payload_tests/big_payload_test_client.cpp b/test/big_payload_tests/big_payload_test_client.cpp index bc472df..f4b9128 100644 --- a/test/big_payload_tests/big_payload_test_client.cpp +++ b/test/big_payload_tests/big_payload_test_client.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -239,7 +239,7 @@ TEST(someip_big_payload_test, send_ten_messages_to_service) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/big_payload_tests/big_payload_test_client.hpp b/test/big_payload_tests/big_payload_test_client.hpp index 30bf8c7..fb03a8e 100644 --- a/test/big_payload_tests/big_payload_test_client.hpp +++ b/test/big_payload_tests/big_payload_test_client.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/big_payload_tests/big_payload_test_client_local_start.sh b/test/big_payload_tests/big_payload_test_client_local_start.sh index f834d78..adbf9f4 100755 --- a/test/big_payload_tests/big_payload_test_client_local_start.sh +++ b/test/big_payload_tests/big_payload_test_client_local_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/big_payload_tests/big_payload_test_client_start.sh b/test/big_payload_tests/big_payload_test_client_start.sh index 025b5bc..5258ce8 100755 --- a/test/big_payload_tests/big_payload_test_client_start.sh +++ b/test/big_payload_tests/big_payload_test_client_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/big_payload_tests/big_payload_test_external_starter.sh b/test/big_payload_tests/big_payload_test_external_starter.sh index 7de3342..365eb68 100755 --- a/test/big_payload_tests/big_payload_test_external_starter.sh +++ b/test/big_payload_tests/big_payload_test_external_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/big_payload_tests/big_payload_test_globals.hpp b/test/big_payload_tests/big_payload_test_globals.hpp index 01fe949..7d11035 100644 --- a/test/big_payload_tests/big_payload_test_globals.hpp +++ b/test/big_payload_tests/big_payload_test_globals.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/big_payload_tests/big_payload_test_local_starter.sh b/test/big_payload_tests/big_payload_test_local_starter.sh index 792e840..3d42828 100755 --- a/test/big_payload_tests/big_payload_test_local_starter.sh +++ b/test/big_payload_tests/big_payload_test_local_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/big_payload_tests/big_payload_test_service.cpp b/test/big_payload_tests/big_payload_test_service.cpp index 6f0e056..00f7daf 100644 --- a/test/big_payload_tests/big_payload_test_service.cpp +++ b/test/big_payload_tests/big_payload_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -206,7 +206,7 @@ TEST(someip_big_payload_test, receive_ten_messages_and_send_reply) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/big_payload_tests/big_payload_test_service.hpp b/test/big_payload_tests/big_payload_test_service.hpp index 0862370..8db42f7 100644 --- a/test/big_payload_tests/big_payload_test_service.hpp +++ b/test/big_payload_tests/big_payload_test_service.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/big_payload_tests/big_payload_test_service_external_start.sh b/test/big_payload_tests/big_payload_test_service_external_start.sh index 8fd7120..2b4d2d7 100755 --- a/test/big_payload_tests/big_payload_test_service_external_start.sh +++ b/test/big_payload_tests/big_payload_test_service_external_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/big_payload_tests/big_payload_test_service_local_start.sh b/test/big_payload_tests/big_payload_test_service_local_start.sh index 3aadd55..299af82 100755 --- a/test/big_payload_tests/big_payload_test_service_local_start.sh +++ b/test/big_payload_tests/big_payload_test_service_local_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/client_id_tests/client_id_test_globals.hpp b/test/client_id_tests/client_id_test_globals.hpp index 49e07dd..52dd069 100644 --- a/test/client_id_tests/client_id_test_globals.hpp +++ b/test/client_id_tests/client_id_test_globals.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/client_id_tests/client_id_test_master_starter.sh b/test/client_id_tests/client_id_test_master_starter.sh index ef74c72..4f74fd0 100755 --- a/test/client_id_tests/client_id_test_master_starter.sh +++ b/test/client_id_tests/client_id_test_master_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/client_id_tests/client_id_test_service.cpp b/test/client_id_tests/client_id_test_service.cpp index 7e1d66d..a051f99 100644 --- a/test/client_id_tests/client_id_test_service.cpp +++ b/test/client_id_tests/client_id_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -250,7 +250,7 @@ TEST(someip_client_id_test, send_ten_messages_to_service) client_id_test::service_infos[service_number]); } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/client_id_tests/client_id_test_slave_starter.sh b/test/client_id_tests/client_id_test_slave_starter.sh index 59291cb..4553521 100755 --- a/test/client_id_tests/client_id_test_slave_starter.sh +++ b/test/client_id_tests/client_id_test_slave_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/client_id_tests/client_id_test_utility.cpp b/test/client_id_tests/client_id_test_utility.cpp index 610a087..02b3b0e 100644 --- a/test/client_id_tests/client_id_test_utility.cpp +++ b/test/client_id_tests/client_id_test_utility.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -439,7 +439,7 @@ TEST_F(client_id_utility_test, exhaust_client_id_range_fragmented) { } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff --git a/test/configuration_tests/configuration-test.cpp b/test/configuration_tests/configuration-test.cpp index 37ebfeb..d306c52 100644 --- a/test/configuration_tests/configuration-test.cpp +++ b/test/configuration_tests/configuration-test.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -122,7 +122,7 @@ void check_file(const std::string &_config_file, } // 2. Set environment variable to config file and load it -#ifndef WIN32 +#ifndef _WIN32 setenv("VSOMEIP_CONFIGURATION", _config_file.c_str(), 1); #else _putenv_s("VSOMEIP_CONFIGURATION", _config_file.c_str() diff --git a/test/cpu_load_tests/cpu_load_measurer.cpp b/test/cpu_load_tests/cpu_load_measurer.cpp index 5d1fa0a..2261d22 100644 --- a/test/cpu_load_tests/cpu_load_measurer.cpp +++ b/test/cpu_load_tests/cpu_load_measurer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/cpu_load_tests/cpu_load_measurer.hpp b/test/cpu_load_tests/cpu_load_measurer.hpp index ce72d0c..dfdcf80 100644 --- a/test/cpu_load_tests/cpu_load_measurer.hpp +++ b/test/cpu_load_tests/cpu_load_measurer.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/cpu_load_tests/cpu_load_test_client.cpp b/test/cpu_load_tests/cpu_load_test_client.cpp index 5935774..37cc73e 100644 --- a/test/cpu_load_tests/cpu_load_test_client.cpp +++ b/test/cpu_load_tests/cpu_load_test_client.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -304,7 +304,7 @@ TEST(someip_load_test, send_messages_and_measure_cpu_load) cpu_load_test_client test_client_(protocol, number_of_calls, payload_size, call_service_sync, shutdown_service); } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { int i = 0; diff --git a/test/cpu_load_tests/cpu_load_test_globals.hpp b/test/cpu_load_tests/cpu_load_test_globals.hpp index e5e8466..e6897e3 100644 --- a/test/cpu_load_tests/cpu_load_test_globals.hpp +++ b/test/cpu_load_tests/cpu_load_test_globals.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/cpu_load_tests/cpu_load_test_master_starter.sh b/test/cpu_load_tests/cpu_load_test_master_starter.sh index ddcfa3d..c297824 100755 --- a/test/cpu_load_tests/cpu_load_test_master_starter.sh +++ b/test/cpu_load_tests/cpu_load_test_master_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/cpu_load_tests/cpu_load_test_service.cpp b/test/cpu_load_tests/cpu_load_test_service.cpp index f8fbde3..7316c2a 100644 --- a/test/cpu_load_tests/cpu_load_test_service.cpp +++ b/test/cpu_load_tests/cpu_load_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -196,7 +196,7 @@ TEST(someip_payload_test, send_response_for_every_request) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/cpu_load_tests/cpu_load_test_slave_starter.sh b/test/cpu_load_tests/cpu_load_test_slave_starter.sh index 9c68c48..83ef19d 100755 --- a/test/cpu_load_tests/cpu_load_test_slave_starter.sh +++ b/test/cpu_load_tests/cpu_load_test_slave_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/header_factory_tests/header_factory_test.cpp b/test/header_factory_tests/header_factory_test.cpp index e034769..bcd1ef3 100644 --- a/test/header_factory_tests/header_factory_test.cpp +++ b/test/header_factory_tests/header_factory_test.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -110,7 +110,7 @@ TEST_F(someip_header_factory_test, create_notification_test) ASSERT_EQ(notification_->get_return_code(), vsomeip::return_code_e::E_OK); } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/header_factory_tests/header_factory_test_client.cpp b/test/header_factory_tests/header_factory_test_client.cpp index 3870c17..90cfef5 100644 --- a/test/header_factory_tests/header_factory_test_client.cpp +++ b/test/header_factory_tests/header_factory_test_client.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -8,13 +8,13 @@ header_factory_test_client::header_factory_test_client(bool _use_tcp) : app_(vsomeip::runtime::get()->create_application()), request_(vsomeip::runtime::get()->create_request(_use_tcp)), - sender_(std::bind(&header_factory_test_client::run, this)), running_(true), blocked_(false), is_available_(false), number_of_messages_to_send_(vsomeip_test::NUMBER_OF_MESSAGES_TO_SEND), number_of_sent_messages_(0), - number_of_acknowledged_messages_(0) + number_of_acknowledged_messages_(0), + sender_(std::bind(&header_factory_test_client::run, this)) { } @@ -162,7 +162,7 @@ TEST(someip_header_factory_test, send_message_ten_times_test) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/header_factory_tests/header_factory_test_client.hpp b/test/header_factory_tests/header_factory_test_client.hpp index 911c754..eb62191 100644 --- a/test/header_factory_tests/header_factory_test_client.hpp +++ b/test/header_factory_tests/header_factory_test_client.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -38,13 +38,13 @@ private: bool use_tcp_; std::mutex mutex_; std::condition_variable condition_; - std::thread sender_; bool running_; bool blocked_; bool is_available_; std::uint32_t number_of_messages_to_send_; std::uint32_t number_of_sent_messages_; std::uint32_t number_of_acknowledged_messages_; + std::thread sender_; }; #endif /* HEADERFACTORYTESTCLIENT_HPP_ */ diff --git a/test/header_factory_tests/header_factory_test_client_start.sh b/test/header_factory_tests/header_factory_test_client_start.sh index b500060..4e9c1ed 100755 --- a/test/header_factory_tests/header_factory_test_client_start.sh +++ b/test/header_factory_tests/header_factory_test_client_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/header_factory_tests/header_factory_test_send_receive_starter.sh b/test/header_factory_tests/header_factory_test_send_receive_starter.sh index 74f8504..5d1d780 100755 --- a/test/header_factory_tests/header_factory_test_send_receive_starter.sh +++ b/test/header_factory_tests/header_factory_test_send_receive_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/header_factory_tests/header_factory_test_service.cpp b/test/header_factory_tests/header_factory_test_service.cpp index 9a06762..12527ed 100644 --- a/test/header_factory_tests/header_factory_test_service.cpp +++ b/test/header_factory_tests/header_factory_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -11,9 +11,9 @@ header_factory_test_service::header_factory_test_service(bool _use_static_routin app_(vsomeip::runtime::get()->create_application()), is_registered_(false), use_static_routing_(_use_static_routing), - offer_thread_(std::bind(&header_factory_test_service::run, this)), blocked_(false), - number_of_received_messages_(0) + number_of_received_messages_(0), + offer_thread_(std::bind(&header_factory_test_service::run, this)) { } @@ -81,6 +81,7 @@ void header_factory_test_service::on_state(vsomeip::state_type_e _state) if(!is_registered_) { is_registered_ = true; + std::lock_guard<std::mutex> its_lock(mutex_); blocked_ = true; // "start" the run method thread condition_.notify_one(); @@ -160,7 +161,7 @@ TEST(someip_header_factory_test, reveice_message_ten_times_test) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/header_factory_tests/header_factory_test_service.hpp b/test/header_factory_tests/header_factory_test_service.hpp index a28d040..32e49e5 100644 --- a/test/header_factory_tests/header_factory_test_service.hpp +++ b/test/header_factory_tests/header_factory_test_service.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -35,11 +35,11 @@ private: bool is_registered_; bool use_static_routing_; - std::thread offer_thread_; std::mutex mutex_; std::condition_variable condition_; bool blocked_; std::uint32_t number_of_received_messages_; + std::thread offer_thread_; }; #endif /* HEADERFACTORYTESTSERVICE_HPP_ */ diff --git a/test/header_factory_tests/header_factory_test_service_start.sh b/test/header_factory_tests/header_factory_test_service_start.sh index 437ecdd..e123a46 100755 --- a/test/header_factory_tests/header_factory_test_service_start.sh +++ b/test/header_factory_tests/header_factory_test_service_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/initial_event_tests/initial_event_test_availability_checker.cpp b/test/initial_event_tests/initial_event_test_availability_checker.cpp index 69ae6ee..719d6d3 100644 --- a/test/initial_event_tests/initial_event_test_availability_checker.cpp +++ b/test/initial_event_tests/initial_event_test_availability_checker.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -141,7 +141,7 @@ TEST(someip_initial_event_test, wait_for_availability_and_exit) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/initial_event_tests/initial_event_test_client.cpp b/test/initial_event_tests/initial_event_test_client.cpp index caa79cb..2f49516 100644 --- a/test/initial_event_tests/initial_event_test_client.cpp +++ b/test/initial_event_tests/initial_event_test_client.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -275,7 +275,7 @@ TEST(someip_initial_event_test, wait_for_initial_events_of_all_services) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/initial_event_tests/initial_event_test_globals.hpp b/test/initial_event_tests/initial_event_test_globals.hpp index 36f8def..ce69ea9 100644 --- a/test/initial_event_tests/initial_event_test_globals.hpp +++ b/test/initial_event_tests/initial_event_test_globals.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/initial_event_tests/initial_event_test_master_starter.sh b/test/initial_event_tests/initial_event_test_master_starter.sh index 471b973..2ef37f7 100755 --- a/test/initial_event_tests/initial_event_test_master_starter.sh +++ b/test/initial_event_tests/initial_event_test_master_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/initial_event_tests/initial_event_test_service.cpp b/test/initial_event_tests/initial_event_test_service.cpp index 5823a09..5873ffe 100644 --- a/test/initial_event_tests/initial_event_test_service.cpp +++ b/test/initial_event_tests/initial_event_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -110,7 +110,7 @@ TEST(someip_initial_event_test, set_field_once) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/initial_event_tests/initial_event_test_slave_starter.sh b/test/initial_event_tests/initial_event_test_slave_starter.sh index 2b9eec8..74371d0 100755 --- a/test/initial_event_tests/initial_event_test_slave_starter.sh +++ b/test/initial_event_tests/initial_event_test_slave_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/initial_event_tests/initial_event_test_stop_service.cpp b/test/initial_event_tests/initial_event_test_stop_service.cpp index a17e0d8..8f32fbc 100644 --- a/test/initial_event_tests/initial_event_test_stop_service.cpp +++ b/test/initial_event_tests/initial_event_test_stop_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -11,6 +11,7 @@ #include <thread> #include <map> #include <algorithm> +#include <atomic> #include <gtest/gtest.h> @@ -154,18 +155,22 @@ public: void run() { VSOMEIP_DEBUG << "[" << std::setw(4) << std::setfill('0') << std::hex << service_info_.service_id << "] Running"; - std::unique_lock<std::mutex> its_lock(mutex_); - while (wait_until_registered_) { - condition_.wait(its_lock); + { + std::unique_lock<std::mutex> its_lock(mutex_); + while (wait_until_registered_) { + condition_.wait(its_lock); + } } VSOMEIP_DEBUG << "[" << std::setw(4) << std::setfill('0') << std::hex << service_info_.service_id << "] Offering"; offer(); - std::unique_lock<std::mutex> its_availability_lock(availability_mutex_); - while (wait_until_stop_service_other_node_available_) { - availability_condition_.wait(its_availability_lock); + { + std::unique_lock<std::mutex> its_availability_lock(availability_mutex_); + while (wait_until_stop_service_other_node_available_) { + availability_condition_.wait(its_availability_lock); + } } VSOMEIP_DEBUG << "[" << std::setw(4) << std::setfill('0') << std::hex @@ -184,9 +189,11 @@ public: } app_->send(msg); called_other_node_ = true; - - while (wait_until_shutdown_method_called_) { - condition_.wait(its_lock); + { + std::unique_lock<std::mutex> its_lock(mutex_); + while (wait_until_shutdown_method_called_) { + condition_.wait(its_lock); + } } } @@ -228,12 +235,12 @@ private: std::mutex availability_mutex_; std::condition_variable availability_condition_; - bool wait_for_stop_; + std::atomic<bool> wait_for_stop_; std::mutex stop_mutex_; std::condition_variable stop_condition_; std::thread stop_thread_; - bool called_other_node_; + std::atomic<bool> called_other_node_; }; static bool is_master = false; @@ -247,7 +254,7 @@ TEST(someip_initial_event_test, wait_for_stop_method_to_be_called) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/magic_cookies_tests/magic_cookies_test_client.cpp b/test/magic_cookies_tests/magic_cookies_test_client.cpp index 8be1eaf..a6afacd 100644 --- a/test/magic_cookies_tests/magic_cookies_test_client.cpp +++ b/test/magic_cookies_tests/magic_cookies_test_client.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/magic_cookies_tests/magic_cookies_test_client_start.sh b/test/magic_cookies_tests/magic_cookies_test_client_start.sh index 2ebe8c1..45f4d3c 100755 --- a/test/magic_cookies_tests/magic_cookies_test_client_start.sh +++ b/test/magic_cookies_tests/magic_cookies_test_client_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/magic_cookies_tests/magic_cookies_test_service.cpp b/test/magic_cookies_tests/magic_cookies_test_service.cpp index a69084d..21e936d 100644 --- a/test/magic_cookies_tests/magic_cookies_test_service.cpp +++ b/test/magic_cookies_tests/magic_cookies_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -70,6 +70,7 @@ public: if (_state == vsomeip::state_type_e::ST_REGISTERED) { if (!is_registered_) { is_registered_ = true; + std::lock_guard<std::mutex> its_lock(mutex_); blocked_ = true; condition_.notify_one(); } diff --git a/test/magic_cookies_tests/magic_cookies_test_service_start.sh b/test/magic_cookies_tests/magic_cookies_test_service_start.sh index 00c6546..9288b7e 100755 --- a/test/magic_cookies_tests/magic_cookies_test_service_start.sh +++ b/test/magic_cookies_tests/magic_cookies_test_service_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/magic_cookies_tests/magic_cookies_test_starter.sh b/test/magic_cookies_tests/magic_cookies_test_starter.sh index aba3b0b..ef158a2 100755 --- a/test/magic_cookies_tests/magic_cookies_test_starter.sh +++ b/test/magic_cookies_tests/magic_cookies_test_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/offer_tests/conf/offer_test_external_master_starter.sh.in b/test/offer_tests/conf/offer_test_external_master_starter.sh.in index 6c9f72b..a8af719 100755 --- a/test/offer_tests/conf/offer_test_external_master_starter.sh.in +++ b/test/offer_tests/conf/offer_test_external_master_starter.sh.in @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/offer_tests/offer_test_client.cpp b/test/offer_tests/offer_test_client.cpp index 493c3fa..b337199 100644 --- a/test/offer_tests/offer_test_client.cpp +++ b/test/offer_tests/offer_test_client.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -11,6 +11,7 @@ #include <thread> #include <map> #include <algorithm> +#include <atomic> #include <gtest/gtest.h> @@ -34,12 +35,12 @@ public: service_available_(false), wait_until_registered_(true), wait_until_service_available_(true), - send_thread_(std::bind(&offer_test_client::send, this)), wait_for_stop_(true), - stop_thread_(std::bind(&offer_test_client::wait_for_stop, this)), last_received_counter_(0), last_received_response_(std::chrono::steady_clock::now()), - number_received_responses_(0) { + number_received_responses_(0), + stop_thread_(std::bind(&offer_test_client::wait_for_stop, this)), + send_thread_(std::bind(&offer_test_client::send, this)) { if (!app_->init()) { ADD_FAILURE() << "Couldn't initialize application"; return; @@ -232,16 +233,16 @@ private: bool wait_until_service_available_; std::mutex mutex_; std::condition_variable condition_; - std::thread send_thread_; bool wait_for_stop_; std::mutex stop_mutex_; std::condition_variable stop_condition_; - std::thread stop_thread_; std::uint32_t last_received_counter_; std::chrono::steady_clock::time_point last_received_response_; - std::uint32_t number_received_responses_; + std::atomic<std::uint32_t> number_received_responses_; + std::thread stop_thread_; + std::thread send_thread_; }; static operation_mode_e passed_mode = operation_mode_e::SUBSCRIBE; @@ -251,7 +252,7 @@ TEST(someip_offer_test, subscribe_or_call_method_at_service) offer_test_client its_sample(offer_test::service, passed_mode); } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/offer_tests/offer_test_external_sd_msg_sender.cpp b/test/offer_tests/offer_test_external_sd_msg_sender.cpp index 16481aa..6849b95 100644 --- a/test/offer_tests/offer_test_external_sd_msg_sender.cpp +++ b/test/offer_tests/offer_test_external_sd_msg_sender.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -60,7 +60,7 @@ TEST(someip_offer_test, send_offer_service_sd_message) } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); if(argc < 2) { diff --git a/test/offer_tests/offer_test_external_slave_starter.sh b/test/offer_tests/offer_test_external_slave_starter.sh index cdff0d8..d7f08fb 100755 --- a/test/offer_tests/offer_test_external_slave_starter.sh +++ b/test/offer_tests/offer_test_external_slave_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/offer_tests/offer_test_globals.hpp b/test/offer_tests/offer_test_globals.hpp index cc15c15..2fc3bde 100644 --- a/test/offer_tests/offer_test_globals.hpp +++ b/test/offer_tests/offer_test_globals.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/offer_tests/offer_test_local_starter.sh b/test/offer_tests/offer_test_local_starter.sh index 69b4821..38efbb6 100755 --- a/test/offer_tests/offer_test_local_starter.sh +++ b/test/offer_tests/offer_test_local_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/offer_tests/offer_test_service.cpp b/test/offer_tests/offer_test_service.cpp index f06de9e..13c193f 100644 --- a/test/offer_tests/offer_test_service.cpp +++ b/test/offer_tests/offer_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -11,6 +11,7 @@ #include <thread> #include <map> #include <algorithm> +#include <atomic> #include <gtest/gtest.h> @@ -33,8 +34,8 @@ public: "offer_test_service" + service_number)), counter_(0), wait_until_registered_(true), - offer_thread_(std::bind(&offer_test_service::run, this)), - shutdown_method_called_(false) { + shutdown_method_called_(false), + offer_thread_(std::bind(&offer_test_service::run, this)) { if (!app_->init()) { ADD_FAILURE() << "Couldn't initialize application"; return; @@ -143,9 +144,8 @@ private: bool wait_until_registered_; std::mutex mutex_; std::condition_variable condition_; + std::atomic<bool> shutdown_method_called_; std::thread offer_thread_; - - bool shutdown_method_called_; }; TEST(someip_offer_test, notify_increasing_counter) @@ -154,7 +154,7 @@ TEST(someip_offer_test, notify_increasing_counter) } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/offer_tests/offer_test_service_external.cpp b/test/offer_tests/offer_test_service_external.cpp index 2f74271..694a678 100644 --- a/test/offer_tests/offer_test_service_external.cpp +++ b/test/offer_tests/offer_test_service_external.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -140,7 +140,7 @@ TEST(someip_offer_test, notify_increasing_counter) } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/payload_tests/external_local_payload_test_client_external_start.sh b/test/payload_tests/external_local_payload_test_client_external_start.sh index 06babd4..5f6b7ea 100755 --- a/test/payload_tests/external_local_payload_test_client_external_start.sh +++ b/test/payload_tests/external_local_payload_test_client_external_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/payload_tests/external_local_payload_test_client_external_starter.sh b/test/payload_tests/external_local_payload_test_client_external_starter.sh index b675b0a..89541b9 100755 --- a/test/payload_tests/external_local_payload_test_client_external_starter.sh +++ b/test/payload_tests/external_local_payload_test_client_external_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/payload_tests/external_local_payload_test_client_local_and_external_starter.sh b/test/payload_tests/external_local_payload_test_client_local_and_external_starter.sh index bc4ce89..283f400 100755 --- a/test/payload_tests/external_local_payload_test_client_local_and_external_starter.sh +++ b/test/payload_tests/external_local_payload_test_client_local_and_external_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/payload_tests/external_local_payload_test_client_local_start.sh b/test/payload_tests/external_local_payload_test_client_local_start.sh index d3a1f04..b79e534 100755 --- a/test/payload_tests/external_local_payload_test_client_local_start.sh +++ b/test/payload_tests/external_local_payload_test_client_local_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/payload_tests/external_local_payload_test_client_local_starter.sh b/test/payload_tests/external_local_payload_test_client_local_starter.sh index fcc8a20..e2196d8 100755 --- a/test/payload_tests/external_local_payload_test_client_local_starter.sh +++ b/test/payload_tests/external_local_payload_test_client_local_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/payload_tests/external_local_payload_test_service_client_external_start.sh b/test/payload_tests/external_local_payload_test_service_client_external_start.sh index e668cbc..046d50b 100755 --- a/test/payload_tests/external_local_payload_test_service_client_external_start.sh +++ b/test/payload_tests/external_local_payload_test_service_client_external_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/payload_tests/external_local_payload_test_service_start.sh b/test/payload_tests/external_local_payload_test_service_start.sh index e5bfe2b..90b1b38 100755 --- a/test/payload_tests/external_local_payload_test_service_start.sh +++ b/test/payload_tests/external_local_payload_test_service_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/payload_tests/local_payload_test_client_start.sh b/test/payload_tests/local_payload_test_client_start.sh index 87ec43d..975be2a 100755 --- a/test/payload_tests/local_payload_test_client_start.sh +++ b/test/payload_tests/local_payload_test_client_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/payload_tests/local_payload_test_huge_payload_starter.sh b/test/payload_tests/local_payload_test_huge_payload_starter.sh index 07cc372..c230891 100755 --- a/test/payload_tests/local_payload_test_huge_payload_starter.sh +++ b/test/payload_tests/local_payload_test_huge_payload_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/payload_tests/local_payload_test_service_start.sh b/test/payload_tests/local_payload_test_service_start.sh index 34fbc80..cc67f54 100755 --- a/test/payload_tests/local_payload_test_service_start.sh +++ b/test/payload_tests/local_payload_test_service_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/payload_tests/local_payload_test_starter.sh b/test/payload_tests/local_payload_test_starter.sh index 489f42f..abc4577 100755 --- a/test/payload_tests/local_payload_test_starter.sh +++ b/test/payload_tests/local_payload_test_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/payload_tests/payload_test_client.cpp b/test/payload_tests/payload_test_client.cpp index 11d4511..65dbec7 100644 --- a/test/payload_tests/payload_test_client.cpp +++ b/test/payload_tests/payload_test_client.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -28,7 +28,6 @@ payload_test_client::payload_test_client( request_(vsomeip::runtime::get()->create_request(_use_tcp)), call_service_sync_(_call_service_sync), sliding_window_size_(_sliding_window_size), - sender_(std::bind(&payload_test_client::run, this)), blocked_(false), is_available_(false), number_of_messages_to_send_(number_of_messages_to_send ? number_of_messages_to_send : vsomeip_test::NUMBER_OF_MESSAGES_TO_SEND_PAYLOAD_TESTS), @@ -36,7 +35,8 @@ payload_test_client::payload_test_client( number_of_sent_messages_total_(0), number_of_acknowledged_messages_(0), current_payload_size_(1), - all_msg_acknowledged_(false) + all_msg_acknowledged_(false), + sender_(std::bind(&payload_test_client::run, this)) { } @@ -319,7 +319,7 @@ TEST(someip_payload_test, send_different_payloads) } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { std::string tcp_enable("--tcp"); diff --git a/test/payload_tests/payload_test_client.hpp b/test/payload_tests/payload_test_client.hpp index b9da542..2757d00 100644 --- a/test/payload_tests/payload_test_client.hpp +++ b/test/payload_tests/payload_test_client.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -49,7 +49,6 @@ private: std::uint32_t sliding_window_size_; std::mutex mutex_; std::condition_variable condition_; - std::thread sender_; bool blocked_; bool is_available_; const std::uint32_t number_of_messages_to_send_; @@ -65,6 +64,8 @@ private: std::mutex all_msg_acknowledged_mutex_; std::condition_variable all_msg_acknowledged_cv_; + std::thread sender_; + }; #endif /* PAYLOADTESTCLIENT_HPP_ */ diff --git a/test/payload_tests/payload_test_service.cpp b/test/payload_tests/payload_test_service.cpp index 05a9cb4..bb174cd 100644 --- a/test/payload_tests/payload_test_service.cpp +++ b/test/payload_tests/payload_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -13,9 +13,9 @@ payload_test_service::payload_test_service(bool _use_tcp) : app_(vsomeip::runtime::get()->create_application()), is_registered_(false), use_tcp_(_use_tcp), - offer_thread_(std::bind(&payload_test_service::run, this)), blocked_(false), - number_of_received_messages_(0) + number_of_received_messages_(0), + offer_thread_(std::bind(&payload_test_service::run, this)) { } @@ -83,6 +83,7 @@ void payload_test_service::on_state(vsomeip::state_type_e _state) if(!is_registered_) { is_registered_ = true; + std::lock_guard<std::mutex> its_lock(mutex_); blocked_ = true; // "start" the run method thread condition_.notify_one(); @@ -158,7 +159,7 @@ TEST(someip_payload_test, send_response_for_every_request) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { std::string help("--help"); diff --git a/test/payload_tests/payload_test_service.hpp b/test/payload_tests/payload_test_service.hpp index d109146..32ae1e7 100644 --- a/test/payload_tests/payload_test_service.hpp +++ b/test/payload_tests/payload_test_service.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -37,11 +37,11 @@ private: bool use_tcp_; bool use_static_routing_; - std::thread offer_thread_; std::mutex mutex_; std::condition_variable condition_; bool blocked_; std::uint32_t number_of_received_messages_; + std::thread offer_thread_; }; #endif /* PAYLOADTESTSERVICE_HPP_ */ diff --git a/test/payload_tests/stopwatch.cpp b/test/payload_tests/stopwatch.cpp index 2eb59f3..83506f4 100644 --- a/test/payload_tests/stopwatch.cpp +++ b/test/payload_tests/stopwatch.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/payload_tests/stopwatch.hpp b/test/payload_tests/stopwatch.hpp index 9723c22..5917e12 100644 --- a/test/payload_tests/stopwatch.hpp +++ b/test/payload_tests/stopwatch.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/routing_tests/conf/local_routing_test_starter.sh.bat.in b/test/routing_tests/conf/local_routing_test_starter.sh.bat.in index ab96d8e..ca8582f 100755 --- a/test/routing_tests/conf/local_routing_test_starter.sh.bat.in +++ b/test/routing_tests/conf/local_routing_test_starter.sh.bat.in @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/routing_tests/conf/local_routing_test_starter.sh.in b/test/routing_tests/conf/local_routing_test_starter.sh.in index 6f81609..457c60c 100755 --- a/test/routing_tests/conf/local_routing_test_starter.sh.in +++ b/test/routing_tests/conf/local_routing_test_starter.sh.in @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/routing_tests/external_local_routing_test_client_external_start.sh b/test/routing_tests/external_local_routing_test_client_external_start.sh index 05bb510..b267b47 100755 --- a/test/routing_tests/external_local_routing_test_client_external_start.sh +++ b/test/routing_tests/external_local_routing_test_client_external_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/routing_tests/external_local_routing_test_service.cpp b/test/routing_tests/external_local_routing_test_service.cpp index cd92508..ce8b9ef 100644 --- a/test/routing_tests/external_local_routing_test_service.cpp +++ b/test/routing_tests/external_local_routing_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -176,7 +176,7 @@ TEST(someip_external_local_routing_test, receive_ten_messages_over_local_and_ext } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/routing_tests/external_local_routing_test_service.hpp b/test/routing_tests/external_local_routing_test_service.hpp index e30a71c..a25025e 100644 --- a/test/routing_tests/external_local_routing_test_service.hpp +++ b/test/routing_tests/external_local_routing_test_service.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/routing_tests/external_local_routing_test_service_start.sh b/test/routing_tests/external_local_routing_test_service_start.sh index c79428d..81b2ef1 100755 --- a/test/routing_tests/external_local_routing_test_service_start.sh +++ b/test/routing_tests/external_local_routing_test_service_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/routing_tests/external_local_routing_test_starter.sh b/test/routing_tests/external_local_routing_test_starter.sh index f4ba129..836d03e 100755 --- a/test/routing_tests/external_local_routing_test_starter.sh +++ b/test/routing_tests/external_local_routing_test_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/routing_tests/local_routing_test_client.cpp b/test/routing_tests/local_routing_test_client.cpp index a9acb44..5bd83fe 100644 --- a/test/routing_tests/local_routing_test_client.cpp +++ b/test/routing_tests/local_routing_test_client.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -159,7 +159,7 @@ TEST(someip_local_routing_test, send_ten_messages_to_service_and_receive_reply) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/routing_tests/local_routing_test_client.hpp b/test/routing_tests/local_routing_test_client.hpp index 2229ae6..b135dea 100644 --- a/test/routing_tests/local_routing_test_client.hpp +++ b/test/routing_tests/local_routing_test_client.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/routing_tests/local_routing_test_client_start.sh b/test/routing_tests/local_routing_test_client_start.sh index cd36c77..ed4023e 100755 --- a/test/routing_tests/local_routing_test_client_start.sh +++ b/test/routing_tests/local_routing_test_client_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/routing_tests/local_routing_test_service.cpp b/test/routing_tests/local_routing_test_service.cpp index 137e8ea..4f7962d 100644 --- a/test/routing_tests/local_routing_test_service.cpp +++ b/test/routing_tests/local_routing_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -155,7 +155,7 @@ TEST(someip_local_routing_test, receive_ten_messages_over_local_uds_socket) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/routing_tests/local_routing_test_service.hpp b/test/routing_tests/local_routing_test_service.hpp index 3d575d7..531fdb7 100644 --- a/test/routing_tests/local_routing_test_service.hpp +++ b/test/routing_tests/local_routing_test_service.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/routing_tests/local_routing_test_service_start.sh b/test/routing_tests/local_routing_test_service_start.sh index 3536212..c59364c 100755 --- a/test/routing_tests/local_routing_test_service_start.sh +++ b/test/routing_tests/local_routing_test_service_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/someip_test_globals.hpp b/test/someip_test_globals.hpp index cb127e5..08397a7 100644 --- a/test/someip_test_globals.hpp +++ b/test/someip_test_globals.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/subscribe_notify_one_tests/subscribe_notify_one_test_globals.hpp b/test/subscribe_notify_one_tests/subscribe_notify_one_test_globals.hpp index 8f4205f..047ded7 100644 --- a/test/subscribe_notify_one_tests/subscribe_notify_one_test_globals.hpp +++ b/test/subscribe_notify_one_tests/subscribe_notify_one_test_globals.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/subscribe_notify_one_tests/subscribe_notify_one_test_master_starter.sh b/test/subscribe_notify_one_tests/subscribe_notify_one_test_master_starter.sh index 995e66e..9fa3ec7 100755 --- a/test/subscribe_notify_one_tests/subscribe_notify_one_test_master_starter.sh +++ b/test/subscribe_notify_one_tests/subscribe_notify_one_test_master_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/subscribe_notify_one_tests/subscribe_notify_one_test_service.cpp b/test/subscribe_notify_one_tests/subscribe_notify_one_test_service.cpp index dc735e2..9849613 100644 --- a/test/subscribe_notify_one_tests/subscribe_notify_one_test_service.cpp +++ b/test/subscribe_notify_one_tests/subscribe_notify_one_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -414,7 +414,7 @@ TEST(someip_subscribe_notify_one_test, send_ten_notifications_to_service) subscribe_notify_one_test::service_infos[service_number], subscription_type); } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/subscribe_notify_one_tests/subscribe_notify_one_test_slave_starter.sh b/test/subscribe_notify_one_tests/subscribe_notify_one_test_slave_starter.sh index 2bcde81..47d0b2d 100755 --- a/test/subscribe_notify_one_tests/subscribe_notify_one_test_slave_starter.sh +++ b/test/subscribe_notify_one_tests/subscribe_notify_one_test_slave_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/subscribe_notify_tests/subscribe_notify_test_globals.hpp b/test/subscribe_notify_tests/subscribe_notify_test_globals.hpp index 6e24a20..ed41314 100644 --- a/test/subscribe_notify_tests/subscribe_notify_test_globals.hpp +++ b/test/subscribe_notify_tests/subscribe_notify_test_globals.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/subscribe_notify_tests/subscribe_notify_test_master_starter.sh b/test/subscribe_notify_tests/subscribe_notify_test_master_starter.sh index 006d2bc..6df3053 100755 --- a/test/subscribe_notify_tests/subscribe_notify_test_master_starter.sh +++ b/test/subscribe_notify_tests/subscribe_notify_test_master_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/test/subscribe_notify_tests/subscribe_notify_test_service.cpp b/test/subscribe_notify_tests/subscribe_notify_test_service.cpp index bec20c6..bc2eedd 100644 --- a/test/subscribe_notify_tests/subscribe_notify_test_service.cpp +++ b/test/subscribe_notify_tests/subscribe_notify_test_service.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -418,7 +418,7 @@ TEST(someip_subscribe_notify_test, send_ten_notifications_to_service) } } -#ifndef WIN32 +#ifndef _WIN32 int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/test/subscribe_notify_tests/subscribe_notify_test_slave_starter.sh b/test/subscribe_notify_tests/subscribe_notify_test_slave_starter.sh index b37a781..9865536 100755 --- a/test/subscribe_notify_tests/subscribe_notify_test_slave_starter.sh +++ b/test/subscribe_notify_tests/subscribe_notify_test_slave_starter.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. |