diff --git a/common/autoware_node/CMakeLists.txt b/common/autoware_node/CMakeLists.txt index a530c503..27d283e1 100644 --- a/common/autoware_node/CMakeLists.txt +++ b/common/autoware_node/CMakeLists.txt @@ -10,14 +10,9 @@ ament_auto_add_library(${PROJECT_NAME} src/autoware_node.cpp) if (BUILD_TESTING) find_package(ament_lint_auto REQUIRED) - # the following line skips the linter which checks for copyrights - # comment the line when a copyright and license is added to all source files - set(ament_cmake_copyright_FOUND TRUE) - # the following line skips cpplint (only works in a git repo) - # comment the line when this package is in a git repo and when - # a copyright and license is added to all source files - set(ament_cmake_cpplint_FOUND TRUE) ament_lint_auto_find_test_dependencies() + ament_add_ros_isolated_gtest(test_autoware_node test/test_autoware_node.cpp) + target_link_libraries(test_autoware_node ${PROJECT_NAME}) endif () ament_auto_package() diff --git a/common/autoware_node/include/autoware_node/autoware_node.hpp b/common/autoware_node/include/autoware_node/autoware_node.hpp index a9e5e3d6..d3591516 100644 --- a/common/autoware_node/include/autoware_node/autoware_node.hpp +++ b/common/autoware_node/include/autoware_node/autoware_node.hpp @@ -1,3 +1,18 @@ +// Copyright 2022 The Autoware Contributors +// SPDX-License-Identifier: Apache-2.0 +// +// 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 AUTOWARE_NODE__AUTOWARE_NODE_HPP_ #define AUTOWARE_NODE__AUTOWARE_NODE_HPP_ diff --git a/common/autoware_node/include/autoware_node/visibility_control.hpp b/common/autoware_node/include/autoware_node/visibility_control.hpp index 5db1da99..191d9557 100644 --- a/common/autoware_node/include/autoware_node/visibility_control.hpp +++ b/common/autoware_node/include/autoware_node/visibility_control.hpp @@ -1,3 +1,18 @@ +// Copyright 2022 The Autoware Contributors +// SPDX-License-Identifier: Apache-2.0 +// +// 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 AUTOWARE_NODE__VISIBILITY_CONTROL_HPP_ #define AUTOWARE_NODE__VISIBILITY_CONTROL_HPP_ diff --git a/common/autoware_node/package.xml b/common/autoware_node/package.xml index 5482d609..c8c686ba 100644 --- a/common/autoware_node/package.xml +++ b/common/autoware_node/package.xml @@ -12,6 +12,7 @@ rclcpp_lifecycle + ament_cmake_ros ament_lint_auto ament_lint_common diff --git a/common/autoware_node/src/autoware_node.cpp b/common/autoware_node/src/autoware_node.cpp index 408d6237..6d3d83d6 100644 --- a/common/autoware_node/src/autoware_node.cpp +++ b/common/autoware_node/src/autoware_node.cpp @@ -1,3 +1,18 @@ +// Copyright 2022 The Autoware Contributors +// SPDX-License-Identifier: Apache-2.0 +// +// 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. + #include "autoware_node/autoware_node.hpp" namespace autoware_node diff --git a/common/autoware_node/test/test_autoware_node.cpp b/common/autoware_node/test/test_autoware_node.cpp new file mode 100644 index 00000000..d910f600 --- /dev/null +++ b/common/autoware_node/test/test_autoware_node.cpp @@ -0,0 +1,16 @@ +// Copyright 2022 The Autoware Contributors +// SPDX-License-Identifier: Apache-2.0 +// +// 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. + +#include "test_autoware_node.hpp" diff --git a/common/autoware_node/test/test_autoware_node.hpp b/common/autoware_node/test/test_autoware_node.hpp new file mode 100644 index 00000000..df374327 --- /dev/null +++ b/common/autoware_node/test/test_autoware_node.hpp @@ -0,0 +1,23 @@ +// Copyright 2022 The Autoware Contributors +// SPDX-License-Identifier: Apache-2.0 +// +// 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 TEST_AUTOWARE_NODE_HPP_ +#define TEST_AUTOWARE_NODE_HPP_ + +class test_autoware_node +{ +}; + +#endif // TEST_AUTOWARE_NODE_HPP_