diff --git a/tracetools/CMakeLists.txt b/tracetools/CMakeLists.txt
index 328185e..f989644 100644
--- a/tracetools/CMakeLists.txt
+++ b/tracetools/CMakeLists.txt
@@ -91,4 +91,9 @@ else()
ament_export_libraries(${PROJECT_NAME})
endif()
+if(BUILD_TESTING)
+ find_package(ament_lint_auto REQUIRED)
+ ament_lint_auto_find_test_dependencies()
+endif()
+
ament_package()
diff --git a/tracetools/package.xml b/tracetools/package.xml
index 2d80723..6794a9e 100644
--- a/tracetools/package.xml
+++ b/tracetools/package.xml
@@ -13,6 +13,9 @@
+ ament_lint_auto
+ ament_lint_common
+
ament_cmake
diff --git a/tracetools_test/CMakeLists.txt b/tracetools_test/CMakeLists.txt
index 2c17289..02ab483 100644
--- a/tracetools_test/CMakeLists.txt
+++ b/tracetools_test/CMakeLists.txt
@@ -86,6 +86,9 @@ if(BUILD_TESTING)
DESTINATION lib/${PROJECT_NAME}
)
+ find_package(ament_lint_auto REQUIRED)
+ ament_lint_auto_find_test_dependencies()
+
find_package(ament_cmake_pytest REQUIRED)
# Run each test in its own pytest invocation
diff --git a/tracetools_test/package.xml b/tracetools_test/package.xml
index 884375e..008337e 100644
--- a/tracetools_test/package.xml
+++ b/tracetools_test/package.xml
@@ -20,6 +20,8 @@
std_srvs
ament_cmake_pytest
+ ament_lint_auto
+ ament_lint_common
launch_ros
python3-pytest
tracetools_trace