Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extending tests for timers to cover all clock types #358

Closed
wants to merge 1 commit into from

Conversation

tfoote
Copy link
Contributor

@tfoote tfoote commented Dec 13, 2018

This extends the tests to fail if #357 is not implemented and pass if it is present.

Without #357

72: [==========] Running 9 tests from 1 test case.
72: [----------] Global test environment set-up.
72: [----------] 9 tests from TestTimerFixture
72: [ RUN      ] TestTimerFixture.test_two_timers
72: [       OK ] TestTimerFixture.test_two_timers (12 ms)
72: [ RUN      ] TestTimerFixture.test_two_timers_ready_before_timeout
72: /home/tfoote/work/workspaces/timers/src/ros2/rcl/rcl/test/rcl/test_timer.cpp:161: Failure
72: Expected equality of these values:
72:   0
72:   ret
72:     Which is: 2
72: error not set
72: /home/tfoote/work/workspaces/timers/src/ros2/rcl/rcl/test/rcl/test_timer.cpp:174: Failure
72: Value of: is_ready
72:   Actual: true
72: Expected: false
72: /home/tfoote/work/workspaces/timers/src/ros2/rcl/rcl/test/rcl/test_timer.cpp:175: Failure
72: Expected equality of these values:
72:   1
72:   nonnull_timers
72:     Which is: '\x2' (2)
72: [  FAILED  ] TestTimerFixture.test_two_timers_ready_before_timeout (34 ms)
72: [ RUN      ] TestTimerFixture.test_timer_not_ready
72: [ERROR] [rcl]: Failed to remove timer jump callback
72: [       OK ] TestTimerFixture.test_timer_not_ready (6 ms)
72: [ RUN      ] TestTimerFixture.test_canceled_timer
72: [ERROR] [rcl]: Failed to remove timer jump callback
72: [       OK ] TestTimerFixture.test_canceled_timer (6 ms)
72: [ RUN      ] TestTimerFixture.test_rostime_time_until_next_call
72: [       OK ] TestTimerFixture.test_rostime_time_until_next_call (3 ms)
72: [ RUN      ] TestTimerFixture.test_system_time_to_ros_time
72: [       OK ] TestTimerFixture.test_system_time_to_ros_time (2 ms)
72: [ RUN      ] TestTimerFixture.test_ros_time_to_system_time
72: [       OK ] TestTimerFixture.test_ros_time_to_system_time (2 ms)
72: [ RUN      ] TestTimerFixture.test_ros_time_backwards_jump
72: [       OK ] TestTimerFixture.test_ros_time_backwards_jump (3 ms)
72: [ RUN      ] TestTimerFixture.test_ros_time_wakes_wait
72: [       OK ] TestTimerFixture.test_ros_time_wakes_wait (103 ms)
72: [----------] 9 tests from TestTimerFixture (171 ms total)
72: 
72: [----------] Global test environment tear-down
72: [==========] 9 tests from 1 test case ran. (171 ms total)
72: [  PASSED  ] 8 tests.
72: [  FAILED  ] 1 test, listed below:
72: [  FAILED  ] TestTimerFixture.test_two_timers_ready_before_timeout
72: 

With #357

72: Test command: /usr/bin/python3 "-u" "/home/tfoote/work/workspaces/timers/install/ament_cmake_test/share/ament_cmake_test/cmake/run_test.py" "/home/tfoote/work/workspaces/timers/build/rcl/test_results/rcl/test_timer__rmw_opensplice_cpp.gtest.xml" "--package-name" "rcl" "--output-file" "/home/tfoote/work/workspaces/timers/build/rcl/ament_cmake_gtest/test_timer__rmw_opensplice_cpp.txt" "--append-env" "LD_LIBRARY_PATH=/home/tfoote/work/workspaces/timers/build/rcl" "--command" "/home/tfoote/work/workspaces/timers/build/rcl/test/test_timer__rmw_opensplice_cpp" "--gtest_output=xml:/home/tfoote/work/workspaces/timers/build/rcl/test_results/rcl/test_timer__rmw_opensplice_cpp.gtest.xml"
72: Test timeout computed to be: 60
72: -- run_test.py: extra environment variables to append:
72:  - LD_LIBRARY_PATH+=/home/tfoote/work/workspaces/timers/build/rcl
72: -- run_test.py: invoking following command in '/home/tfoote/work/workspaces/timers/src/ros2/rcl/rcl':
72:  - /home/tfoote/work/workspaces/timers/build/rcl/test/test_timer__rmw_opensplice_cpp --gtest_output=xml:/home/tfoote/work/workspaces/timers/build/rcl/test_results/rcl/test_timer__rmw_opensplice_cpp.gtest.xml
72: Running main() from gtest_main.cc
72: [==========] Running 9 tests from 1 test case.
72: [----------] Global test environment set-up.
72: [----------] 9 tests from TestTimerFixture
72: [ RUN      ] TestTimerFixture.test_two_timers
72: [       OK ] TestTimerFixture.test_two_timers (12 ms)
72: [ RUN      ] TestTimerFixture.test_two_timers_ready_before_timeout
72: [ERROR] [rcl]: Failed to remove timer jump callback
72: [ERROR] [rcl]: Failed to remove timer jump callback
72: [       OK ] TestTimerFixture.test_two_timers_ready_before_timeout (18 ms)
72: [ RUN      ] TestTimerFixture.test_timer_not_ready
72: [ERROR] [rcl]: Failed to remove timer jump callback
72: [       OK ] TestTimerFixture.test_timer_not_ready (6 ms)
72: [ RUN      ] TestTimerFixture.test_canceled_timer
72: [ERROR] [rcl]: Failed to remove timer jump callback
72: [       OK ] TestTimerFixture.test_canceled_timer (5 ms)
72: [ RUN      ] TestTimerFixture.test_rostime_time_until_next_call
72: [       OK ] TestTimerFixture.test_rostime_time_until_next_call (3 ms)
72: [ RUN      ] TestTimerFixture.test_system_time_to_ros_time
72: [       OK ] TestTimerFixture.test_system_time_to_ros_time (2 ms)
72: [ RUN      ] TestTimerFixture.test_ros_time_to_system_time
72: [       OK ] TestTimerFixture.test_ros_time_to_system_time (1 ms)
72: [ RUN      ] TestTimerFixture.test_ros_time_backwards_jump
72: [       OK ] TestTimerFixture.test_ros_time_backwards_jump (2 ms)
72: [ RUN      ] TestTimerFixture.test_ros_time_wakes_wait
72: [       OK ] TestTimerFixture.test_ros_time_wakes_wait (103 ms)
72: [----------] 9 tests from TestTimerFixture (152 ms total)
72: 
72: [----------] Global test environment tear-down
72: [==========] 9 tests from 1 test case ran. (152 ms total)
72: [  PASSED  ] 9 tests.
72: -- run_test.py: return code 0

I'm putting this up for visibility. But it's not ready for a merge review as there are errors that appear when adding this that I think should be triaged to see if they should be asserted on in the unit tests.

@sloretz FYI

@tfoote tfoote added the in progress Actively being worked on (Kanban column) label Dec 13, 2018
@nuclearsandwich nuclearsandwich added backlog good first issue Good for newcomers and removed in progress Actively being worked on (Kanban column) labels Aug 1, 2019
@nuclearsandwich
Copy link
Member

Anyone who is looking for an entrypoint to ROS 2 involvement would gain a lot from updating this PR and expanding the test coverage.

@simutisernestas
Copy link

@nuclearsandwich is it still relevant ? I see that file has +500 lines since then, so I would guess not?

@clalancette
Copy link
Contributor

I'm pretty sure this has been superseded by a bunch of other work that has been done in the meantime. So I'm going to close this one out.

@clalancette clalancette closed this Nov 5, 2020
@wjwwood wjwwood deleted the RCL_ROS_TIME_tests branch April 22, 2021 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants