Skip to content

Comments

Rename and cleanup#103

Merged
drdanz merged 12 commits intorobotology:robottestingframework-2from
drdanz:rename_and_cleanup
Mar 27, 2019
Merged

Rename and cleanup#103
drdanz merged 12 commits intorobotology:robottestingframework-2from
drdanz:rename_and_cleanup

Conversation

@drdanz
Copy link
Member

@drdanz drdanz commented Mar 19, 2019

Sorry for the huge patch.

  • Rename RTF s discussed in Rename RTF #101 (see list at the bottom for changes)
  • Big CMake refactor, update modules from YCM, use targets instead of internal properties, move CMake files from 'conf' to 'cmake'.
  • Cleanup c++ files, and modernize (mostly using clang-tidy and clang-format)
  • Update and fix copyright headers (added license test).
  • Bump version patch.
  • Update and clean documentation
  • Drop support for "suit" instead of "suite"
  • Change COMPATIBILITY to SameMajorVersion
  • The following methods return std::string instead of const std::string
    • FixtureManager::getParam
    • PluginLoader::getLastError
    • TestCase::getParam
    • TestCase::getEnvironment
    • TestMessage::getMessage
    • TestMessage::getDetail
    • TestMessage::getSourceFileName

This is the list of the renames applied:

  • The CMake package was changed from RTF to RobotTestingFramework
    (e.g. find_package(RobotTestingFramework))
  • The CMake target namespace was changed from RTF to
    RobotTestingFramework. The names of the target are unchanged.
    (e.g. target_link_libraries(foo PRIVATE RobotTestingFramework::RTF)
  • The CMake variables were changed from RTF to RobotTestingFramework
    (e.g. RobotTestingFramework_INCLUDE_DIRS)
  • The CMake macros and functions were changed from rtf to
    robottestingframework
    (e.g. robottestingframework_add_suite)
  • The name of the libraries were changed from RTF* to
    robottestingframework*
    (e.g. librobottestingframework.so)
  • The testrunner executable was renamed robottestingframework-testrunner
  • The include path changed from rtf to robottestingframework
    (e.g. #include <robottestingframework/TestCase.h>)
  • The namespace changed from RTF to robottestingframework
    (e.g. robottestingframework::TestCase)
  • The preprocessor macros RTF_* were renamed ROBOTTESTINGFRAMEWORK_(e.g.ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("This is an error")`)
  • The module name for script languages was changed from RTF to
    robottestingframework or RobotTestingFramework (language dependent)
    (e.g. robottestingframework.setName("PythonTestCase"), and
    RobotTestingFramework::setName("RubyTestCase"))
  • The PREPARE_FIXTURE_PLUGIN macro was renamed
    ROBOTTESTINGFRAMEWORK_PREPARE_FIXTURE_PLUGIN
  • The PREPARE_PLUGIN macro was renamed ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN

@coveralls
Copy link

coveralls commented Mar 20, 2019

Coverage Status

Coverage decreased (-1.2%) to 63.696% when pulling 0308a9f on drdanz:rename_and_cleanup into a2c590a on robotology:robottestingframework-2.

@drdanz
Copy link
Member Author

drdanz commented Mar 22, 2019

@traversaro @pattacini The PR is ready to be merged, let me know what you think.

I was considering to add some switch like in Catch2 to enable/disable the ROBOTTESTINGFRAMEWORK_ prefix in preprocessor macros, what do you think?

@pattacini
Copy link
Member

You can proceed 👍

Are the switches meant to just help the transition or will they stay there forever?
I don't have a particular opinion on that.

Let me only clarify that I won't have time to go on now and update downstream code everywhere. This is a process I feel I have to put in the background or even to freeze until the very moment when we will need to use e.g. VVV school tutorials.

drdanz added 12 commits March 25, 2019 14:02
The RTF acronym is usually used for Rich Text Format, and it is causing
conflicts in packaging (Fixes robotology#101).

Big CMake refactor, update modules from YCM, use targets instead of
internal properties, move CMake files from 'conf' to 'cmake'.

Cleanup c++ files.

Update and fix copyright headers.

Bump version patch.

Change COMPATIBILITY to SameMajorVersion
@drdanz drdanz force-pushed the rename_and_cleanup branch from 20651c3 to 0308a9f Compare March 25, 2019 13:02
@drdanz drdanz changed the base branch from devel to robottestingframework-2 March 25, 2019 13:04
@drdanz
Copy link
Member Author

drdanz commented Mar 25, 2019

The switches could be there forever. This means that if the switch is enabled you can use ASSERT_ERROR(), otherwise you have to use ROBOTTESTINGFRAMEWORK_ASSERT_ERROR() (that is quite long to write). Anyway, we can add them later.

I'm merging this branch into the origin/robottestingframework-2 branch, and I'm creating the same branch on yarp and on icub-testing.

I made a script to update in batch all the vvv repos, I'm testing it right now.

@pattacini if you agree I will automatically create a branch origin/robottestingframework-2 branch in each repo in vvv-school, and we can just merge it after, I don't think it's worth creating a PR for each repo

@drdanz
Copy link
Member Author

drdanz commented Mar 25, 2019

Porting done:

https://github.com/robotology/yarp/tree/robottestingframework-2
https://github.com/robotology/icub-tests/tree/robottestingframework-2
https://github.com/vvv-school/assignment_closest-blob/tree/robottestingframework-2
https://github.com/vvv-school/assignment_codec/tree/robottestingframework-2
https://github.com/vvv-school/assignment_computed-torque/tree/robottestingframework-2
https://github.com/vvv-school/assignment_computed-torque-simulink/tree/robottestingframework-2
https://github.com/vvv-school/assignment_control-pid/tree/robottestingframework-2
https://github.com/vvv-school/assignment_event-orientation-filter/tree/robottestingframework-2
https://github.com/vvv-school/assignment_event-saccadic-suppression/tree/robottestingframework-2
https://github.com/vvv-school/assignment_event-saliency-map/tree/robottestingframework-2
https://github.com/vvv-school/assignment_event-spiking-attention/tree/robottestingframework-2
https://github.com/vvv-school/assignment_event-spiking-model/tree/robottestingframework-2
https://github.com/vvv-school/assignment_git/tree/robottestingframework-2
https://github.com/vvv-school/assignment_grasp-it/tree/robottestingframework-2
https://github.com/vvv-school/assignment_inverse-kinematics/tree/robottestingframework-2
https://github.com/vvv-school/assignment_make-it-roll/tree/robottestingframework-2
https://github.com/vvv-school/assignment_motor-control/tree/robottestingframework-2
https://github.com/vvv-school/assignment_producer-consumer/tree/robottestingframework-2
https://github.com/vvv-school/assignment_solve-maze/tree/robottestingframework-2
https://github.com/vvv-school/assignment_yarp-find-rgb/tree/robottestingframework-2
https://github.com/vvv-school/tutorial_cartesian-interface/tree/robottestingframework-2
https://github.com/vvv-school/tutorial_event-driven-flow/tree/robottestingframework-2
https://github.com/vvv-school/tutorial_event-handling/tree/robottestingframework-2
https://github.com/vvv-school/tutorial_find-wally/tree/robottestingframework-2
https://github.com/vvv-school/tutorial_gaze-interface/tree/robottestingframework-2
https://github.com/vvv-school/tutorial_RFModule/tree/robottestingframework-2
https://github.com/vvv-school/tutorial_yarp-opencv/tree/robottestingframework-2
https://github.com/vvv-school/vvv-school.github.io/tree/robottestingframework-2
https://github.com/vvv-school/vvv18-demo-team-green/tree/robottestingframework-2

@pattacini
Copy link
Member

Awesome! Thanks! 👍
Perhaps, also testrunner needs to be renamed somehow.

@pattacini
Copy link
Member

@drdanz what is the new name of testrunner? Is that robottestingframework-testrunner?
Just asking 'cause I didn't seem to find it out. Rather, I found RTF_testrunner.

Anyway, once specified, I'll change this line:
https://github.com/vvv-school/vvv-school.github.io/blob/robottestingframework-2/scripts/smoke-test-cpp.sh#L89

@drdanz
Copy link
Member Author

drdanz commented Mar 26, 2019

Perhaps, also testrunner needs to be renamed somehow.

Sorry, I forgot about that in the script

@drdanz what is the new name of testrunner? Is that robottestingframework-testrunner?
Just asking 'cause I didn't seem to find it out. Rather, I found RTF_testrunner.

The executable is robottestingframework-testrunner, the target is RobotTestingFramework::RTF_testrunner

@drdanz
Copy link
Member Author

drdanz commented Mar 26, 2019

I didn't change the target names, because

target_link_libraries(foo PRIVATE RobotTestingFramework::robottestingframework
                                  RobotTestingFramework::robottestingframework_dll

I left

target_link_libraries(foo PRIVATE RobotTestingFramework::RTF
                                  RobotTestingFramework::RTF_dll

seems a bit redundant to me... Let me know if you think we should change these as well

@pattacini
Copy link
Member

Thanks, updated in vvv-school/vvv-school.github.io@7b71014.

@drdanz drdanz merged commit 93b1d50 into robotology:robottestingframework-2 Mar 27, 2019
@drdanz drdanz deleted the rename_and_cleanup branch March 27, 2019 12:37
@drdanz
Copy link
Member Author

drdanz commented Mar 27, 2019

Merged into the robottestingframework-2 branch, I will merge it into devel when we are ready for the release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants