-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
100 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,5 @@ | ||
# SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT) | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
macro(add_yarpidl_rosmsg_test name wd file check_file) | ||
# Run the test | ||
add_test( | ||
NAME idl::rosmsg::${name}::run | ||
COMMAND yarpidl_rosmsg --verbose --no-ros true --out "${CMAKE_CURRENT_BINARY_DIR}/${name}" "${file}" | ||
WORKING_DIRECTORY "${wd}" | ||
) | ||
set_tests_properties(idl::rosmsg::${name}::run PROPERTIES FIXTURES_SETUP yarpidl_rosmsg_${name}_run) | ||
set_tests_properties(idl::rosmsg::${name}::run PROPERTIES LABELS "yarp::idl::rosmsg") | ||
|
||
# Check if the file was generated by trying to generate md5sum | ||
add_test( | ||
NAME idl::rosmsg::${name}::check | ||
COMMAND ${CMAKE_COMMAND} -E md5sum "${CMAKE_CURRENT_BINARY_DIR}/${name}/${check_file}" | ||
WORKING_DIRECTORY "${wd}" | ||
) | ||
set_tests_properties(idl::rosmsg::${name}::check PROPERTIES FIXTURES_REQUIRED yarpidl_rosmsg_${name}_run) | ||
set_tests_properties(idl::rosmsg::${name}::check PROPERTIES LABELS "yarp::idl::rosmsg") | ||
|
||
# Cleanup | ||
add_test( | ||
NAME idl::rosmsg::${name}::cleanup | ||
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/${name}" | ||
WORKING_DIRECTORY "${wd}" | ||
) | ||
set_tests_properties(idl::rosmsg::${name}::cleanup PROPERTIES FIXTURES_CLEANUP yarpidl_rosmsg_${name}_run) | ||
set_tests_properties(idl::rosmsg::${name}::cleanup PROPERTIES LABELS "yarp::idl::rosmsg") | ||
|
||
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}") | ||
endmacro() | ||
|
||
|
||
# Try generating the files using different combinations of current working | ||
# directory and path to the file | ||
add_yarpidl_rosmsg_test(test1 "${CMAKE_CURRENT_SOURCE_DIR}/demo" Demo.msg yarp/rosmsg/Demo.h) | ||
add_yarpidl_rosmsg_test(test2 "${CMAKE_CURRENT_SOURCE_DIR}" demo/Demo.msg yarp/rosmsg/demo/Demo.h) | ||
|
||
if(YARP_ENABLE_BROKEN_TESTS) | ||
add_yarpidl_rosmsg_test(test3 "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/demo/Demo.msg" yarp/rosmsg/demo/Demo.h) | ||
endif() | ||
|
||
# Try using the type name | ||
if(YARP_ENABLE_BROKEN_TESTS) | ||
add_yarpidl_rosmsg_test(test6 "${CMAKE_CURRENT_SOURCE_DIR}/demo" Demo yarp/rosmsg/.h) | ||
add_yarpidl_rosmsg_test(test7 "${CMAKE_CURRENT_SOURCE_DIR}" demo/Demo yarp/rosmsg/demo/Demo.h) | ||
endif() | ||
add_subdirectory(test1_catch) | ||
add_subdirectory(test2_generation) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT) | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
macro(add_yarpidl_rosmsg_test name wd file check_file) | ||
# Run the test | ||
add_test( | ||
NAME idl::rosmsg::${name}::run | ||
COMMAND yarpidl_rosmsg --verbose --no-ros true --out "${CMAKE_CURRENT_BINARY_DIR}/${name}" "${file}" | ||
WORKING_DIRECTORY "${wd}" | ||
) | ||
set_tests_properties(idl::rosmsg::${name}::run PROPERTIES FIXTURES_SETUP yarpidl_rosmsg_${name}_run) | ||
set_tests_properties(idl::rosmsg::${name}::run PROPERTIES LABELS "yarp::idl::rosmsg") | ||
|
||
# Check if the file was generated by trying to generate md5sum | ||
add_test( | ||
NAME idl::rosmsg::${name}::check | ||
COMMAND ${CMAKE_COMMAND} -E md5sum "${CMAKE_CURRENT_BINARY_DIR}/${name}/${check_file}" | ||
WORKING_DIRECTORY "${wd}" | ||
) | ||
set_tests_properties(idl::rosmsg::${name}::check PROPERTIES FIXTURES_REQUIRED yarpidl_rosmsg_${name}_run) | ||
set_tests_properties(idl::rosmsg::${name}::check PROPERTIES LABELS "yarp::idl::rosmsg") | ||
|
||
# Cleanup | ||
add_test( | ||
NAME idl::rosmsg::${name}::cleanup | ||
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/${name}" | ||
WORKING_DIRECTORY "${wd}" | ||
) | ||
set_tests_properties(idl::rosmsg::${name}::cleanup PROPERTIES FIXTURES_CLEANUP yarpidl_rosmsg_${name}_run) | ||
set_tests_properties(idl::rosmsg::${name}::cleanup PROPERTIES LABELS "yarp::idl::rosmsg") | ||
|
||
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}") | ||
endmacro() | ||
|
||
|
||
# Try generating the files using different combinations of current working | ||
# directory and path to the file | ||
add_yarpidl_rosmsg_test(test1 "${CMAKE_CURRENT_SOURCE_DIR}/demo" Demo.msg yarp/rosmsg/Demo.h) | ||
add_yarpidl_rosmsg_test(test2 "${CMAKE_CURRENT_SOURCE_DIR}" demo/Demo.msg yarp/rosmsg/demo/Demo.h) | ||
|
||
if(YARP_ENABLE_BROKEN_TESTS) | ||
add_yarpidl_rosmsg_test(test3 "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/demo/Demo.msg" yarp/rosmsg/demo/Demo.h) | ||
endif() | ||
|
||
# Try using the type name | ||
if(YARP_ENABLE_BROKEN_TESTS) | ||
add_yarpidl_rosmsg_test(test6 "${CMAKE_CURRENT_SOURCE_DIR}/demo" Demo yarp/rosmsg/.h) | ||
add_yarpidl_rosmsg_test(test7 "${CMAKE_CURRENT_SOURCE_DIR}" demo/Demo yarp/rosmsg/demo/Demo.h) | ||
endif() |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,5 @@ | ||
# SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT) | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
macro(add_yarpidl_thrift_test name wd file check_file) | ||
# FIXME directory is not created automatically by yarpidl_thrift | ||
add_test( | ||
NAME idl::thrift::${name}::setup | ||
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/${name}" | ||
) | ||
set_tests_properties(idl::thrift::${name}::setup PROPERTIES FIXTURES_SETUP yarpidl_thrift_${name}_setup) | ||
|
||
# Run the test | ||
add_test( | ||
NAME idl::thrift::${name}::run | ||
COMMAND yarpidl_thrift --out "${CMAKE_CURRENT_BINARY_DIR}/${name}" --gen yarp "${file}" | ||
WORKING_DIRECTORY "${wd}" | ||
) | ||
set_tests_properties(idl::thrift::${name}::run PROPERTIES FIXTURES_REQUIRED yarpidl_thrift_${name}_setup) | ||
set_tests_properties(idl::thrift::${name}::run PROPERTIES FIXTURES_SETUP yarpidl_thrift_${name}_run) | ||
set_tests_properties(idl::thrift::${name}::run PROPERTIES LABELS "yarp::idl::thrift") | ||
|
||
# Check if the file was generated by trying to generate md5sum | ||
add_test( | ||
NAME idl::thrift::${name}::check | ||
COMMAND ${CMAKE_COMMAND} -E md5sum "${CMAKE_CURRENT_BINARY_DIR}/${name}/${check_file}" | ||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/demo" | ||
) | ||
set_tests_properties(idl::thrift::${name}::check PROPERTIES FIXTURES_REQUIRED yarpidl_thrift_${name}_run) | ||
set_tests_properties(idl::thrift::${name}::check PROPERTIES LABELS "yarp::idl::thrift") | ||
|
||
# Cleanup | ||
add_test( | ||
NAME idl::thrift::${name}::cleanup | ||
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/${name}" | ||
) | ||
set_tests_properties(idl::thrift::${name}::cleanup PROPERTIES FIXTURES_CLEANUP "yarpidl_thrift_${name}_setup;yarpidl_thrift_${name}_run") | ||
set_tests_properties(idl::thrift::${name}::cleanup PROPERTIES LABELS "yarp::idl::thrift") | ||
|
||
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}") | ||
endmacro() | ||
|
||
|
||
# Try generating the files using different combinations of current working | ||
# directory and path to the file | ||
add_yarpidl_thrift_test(test1 "${CMAKE_CURRENT_SOURCE_DIR}/demo" demo.thrift Demo.h) | ||
add_yarpidl_thrift_test(test2 "${CMAKE_CURRENT_SOURCE_DIR}" demo/demo.thrift Demo.h) | ||
add_yarpidl_thrift_test(test3 "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/demo/demo.thrift" Demo.h) | ||
add_subdirectory(test1_catch) | ||
add_subdirectory(test2_generation) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT) | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
macro(add_yarpidl_thrift_test name wd file check_file) | ||
# FIXME directory is not created automatically by yarpidl_thrift | ||
add_test( | ||
NAME idl::thrift::${name}::setup | ||
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/${name}" | ||
) | ||
set_tests_properties(idl::thrift::${name}::setup PROPERTIES FIXTURES_SETUP yarpidl_thrift_${name}_setup) | ||
|
||
# Run the test | ||
add_test( | ||
NAME idl::thrift::${name}::run | ||
COMMAND yarpidl_thrift --out "${CMAKE_CURRENT_BINARY_DIR}/${name}" --gen yarp "${file}" | ||
WORKING_DIRECTORY "${wd}" | ||
) | ||
set_tests_properties(idl::thrift::${name}::run PROPERTIES FIXTURES_REQUIRED yarpidl_thrift_${name}_setup) | ||
set_tests_properties(idl::thrift::${name}::run PROPERTIES FIXTURES_SETUP yarpidl_thrift_${name}_run) | ||
set_tests_properties(idl::thrift::${name}::run PROPERTIES LABELS "yarp::idl::thrift") | ||
|
||
# Check if the file was generated by trying to generate md5sum | ||
add_test( | ||
NAME idl::thrift::${name}::check | ||
COMMAND ${CMAKE_COMMAND} -E md5sum "${CMAKE_CURRENT_BINARY_DIR}/${name}/${check_file}" | ||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/demo" | ||
) | ||
set_tests_properties(idl::thrift::${name}::check PROPERTIES FIXTURES_REQUIRED yarpidl_thrift_${name}_run) | ||
set_tests_properties(idl::thrift::${name}::check PROPERTIES LABELS "yarp::idl::thrift") | ||
|
||
# Cleanup | ||
add_test( | ||
NAME idl::thrift::${name}::cleanup | ||
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/${name}" | ||
) | ||
set_tests_properties(idl::thrift::${name}::cleanup PROPERTIES FIXTURES_CLEANUP "yarpidl_thrift_${name}_setup;yarpidl_thrift_${name}_run") | ||
set_tests_properties(idl::thrift::${name}::cleanup PROPERTIES LABELS "yarp::idl::thrift") | ||
|
||
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}") | ||
endmacro() | ||
|
||
|
||
# Try generating the files using different combinations of current working | ||
# directory and path to the file | ||
add_yarpidl_thrift_test(test1 "${CMAKE_CURRENT_SOURCE_DIR}/demo" demo.thrift Demo.h) | ||
add_yarpidl_thrift_test(test2 "${CMAKE_CURRENT_SOURCE_DIR}" demo/demo.thrift Demo.h) | ||
add_yarpidl_thrift_test(test3 "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/demo/demo.thrift" Demo.h) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters