diff --git a/action_tutorials/action_tutorials_py/package.xml b/action_tutorials/action_tutorials_py/package.xml index 5d7f88d59..b19a89110 100644 --- a/action_tutorials/action_tutorials_py/package.xml +++ b/action_tutorials/action_tutorials_py/package.xml @@ -19,6 +19,7 @@ ament_copyright ament_flake8 ament_pep257 + ament_xmllint python3-pytest diff --git a/action_tutorials/action_tutorials_py/test/test_xmllint.py b/action_tutorials/action_tutorials_py/test/test_xmllint.py new file mode 100644 index 000000000..08bf7fd78 --- /dev/null +++ b/action_tutorials/action_tutorials_py/test/test_xmllint.py @@ -0,0 +1,23 @@ +# 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. + +from ament_xmllint.main import main +import pytest + + +@pytest.mark.linter +@pytest.mark.xmllint +def test_xmllint() -> None: + rc = main(argv=[]) + assert rc == 0, 'Found errors' diff --git a/demo_nodes_py/package.xml b/demo_nodes_py/package.xml index 609f53c7e..830a29ac6 100644 --- a/demo_nodes_py/package.xml +++ b/demo_nodes_py/package.xml @@ -26,6 +26,7 @@ ament_copyright ament_flake8 ament_pep257 + ament_xmllint python3-pytest diff --git a/demo_nodes_py/test/test_xmllint.py b/demo_nodes_py/test/test_xmllint.py new file mode 100644 index 000000000..08bf7fd78 --- /dev/null +++ b/demo_nodes_py/test/test_xmllint.py @@ -0,0 +1,23 @@ +# 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. + +from ament_xmllint.main import main +import pytest + + +@pytest.mark.linter +@pytest.mark.xmllint +def test_xmllint() -> None: + rc = main(argv=[]) + assert rc == 0, 'Found errors' diff --git a/lifecycle_py/package.xml b/lifecycle_py/package.xml index cc113dd3d..5ec5c34e6 100644 --- a/lifecycle_py/package.xml +++ b/lifecycle_py/package.xml @@ -16,8 +16,10 @@ lifecycle_msgs std_msgs - ament_lint_auto - ament_lint_common + ament_copyright + ament_flake8 + ament_pep257 + ament_xmllint lifecycle ros_testing diff --git a/lifecycle_py/test/test_xmllint.py b/lifecycle_py/test/test_xmllint.py new file mode 100644 index 000000000..08bf7fd78 --- /dev/null +++ b/lifecycle_py/test/test_xmllint.py @@ -0,0 +1,23 @@ +# 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. + +from ament_xmllint.main import main +import pytest + + +@pytest.mark.linter +@pytest.mark.xmllint +def test_xmllint() -> None: + rc = main(argv=[]) + assert rc == 0, 'Found errors' diff --git a/quality_of_service_demo/rclpy/package.xml b/quality_of_service_demo/rclpy/package.xml index 20b312207..6494c25ae 100644 --- a/quality_of_service_demo/rclpy/package.xml +++ b/quality_of_service_demo/rclpy/package.xml @@ -21,6 +21,7 @@ ament_copyright ament_flake8 ament_pep257 + ament_xmllint python3-pytest diff --git a/quality_of_service_demo/rclpy/test/test_xmllint.py b/quality_of_service_demo/rclpy/test/test_xmllint.py new file mode 100644 index 000000000..08bf7fd78 --- /dev/null +++ b/quality_of_service_demo/rclpy/test/test_xmllint.py @@ -0,0 +1,23 @@ +# 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. + +from ament_xmllint.main import main +import pytest + + +@pytest.mark.linter +@pytest.mark.xmllint +def test_xmllint() -> None: + rc = main(argv=[]) + assert rc == 0, 'Found errors' diff --git a/topic_monitor/package.xml b/topic_monitor/package.xml index e1ff35ede..6271a38a5 100644 --- a/topic_monitor/package.xml +++ b/topic_monitor/package.xml @@ -23,6 +23,7 @@ ament_flake8 ament_pep257 + ament_xmllint python3-pytest diff --git a/topic_monitor/test/test_xmllint.py b/topic_monitor/test/test_xmllint.py new file mode 100644 index 000000000..08bf7fd78 --- /dev/null +++ b/topic_monitor/test/test_xmllint.py @@ -0,0 +1,23 @@ +# 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. + +from ament_xmllint.main import main +import pytest + + +@pytest.mark.linter +@pytest.mark.xmllint +def test_xmllint() -> None: + rc = main(argv=[]) + assert rc == 0, 'Found errors'