Skip to content

Commit

Permalink
[CI] rename tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthou committed Nov 6, 2024
1 parent eaa2245 commit 42ec57c
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 39 deletions.
54 changes: 27 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,15 @@ if($ENV{ROS_VERSION} STREQUAL "1")
if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)

add_rostest_gtest(feature_deep_copy_test test/feature_deep_copy.test src/tests/CI/feature_deep_copy_test.cpp)
set_target_properties(feature_deep_copy_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)
target_include_directories(feature_deep_copy_test PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(feature_deep_copy_test ontologenius_lib ${catkin_LIBRARIES})

add_rostest_gtest(feature_multi_test test/feature_multi.test src/tests/CI/feature_multi_test.cpp)
target_include_directories(feature_multi_test PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(feature_multi_test ontologenius_lib ${catkin_LIBRARIES})

add_rostest_gtest(ontologenius_library_tester test/library.test src/tests/CI/library.cpp)
target_include_directories(ontologenius_library_tester PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(ontologenius_library_tester ontologenius_lib ${catkin_LIBRARIES})
Expand All @@ -623,40 +632,31 @@ if($ENV{ROS_VERSION} STREQUAL "1")
target_include_directories(ontologenius_propertiesInheritageIndex_tester PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(ontologenius_propertiesInheritageIndex_tester ontologenius_lib ${catkin_LIBRARIES})

add_rostest_gtest(ontologenius_multi_tester test/multi.test src/tests/CI/multi.cpp)
target_include_directories(ontologenius_multi_tester PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(ontologenius_multi_tester ontologenius_lib ${catkin_LIBRARIES})

add_rostest_gtest(ontologenius_cpy_test test/cpy.test src/tests/CI/copy_test.cpp)
set_target_properties(ontologenius_cpy_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)
target_include_directories(ontologenius_cpy_test PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(ontologenius_cpy_test ontologenius_lib ${catkin_LIBRARIES})

add_rostest_gtest(anonymous_class_test test/anonymous_class.test src/tests/CI/anonymous_class_test.cpp)
set_target_properties(anonymous_class_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)
target_include_directories(anonymous_class_test PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(anonymous_class_test ontologenius_lib ${catkin_LIBRARIES})

add_rostest_gtest(chain_test test/chain.test src/tests/CI/chain_test.cpp)
set_target_properties(chain_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)
target_include_directories(chain_test PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(chain_test ontologenius_lib ${catkin_LIBRARIES})

add_rostest_gtest(transitivity_test test/transitivity.test src/tests/CI/transitivity_test.cpp)
set_target_properties(transitivity_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)
target_include_directories(transitivity_test PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(transitivity_test ontologenius_lib ${catkin_LIBRARIES})
add_rostest_gtest(reasoning_anonymous_class_test test/reasoning_anonymous_class.test src/tests/CI/reasoning_anonymous_class_test.cpp)
set_target_properties(reasoning_anonymous_class_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)
target_include_directories(reasoning_anonymous_class_test PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(reasoning_anonymous_class_test ontologenius_lib ${catkin_LIBRARIES})

add_rostest_gtest(reasoning_chain_test test/reasoning_chain.test src/tests/CI/reasoning_chain_test.cpp)
set_target_properties(reasoning_chain_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)
target_include_directories(reasoning_chain_test PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(reasoning_chain_test ontologenius_lib ${catkin_LIBRARIES})

add_rostest_gtest(reasoning_transitivity_test test/reasoning_transitivity.test src/tests/CI/reasoning_transitivity_test.cpp)
set_target_properties(reasoning_transitivity_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)
target_include_directories(reasoning_transitivity_test PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(reasoning_transitivity_test ontologenius_lib ${catkin_LIBRARIES})
endif()

elseif($ENV{ROS_VERSION} STREQUAL "2")
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
find_package(ament_cmake_gtest REQUIRED)

ament_add_gtest(ontologenius_cpy_test src/tests/CI/copy_test.cpp TIMEOUT 10)
set_target_properties(ontologenius_cpy_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)
target_include_directories(ontologenius_cpy_test PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(ontologenius_cpy_test ontologenius_lib ${catkin_LIBRARIES})
ament_add_gtest(feature_deep_copy_test src/tests/CI/feature_deep_copy_test.cpp TIMEOUT 10)
set_target_properties(feature_deep_copy_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)
target_include_directories(feature_deep_copy_test PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(feature_deep_copy_test ontologenius_lib ${catkin_LIBRARIES})
endif()
endif()

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ TEST(multi_tests, differences)

int main(int argc, char** argv)
{
ros::init(argc, argv, "ontologenius_multi_tester");
ros::init(argc, argv, "ontologenius_feature_multi_test");

onto::OntologiesManipulator onto;
onto_ptr = &onto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ TEST(global_tests, same_as_one_of)

int main(int argc, char** argv)
{
ros::init(argc, argv, "ontologenius_anonymous_inference");
ros::init(argc, argv, "ontologenius_reasoning_anonymous_class_test");

onto::OntologyManipulator onto;
onto_ptr = &onto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ TEST(chain_tests, chain_deletion_inheritage)

int main(int argc, char** argv)
{
ros::init(argc, argv, "ontologenius_chain_inference");
ros::init(argc, argv, "ontologenius_reasoning_chain_test");

onto::OntologyManipulator onto;
onto_ptr = &onto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ TEST(chain_tests, transitivity_deletion_inheritage)

int main(int argc, char** argv)
{
ros::init(argc, argv, "ontologenius_transitivity_inference");
ros::init(argc, argv, "ontologenius_reasoning_transitivity_test");

onto::OntologyManipulator onto;
onto_ptr = &onto;
Expand Down
4 changes: 0 additions & 4 deletions test/cpy.test

This file was deleted.

4 changes: 4 additions & 0 deletions test/feature_deep_copy.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<launch>
<arg name='TESTDURATION' value='60' />
<test pkg="ontologenius" type="feature_deep_copy_test" test-name="feature_deep_copy_test" time-limit="$(arg TESTDURATION)" retry="0" />
</launch>
2 changes: 1 addition & 1 deletion test/multi.test → test/feature_multi.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<arg name="display" default="false"/>
</include>
<arg name='TESTDURATION' value='60' />
<test pkg="ontologenius" type="ontologenius_multi_tester" test-name="ontologenius_multi_tester" time-limit="$(arg TESTDURATION)" retry="0" />
<test pkg="ontologenius" type="feature_multi_test" test-name="feature_multi_test" time-limit="$(arg TESTDURATION)" retry="0" />
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<arg name="files" default="$(find ontologenius)/files/CI/test_anonymous_classes.owl"/>
</include>
<arg name='TESTDURATION' value='60' />
<test pkg="ontologenius" type="anonymous_class_test" test-name="anonymous_class_test" time-limit="$(arg TESTDURATION)" retry="0" />
<test pkg="ontologenius" type="reasoning_anonymous_class_test" test-name="reasoning_anonymous_class_test" time-limit="$(arg TESTDURATION)" retry="0" />
</launch>
2 changes: 1 addition & 1 deletion test/chain.test → test/reasoning_chain.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<arg name="files" default="$(find ontologenius)/files/CI/test_chain.owl"/>
</include>
<arg name='TESTDURATION' value='60' />
<test pkg="ontologenius" type="chain_test" test-name="chain_test" time-limit="$(arg TESTDURATION)" retry="0" />
<test pkg="ontologenius" type="reasoning_chain_test" test-name="reasoning_chain_test" time-limit="$(arg TESTDURATION)" retry="0" />
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<arg name="files" default="$(find ontologenius)/files/CI/test_transitivity.owl"/>
</include>
<arg name='TESTDURATION' value='60' />
<test pkg="ontologenius" type="transitivity_test" test-name="chain_test" time-limit="$(arg TESTDURATION)" retry="0" />
<test pkg="ontologenius" type="reasoning_transitivity_test" test-name="reasoning_transitivity_test" time-limit="$(arg TESTDURATION)" retry="0" />
</launch>

0 comments on commit 42ec57c

Please sign in to comment.