-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split test_executors up into smaller chunks. (#2421)
The original reason is that on Windows Debug, we were failing to compile because the compilation unit was too large. But also this file was way too large (1200 lines), so it makes sense to split it up. Signed-off-by: Chris Lalancette <[email protected]>
- Loading branch information
1 parent
99f0fc9
commit c10764f
Showing
5 changed files
with
624 additions
and
523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// Copyright 2017 Open Source Robotics Foundation, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef RCLCPP__EXECUTORS__EXECUTOR_TYPES_HPP_ | ||
#define RCLCPP__EXECUTORS__EXECUTOR_TYPES_HPP_ | ||
|
||
#include <gtest/gtest.h> | ||
|
||
#include <string> | ||
#include <type_traits> | ||
|
||
#include "rclcpp/experimental/executors/events_executor/events_executor.hpp" | ||
#include "rclcpp/executors/single_threaded_executor.hpp" | ||
#include "rclcpp/executors/static_single_threaded_executor.hpp" | ||
#include "rclcpp/executors/multi_threaded_executor.hpp" | ||
|
||
using ExecutorTypes = | ||
::testing::Types< | ||
rclcpp::executors::SingleThreadedExecutor, | ||
rclcpp::executors::MultiThreadedExecutor, | ||
rclcpp::executors::StaticSingleThreadedExecutor, | ||
rclcpp::experimental::executors::EventsExecutor>; | ||
|
||
class ExecutorTypeNames | ||
{ | ||
public: | ||
template<typename T> | ||
static std::string GetName(int idx) | ||
{ | ||
(void)idx; | ||
if (std::is_same<T, rclcpp::executors::SingleThreadedExecutor>()) { | ||
return "SingleThreadedExecutor"; | ||
} | ||
|
||
if (std::is_same<T, rclcpp::executors::MultiThreadedExecutor>()) { | ||
return "MultiThreadedExecutor"; | ||
} | ||
|
||
if (std::is_same<T, rclcpp::executors::StaticSingleThreadedExecutor>()) { | ||
return "StaticSingleThreadedExecutor"; | ||
} | ||
|
||
if (std::is_same<T, rclcpp::experimental::executors::EventsExecutor>()) { | ||
return "EventsExecutor"; | ||
} | ||
|
||
return ""; | ||
} | ||
}; | ||
|
||
// StaticSingleThreadedExecutor is not included in these tests for now, due to: | ||
// https://github.com/ros2/rclcpp/issues/1219 | ||
using StandardExecutors = | ||
::testing::Types< | ||
rclcpp::executors::SingleThreadedExecutor, | ||
rclcpp::executors::MultiThreadedExecutor, | ||
rclcpp::experimental::executors::EventsExecutor>; | ||
|
||
#endif // RCLCPP__EXECUTORS__EXECUTOR_TYPES_HPP_ |
Oops, something went wrong.