From 7ef8c96cbd4876741cc95eb37b199ce14ee2a624 Mon Sep 17 00:00:00 2001 From: Pete Baughman Date: Mon, 10 Jun 2019 13:08:07 -0700 Subject: [PATCH 1/7] Add isolated version of ament_add_gmock Signed-off-by: Pete Baughman --- ament_cmake_ros_isolated_gmock/CMakeLists.txt | 14 +++++++ ...ment_cmake_ros_isolated_gmock-extras.cmake | 18 +++++++++ .../cmake/ament_add_ros_isolated_gmock.cmake | 38 +++++++++++++++++++ ament_cmake_ros_isolated_gmock/package.xml | 19 ++++++++++ 4 files changed, 89 insertions(+) create mode 100644 ament_cmake_ros_isolated_gmock/CMakeLists.txt create mode 100644 ament_cmake_ros_isolated_gmock/ament_cmake_ros_isolated_gmock-extras.cmake create mode 100644 ament_cmake_ros_isolated_gmock/cmake/ament_add_ros_isolated_gmock.cmake create mode 100644 ament_cmake_ros_isolated_gmock/package.xml diff --git a/ament_cmake_ros_isolated_gmock/CMakeLists.txt b/ament_cmake_ros_isolated_gmock/CMakeLists.txt new file mode 100644 index 0000000..7ddc666 --- /dev/null +++ b/ament_cmake_ros_isolated_gmock/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.5) + +project(ament_cmake_ros_isolated_gmock) + +find_package(ament_cmake REQUIRED) + +ament_package( + CONFIG_EXTRAS "ament_cmake_ros_isolated_gmock-extras.cmake" +) + +install( + DIRECTORY cmake + DESTINATION share/${PROJECT_NAME} +) diff --git a/ament_cmake_ros_isolated_gmock/ament_cmake_ros_isolated_gmock-extras.cmake b/ament_cmake_ros_isolated_gmock/ament_cmake_ros_isolated_gmock-extras.cmake new file mode 100644 index 0000000..54033af --- /dev/null +++ b/ament_cmake_ros_isolated_gmock/ament_cmake_ros_isolated_gmock-extras.cmake @@ -0,0 +1,18 @@ +# Copyright 2019 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. + +find_package(ament_cmake_gmock QUIET REQUIRED) +find_package(ament_cmake_ros_isolated_test REQUIRED) + +include("${ament_cmake_ros_isolated_gmock_DIR}/ament_add_ros_isolated_gmock.cmake") diff --git a/ament_cmake_ros_isolated_gmock/cmake/ament_add_ros_isolated_gmock.cmake b/ament_cmake_ros_isolated_gmock/cmake/ament_add_ros_isolated_gmock.cmake new file mode 100644 index 0000000..76290c8 --- /dev/null +++ b/ament_cmake_ros_isolated_gmock/cmake/ament_add_ros_isolated_gmock.cmake @@ -0,0 +1,38 @@ +# Copyright 2019 Apex.AI, 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. + +# +# Add a gmock test that runs with ROS_DOMAIN_ID isolation. +# If no ROS_DOMAIN_ID is set, automatically select one not in use by another isolated test +# before running the target test. +# This will prevent tests running in parallel from interfering with one-another. +# +# This behavior can be disabled for debugging in two ways: +# 1) Creating an environment variable called DISABLE_ROS_ISOLATION +# 2) Setting a ROS_DOMAIN_ID environment variable. +# This will cause the tests to use that ROS_DOMAIN_ID. +# +# Parameters are the same as ament_add_gmock + +function(ament_add_ros_isolated_gmock target) + + set(RUNNER "RUNNER" "${ament_cmake_ros_isolated_test_DIR}/run_test_isolated.py") + + ament_add_gmock( + "${target}" + RUNNER "${RUNNER}" + ${ARGN} + ) + +endfunction() diff --git a/ament_cmake_ros_isolated_gmock/package.xml b/ament_cmake_ros_isolated_gmock/package.xml new file mode 100644 index 0000000..a129cb9 --- /dev/null +++ b/ament_cmake_ros_isolated_gmock/package.xml @@ -0,0 +1,19 @@ + + + + ament_cmake_ros_isolated_gmock + 0.7.0 + Adds ability to add gmock tests isolated with ROS_DOMAIN_ID + Pete Baughman + Apache License 2.0 + + ament_cmake + + ament_cmake_core + ament_cmake_gmock + ament_cmake_ros_isolated_test + + + ament_cmake + + From df25e23465d293b84a3c9e6169d3cfda47420986 Mon Sep 17 00:00:00 2001 From: Pete Baughman Date: Mon, 10 Jun 2019 13:55:51 -0700 Subject: [PATCH 2/7] Prevent add_ros_isolated_*_tests from interfering with domain_coordinator self-test Signed-off-by: Pete Baughman --- domain_coordinator/test/test_domain_coordinator.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/domain_coordinator/test/test_domain_coordinator.py b/domain_coordinator/test/test_domain_coordinator.py index 1b1a4cf..bfdbdf6 100644 --- a/domain_coordinator/test/test_domain_coordinator.py +++ b/domain_coordinator/test/test_domain_coordinator.py @@ -19,6 +19,14 @@ class TestUniqueness(unittest.TestCase): + @classmethod + def setUpClass(cls): + # If a ros_isolated test (that uses the domain coordinator) runs at the same time as the + # domain_coordinator test, then the domain_coordinator tests may fail. + # When we're self-testing the domain_coordinator, select a different PORT_BASE so the + # the ports used by the test are different than the ports used for real + domain_coordinator._PORT_BASE += 100 + def test_quickly(self): """ Quick test with false negatives, but simple and easy to understand. From e1bf0e1625b453c95ec6ce33c0c9946476f8a788 Mon Sep 17 00:00:00 2001 From: Pete Baughman Date: Tue, 11 Jun 2019 13:47:35 -0700 Subject: [PATCH 3/7] Move isolated test functions to ament_cmake_ros Signed-off-by: Pete Baughman --- .../ament_cmake_ros-extras.cmake.in | 5 +++++ .../cmake/ament_add_ros_isolated_gtest.cmake | 2 +- .../cmake/ament_add_ros_isolated_pytest.cmake | 2 +- .../cmake/run_test_isolated.py | 0 ament_cmake_ros/package.xml | 3 +++ ament_cmake_ros_isolated_gtest/CMakeLists.txt | 14 -------------- ...ment_cmake_ros_isolated_gtest-extras.cmake | 18 ------------------ ament_cmake_ros_isolated_gtest/package.xml | 19 ------------------- .../CMakeLists.txt | 14 -------------- ...ent_cmake_ros_isolated_pytest-extras.cmake | 18 ------------------ ament_cmake_ros_isolated_pytest/package.xml | 19 ------------------- ament_cmake_ros_isolated_test/CMakeLists.txt | 12 ------------ ament_cmake_ros_isolated_test/package.xml | 17 ----------------- 13 files changed, 10 insertions(+), 133 deletions(-) rename {ament_cmake_ros_isolated_gtest => ament_cmake_ros}/cmake/ament_add_ros_isolated_gtest.cmake (93%) rename {ament_cmake_ros_isolated_pytest => ament_cmake_ros}/cmake/ament_add_ros_isolated_pytest.cmake (94%) rename {ament_cmake_ros_isolated_test => ament_cmake_ros}/cmake/run_test_isolated.py (100%) delete mode 100644 ament_cmake_ros_isolated_gtest/CMakeLists.txt delete mode 100644 ament_cmake_ros_isolated_gtest/ament_cmake_ros_isolated_gtest-extras.cmake delete mode 100644 ament_cmake_ros_isolated_gtest/package.xml delete mode 100644 ament_cmake_ros_isolated_pytest/CMakeLists.txt delete mode 100644 ament_cmake_ros_isolated_pytest/ament_cmake_ros_isolated_pytest-extras.cmake delete mode 100644 ament_cmake_ros_isolated_pytest/package.xml delete mode 100644 ament_cmake_ros_isolated_test/CMakeLists.txt delete mode 100644 ament_cmake_ros_isolated_test/package.xml diff --git a/ament_cmake_ros/ament_cmake_ros-extras.cmake.in b/ament_cmake_ros/ament_cmake_ros-extras.cmake.in index c0b92ba..3c1c5c6 100644 --- a/ament_cmake_ros/ament_cmake_ros-extras.cmake.in +++ b/ament_cmake_ros/ament_cmake_ros-extras.cmake.in @@ -14,5 +14,10 @@ # generated from ament_cmake_ros/ament_cmake_ros-extras.cmake.in +find_package(ament_cmake_gtest QUIET REQUIRED) +find_package(ament_cmake_pytest QUIET REQUIRED) +include("${ament_cmake_ros_DIR}/ament_add_ros_isolated_gtest.cmake") +include("${ament_cmake_ros_DIR}/ament_add_ros_isolated_pytest.cmake") + include("${ament_cmake_ros_DIR}/build_shared_libs.cmake") add_definitions(-DROS_PACKAGE_NAME=\"${PROJECT_NAME}\") diff --git a/ament_cmake_ros_isolated_gtest/cmake/ament_add_ros_isolated_gtest.cmake b/ament_cmake_ros/cmake/ament_add_ros_isolated_gtest.cmake similarity index 93% rename from ament_cmake_ros_isolated_gtest/cmake/ament_add_ros_isolated_gtest.cmake rename to ament_cmake_ros/cmake/ament_add_ros_isolated_gtest.cmake index d6488dc..63c20a5 100644 --- a/ament_cmake_ros_isolated_gtest/cmake/ament_add_ros_isolated_gtest.cmake +++ b/ament_cmake_ros/cmake/ament_add_ros_isolated_gtest.cmake @@ -27,7 +27,7 @@ function(ament_add_ros_isolated_gtest target) - set(RUNNER "RUNNER" "${ament_cmake_ros_isolated_test_DIR}/run_test_isolated.py") + set(RUNNER "RUNNER" "${ament_cmake_ros_DIR}/run_test_isolated.py") ament_add_gtest( "${target}" diff --git a/ament_cmake_ros_isolated_pytest/cmake/ament_add_ros_isolated_pytest.cmake b/ament_cmake_ros/cmake/ament_add_ros_isolated_pytest.cmake similarity index 94% rename from ament_cmake_ros_isolated_pytest/cmake/ament_add_ros_isolated_pytest.cmake rename to ament_cmake_ros/cmake/ament_add_ros_isolated_pytest.cmake index c803629..2285458 100644 --- a/ament_cmake_ros_isolated_pytest/cmake/ament_add_ros_isolated_pytest.cmake +++ b/ament_cmake_ros/cmake/ament_add_ros_isolated_pytest.cmake @@ -27,7 +27,7 @@ function(ament_add_ros_isolated_pytest_test testname path) - set(RUNNER "${ament_cmake_ros_isolated_test_DIR}/run_test_isolated.py") + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") ament_add_pytest_test( "${testname}" "${path}" diff --git a/ament_cmake_ros_isolated_test/cmake/run_test_isolated.py b/ament_cmake_ros/cmake/run_test_isolated.py similarity index 100% rename from ament_cmake_ros_isolated_test/cmake/run_test_isolated.py rename to ament_cmake_ros/cmake/run_test_isolated.py diff --git a/ament_cmake_ros/package.xml b/ament_cmake_ros/package.xml index 5c1e5ce..7832fd5 100644 --- a/ament_cmake_ros/package.xml +++ b/ament_cmake_ros/package.xml @@ -8,8 +8,11 @@ Apache License 2.0 ament_cmake + domain_coordinator ament_cmake + ament_cmake_gtest + ament_cmake_pytest ament_lint_auto ament_lint_common diff --git a/ament_cmake_ros_isolated_gtest/CMakeLists.txt b/ament_cmake_ros_isolated_gtest/CMakeLists.txt deleted file mode 100644 index 6f4c2cc..0000000 --- a/ament_cmake_ros_isolated_gtest/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -project(ament_cmake_ros_isolated_gtest) - -find_package(ament_cmake REQUIRED) - -ament_package( - CONFIG_EXTRAS "ament_cmake_ros_isolated_gtest-extras.cmake" -) - -install( - DIRECTORY cmake - DESTINATION share/${PROJECT_NAME} -) diff --git a/ament_cmake_ros_isolated_gtest/ament_cmake_ros_isolated_gtest-extras.cmake b/ament_cmake_ros_isolated_gtest/ament_cmake_ros_isolated_gtest-extras.cmake deleted file mode 100644 index ad4216c..0000000 --- a/ament_cmake_ros_isolated_gtest/ament_cmake_ros_isolated_gtest-extras.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2019 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. - -find_package(ament_cmake_gtest QUIET REQUIRED) -find_package(ament_cmake_ros_isolated_test REQUIRED) - -include("${ament_cmake_ros_isolated_gtest_DIR}/ament_add_ros_isolated_gtest.cmake") diff --git a/ament_cmake_ros_isolated_gtest/package.xml b/ament_cmake_ros_isolated_gtest/package.xml deleted file mode 100644 index a08f898..0000000 --- a/ament_cmake_ros_isolated_gtest/package.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - ament_cmake_ros_isolated_gtest - 0.7.0 - Adds ability to add gtests isolated with ROS_DOMAIN_ID - Pete Baughman - Apache License 2.0 - - ament_cmake - - ament_cmake_core - ament_cmake_gtest - ament_cmake_ros_isolated_test - - - ament_cmake - - diff --git a/ament_cmake_ros_isolated_pytest/CMakeLists.txt b/ament_cmake_ros_isolated_pytest/CMakeLists.txt deleted file mode 100644 index c647a23..0000000 --- a/ament_cmake_ros_isolated_pytest/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -project(ament_cmake_ros_isolated_pytest) - -find_package(ament_cmake REQUIRED) - -ament_package( - CONFIG_EXTRAS "ament_cmake_ros_isolated_pytest-extras.cmake" -) - -install( - DIRECTORY cmake - DESTINATION share/${PROJECT_NAME} -) diff --git a/ament_cmake_ros_isolated_pytest/ament_cmake_ros_isolated_pytest-extras.cmake b/ament_cmake_ros_isolated_pytest/ament_cmake_ros_isolated_pytest-extras.cmake deleted file mode 100644 index d9a41f5..0000000 --- a/ament_cmake_ros_isolated_pytest/ament_cmake_ros_isolated_pytest-extras.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2019 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. - -find_package(ament_cmake_pytest QUIET REQUIRED) -find_package(ament_cmake_ros_isolated_test REQUIRED) - -include("${ament_cmake_ros_isolated_pytest_DIR}/ament_add_ros_isolated_pytest.cmake") diff --git a/ament_cmake_ros_isolated_pytest/package.xml b/ament_cmake_ros_isolated_pytest/package.xml deleted file mode 100644 index e0d634a..0000000 --- a/ament_cmake_ros_isolated_pytest/package.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - ament_cmake_ros_isolated_pytest - 0.7.0 - Adds ability to add pytests isolated with ROS_DOMAIN_ID - Pete Baughman - Apache License 2.0 - - ament_cmake - - ament_cmake_core - ament_cmake_pytest - ament_cmake_ros_isolated_test - - - ament_cmake - - diff --git a/ament_cmake_ros_isolated_test/CMakeLists.txt b/ament_cmake_ros_isolated_test/CMakeLists.txt deleted file mode 100644 index 59dd46e..0000000 --- a/ament_cmake_ros_isolated_test/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -project(ament_cmake_ros_isolated_test) - -find_package(ament_cmake REQUIRED) - -install( - DIRECTORY cmake - DESTINATION share/${PROJECT_NAME} -) - -ament_package() diff --git a/ament_cmake_ros_isolated_test/package.xml b/ament_cmake_ros_isolated_test/package.xml deleted file mode 100644 index c78e4c1..0000000 --- a/ament_cmake_ros_isolated_test/package.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - ament_cmake_ros_isolated_test - 0.7.0 - Provides an alternative test runner to ament_cmake_test that provides ROS_DOMAIN_ID isolation - Pete Baughman - Apache License 2.0 - - ament_cmake - domain_coordinator - - - ament_cmake - - - From 4352af2ad809a7525e8737c5d761632d1d740190 Mon Sep 17 00:00:00 2001 From: Pete Baughman Date: Tue, 11 Jun 2019 13:57:51 -0700 Subject: [PATCH 4/7] Move ament_cmake_ros_isolated_gmock into ament_cmake_ros too Signed-off-by: Pete Baughman --- ament_cmake_ros/ament_cmake_ros-extras.cmake.in | 2 ++ .../cmake/ament_add_ros_isolated_gmock.cmake | 2 +- ament_cmake_ros/package.xml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) rename {ament_cmake_ros_isolated_gmock => ament_cmake_ros}/cmake/ament_add_ros_isolated_gmock.cmake (93%) diff --git a/ament_cmake_ros/ament_cmake_ros-extras.cmake.in b/ament_cmake_ros/ament_cmake_ros-extras.cmake.in index 3c1c5c6..15d7706 100644 --- a/ament_cmake_ros/ament_cmake_ros-extras.cmake.in +++ b/ament_cmake_ros/ament_cmake_ros-extras.cmake.in @@ -14,8 +14,10 @@ # generated from ament_cmake_ros/ament_cmake_ros-extras.cmake.in +find_package(ament_cmake_gmock QUIET REQUIRED) find_package(ament_cmake_gtest QUIET REQUIRED) find_package(ament_cmake_pytest QUIET REQUIRED) +include("${ament_cmake_ros_DIR}/ament_add_ros_isolated_gmock.cmake") include("${ament_cmake_ros_DIR}/ament_add_ros_isolated_gtest.cmake") include("${ament_cmake_ros_DIR}/ament_add_ros_isolated_pytest.cmake") diff --git a/ament_cmake_ros_isolated_gmock/cmake/ament_add_ros_isolated_gmock.cmake b/ament_cmake_ros/cmake/ament_add_ros_isolated_gmock.cmake similarity index 93% rename from ament_cmake_ros_isolated_gmock/cmake/ament_add_ros_isolated_gmock.cmake rename to ament_cmake_ros/cmake/ament_add_ros_isolated_gmock.cmake index 76290c8..dfa8a3b 100644 --- a/ament_cmake_ros_isolated_gmock/cmake/ament_add_ros_isolated_gmock.cmake +++ b/ament_cmake_ros/cmake/ament_add_ros_isolated_gmock.cmake @@ -27,7 +27,7 @@ function(ament_add_ros_isolated_gmock target) - set(RUNNER "RUNNER" "${ament_cmake_ros_isolated_test_DIR}/run_test_isolated.py") + set(RUNNER "RUNNER" "${ament_cmake_ros_DIR}/run_test_isolated.py") ament_add_gmock( "${target}" diff --git a/ament_cmake_ros/package.xml b/ament_cmake_ros/package.xml index 7832fd5..6ffe1ef 100644 --- a/ament_cmake_ros/package.xml +++ b/ament_cmake_ros/package.xml @@ -12,6 +12,7 @@ ament_cmake ament_cmake_gtest + ament_cmake_gmock ament_cmake_pytest ament_lint_auto From ddf4957f96fd74dbe4200a78983fa8dd27c9cc16 Mon Sep 17 00:00:00 2001 From: Pete Baughman Date: Thu, 13 Jun 2019 15:35:36 -0700 Subject: [PATCH 5/7] Remove files that got left behind when isolated_gmock moved to ament_cmake_ros Signed-off-by: Pete Baughman --- ament_cmake_ros_isolated_gmock/CMakeLists.txt | 14 -------------- ...ment_cmake_ros_isolated_gmock-extras.cmake | 18 ------------------ ament_cmake_ros_isolated_gmock/package.xml | 19 ------------------- 3 files changed, 51 deletions(-) delete mode 100644 ament_cmake_ros_isolated_gmock/CMakeLists.txt delete mode 100644 ament_cmake_ros_isolated_gmock/ament_cmake_ros_isolated_gmock-extras.cmake delete mode 100644 ament_cmake_ros_isolated_gmock/package.xml diff --git a/ament_cmake_ros_isolated_gmock/CMakeLists.txt b/ament_cmake_ros_isolated_gmock/CMakeLists.txt deleted file mode 100644 index 7ddc666..0000000 --- a/ament_cmake_ros_isolated_gmock/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -project(ament_cmake_ros_isolated_gmock) - -find_package(ament_cmake REQUIRED) - -ament_package( - CONFIG_EXTRAS "ament_cmake_ros_isolated_gmock-extras.cmake" -) - -install( - DIRECTORY cmake - DESTINATION share/${PROJECT_NAME} -) diff --git a/ament_cmake_ros_isolated_gmock/ament_cmake_ros_isolated_gmock-extras.cmake b/ament_cmake_ros_isolated_gmock/ament_cmake_ros_isolated_gmock-extras.cmake deleted file mode 100644 index 54033af..0000000 --- a/ament_cmake_ros_isolated_gmock/ament_cmake_ros_isolated_gmock-extras.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2019 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. - -find_package(ament_cmake_gmock QUIET REQUIRED) -find_package(ament_cmake_ros_isolated_test REQUIRED) - -include("${ament_cmake_ros_isolated_gmock_DIR}/ament_add_ros_isolated_gmock.cmake") diff --git a/ament_cmake_ros_isolated_gmock/package.xml b/ament_cmake_ros_isolated_gmock/package.xml deleted file mode 100644 index a129cb9..0000000 --- a/ament_cmake_ros_isolated_gmock/package.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - ament_cmake_ros_isolated_gmock - 0.7.0 - Adds ability to add gmock tests isolated with ROS_DOMAIN_ID - Pete Baughman - Apache License 2.0 - - ament_cmake - - ament_cmake_core - ament_cmake_gmock - ament_cmake_ros_isolated_test - - - ament_cmake - - From 9b05c5205589b364002b92f646cf85eed7cf60e0 Mon Sep 17 00:00:00 2001 From: Pete Baughman Date: Thu, 13 Jun 2019 16:13:53 -0700 Subject: [PATCH 6/7] Fix lint errors Signed-off-by: Pete Baughman --- ament_cmake_ros/cmake/ament_add_ros_isolated_gmock.cmake | 9 +++++---- ament_cmake_ros/cmake/ament_add_ros_isolated_gtest.cmake | 9 +++++---- .../cmake/ament_add_ros_isolated_pytest.cmake | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/ament_cmake_ros/cmake/ament_add_ros_isolated_gmock.cmake b/ament_cmake_ros/cmake/ament_add_ros_isolated_gmock.cmake index dfa8a3b..dedb2b4 100644 --- a/ament_cmake_ros/cmake/ament_add_ros_isolated_gmock.cmake +++ b/ament_cmake_ros/cmake/ament_add_ros_isolated_gmock.cmake @@ -14,12 +14,13 @@ # # Add a gmock test that runs with ROS_DOMAIN_ID isolation. -# If no ROS_DOMAIN_ID is set, automatically select one not in use by another isolated test -# before running the target test. -# This will prevent tests running in parallel from interfering with one-another. +# If no ROS_DOMAIN_ID is set, automatically select one not in use by another +# isolated test before running the target test. +# This will prevent tests running in parallel from interfering with +# one-another. # # This behavior can be disabled for debugging in two ways: -# 1) Creating an environment variable called DISABLE_ROS_ISOLATION +# 1) Creating an environment variable called DISABLE_ROS_ISOLATION # 2) Setting a ROS_DOMAIN_ID environment variable. # This will cause the tests to use that ROS_DOMAIN_ID. # diff --git a/ament_cmake_ros/cmake/ament_add_ros_isolated_gtest.cmake b/ament_cmake_ros/cmake/ament_add_ros_isolated_gtest.cmake index 63c20a5..a3a08f9 100644 --- a/ament_cmake_ros/cmake/ament_add_ros_isolated_gtest.cmake +++ b/ament_cmake_ros/cmake/ament_add_ros_isolated_gtest.cmake @@ -14,12 +14,13 @@ # # Add a gtest that runs with ROS_DOMAIN_ID isolation. -# If no ROS_DOMAIN_ID is set, automatically select one not in use by another isolated test -# before running the target test. -# This will prevent tests running in parallel from interfering with one-another. +# If no ROS_DOMAIN_ID is set, automatically select one not in use by another +# isolated test before running the target test. +# This will prevent tests running in parallel from interfering with +# one-another. # # This behavior can be disabled for debugging in two ways: -# 1) Creating an environment variable called DISABLE_ROS_ISOLATION +# 1) Creating an environment variable called DISABLE_ROS_ISOLATION # 2) Setting a ROS_DOMAIN_ID environment variable. # This will cause the tests to use that ROS_DOMAIN_ID. # diff --git a/ament_cmake_ros/cmake/ament_add_ros_isolated_pytest.cmake b/ament_cmake_ros/cmake/ament_add_ros_isolated_pytest.cmake index 2285458..4d1e08b 100644 --- a/ament_cmake_ros/cmake/ament_add_ros_isolated_pytest.cmake +++ b/ament_cmake_ros/cmake/ament_add_ros_isolated_pytest.cmake @@ -14,12 +14,13 @@ # # Add a pytest that runs with ROS_DOMAIN_ID isolation. -# If no ROS_DOMAIN_ID is set, automatically select one not in use by another isolated test -# before running the target test. -# This will prevent tests running in parallel from interfering with one-another. +# If no ROS_DOMAIN_ID is set, automatically select one not in use by another +# isolated test before running the target test. +# This will prevent tests running in parallel from interfering with +# one-another. # # This behavior can be disabled for debugging in two ways: -# 1) Creating an environment variable called DISABLE_ROS_ISOLATION +# 1) Creating an environment variable called DISABLE_ROS_ISOLATION # 2) Setting a ROS_DOMAIN_ID environment variable. # This will cause the tests to use that ROS_DOMAIN_ID. # From 0e134237cd94e50803757e8212df7d9f9c1f0e24 Mon Sep 17 00:00:00 2001 From: Pete Baughman Date: Thu, 13 Jun 2019 16:15:45 -0700 Subject: [PATCH 7/7] Fix python flake8 Signed-off-by: Pete Baughman --- ament_cmake_ros/cmake/run_test_isolated.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ament_cmake_ros/cmake/run_test_isolated.py b/ament_cmake_ros/cmake/run_test_isolated.py index 870f030..63a2e0f 100644 --- a/ament_cmake_ros/cmake/run_test_isolated.py +++ b/ament_cmake_ros/cmake/run_test_isolated.py @@ -14,8 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import sys import os +import sys import ament_cmake_test import domain_coordinator