Skip to content

Commit 2d837bf

Browse files
committed
fix: unit test
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
1 parent 7f8d44a commit 2d837bf

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

perception/autoware_tensorrt_yolox/CMakeLists.txt

+6-3
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,12 @@ if(BUILD_TESTING)
169169
ament_lint_auto_find_test_dependencies()
170170

171171
find_package(ament_cmake_gtest REQUIRED)
172-
ament_auto_add_gtest(test_utils
173-
test/test_utils.cpp
174-
)
172+
173+
if(TRT_AVAIL AND CUDA_AVAIL AND CUDNN_AVAIL)
174+
ament_auto_add_gtest(test_utils
175+
test/test_utils.cpp
176+
)
177+
endif()
175178
endif()
176179

177180
ament_auto_package(INSTALL_TO_SHARE

perception/autoware_tensorrt_yolox/test/test_utils.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,9 @@ TEST(UtilsTest, runLengthEncoderDecoderTest)
7272
}
7373
EXPECT_EQ(image_eq, true);
7474
}
75+
76+
int main(int argc, char ** argv)
77+
{
78+
testing::InitGoogleTest(&argc, argv);
79+
return RUN_ALL_TESTS();
80+
}

0 commit comments

Comments
 (0)