Skip to content

Commit

Permalink
Refs #22518: Add parser tests
Browse files Browse the repository at this point in the history
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
  • Loading branch information
cferreiragonz committed Jan 9, 2025
1 parent 51c837c commit e7c0a85
Show file tree
Hide file tree
Showing 4 changed files with 540 additions and 109 deletions.
38 changes: 38 additions & 0 deletions test/system/tools/fastdds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,44 @@ if(Python3_Interpreter_FOUND)

endforeach()

if (INSTALL_TOOLS AND NOT WIN32)
set(DISCOVERY_PARSER_TESTS
TestDiscoveryParser.test_parser_shutdown_when_on
TestDiscoveryParser.test_parser_shutdown_when_off
TestDiscoveryParser.test_parser_auto
TestDiscoveryParser.test_parser_auto_domain_arg
TestDiscoveryParser.test_parser_auto_domain_env
TestDiscoveryParser.test_parser_auto_ros_static_peers
TestDiscoveryParser.test_parser_start
TestDiscoveryParser.test_parser_start_ros_static_peers
TestDiscoveryParser.test_parser_start_with_arg
TestDiscoveryParser.test_parser_stop_when_off
TestDiscoveryParser.test_parser_stop_when_on
TestDiscoveryParser.test_parser_list_when_off
TestDiscoveryParser.test_parser_list_when_on
TestDiscoveryParser.test_parser_add_when_off
TestDiscoveryParser.test_parser_add_when_on
TestDiscoveryParser.test_parser_set_when_off
TestDiscoveryParser.test_parser_set_when_on
)

foreach(TEST ${DISCOVERY_PARSER_TESTS})
add_test(
NAME system.tools.fastdds.${TEST}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_discovery_parser.py ${TEST}
)
# Set environment
set(TEST_ENVIRONMENT
"PYTHON_VERSION=${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}"
"TOOL_PATH=${CMAKE_INSTALL_PREFIX}"
)
set_property(
TEST system.tools.fastdds.${TEST}
PROPERTY ENVIRONMENT ${TEST_ENVIRONMENT}
)
endforeach()
endif()

###############################################################################
# XML GENERAL validation
###############################################################################
Expand Down
Loading

0 comments on commit e7c0a85

Please sign in to comment.