test passing vs make error

259 views
Skip to first unread message

Dennis Young

unread,
Apr 5, 2016, 1:55:02 PM4/5/16
to ROS SIG NG ROS
I am running "ament test" on an arm linux machine and getting all the tests to execute just having a make error on the last line.  See below:

Label Time Summary:
copyright = 2.75 sec
cppcheck = 2.18 sec
cpplint = 6.70 sec
gmock = 1.63 sec
lint_cmake = 2.16 sec
linter = 16.15 sec
uncrustify = 2.35 sec

Total Test time (real) = 17.82 sec

The following tests FAILED:
3 - copyright (Failed)
4 - cppcheck (Failed)
Errors while running CTest
make: *** [test] Error 8

I understand the failing tests, but I am not sure where the make: *** [test] Error 8 is coming from.  

In addition, if I run the same command with the same tests, on windows, I don't see that Error 8, I see just:

Label Time Summary: copyright = 0.44 sec (1 test) cppcheck = 0.36 sec (1 test) cpplint = 1.05 sec (1 test) gmock = 0.35 sec (2 tests) lint_cmake = 0.35 sec (1 test) linter = 2.65 sec (5 tests) uncrustify = 0.45 sec (1 test) Total Test time (real) = 3.21 sec The following tests FAILED: 3 - copyright (Failed) 4 - cppcheck (Failed) Errors while running CTest

In both platforms, "ament test_results" appears to function just fine. So my question is, do all the tests have to pass in order for the make error not to appear?

One thing to note, the only real error that I see is from the cppcheck, where it can't find the executable but it appears just like a failed test.

 Start 4: cppcheck

4: Test command: C:\ProgramData\chocolatey\bin\python.exe "-u" "C:/Platform/ros2/install/share/ament_cmake_test/cmake/run_test.py" "C:/mec/<Path>build/examples/test_results/examples/cppcheck.xunit.xml" "--output-file" "C:/mec/<Path>/build/examples/ament_cppcheck/cppcheck.txt" "--command" "C:/Platform/ros2/install/bin/ament_cppcheck.exe" "--xunit-file" "C:/mec/<Path>/build/examples/test_results/examples/cppcheck.xunit.xml"
4: Test timeout computed to be: 60
4: -- run_test.py: invoking following command in 'C:\<Path>\src\examples':
4:  - C:/Platform/ros2/install/bin/ament_cppcheck.exe --xunit-file C:/<Path>/build/examples/test_results/examples/cppcheck.xunit.xml
4: Could not find 'cppcheck' executable
4: -- run_test.py: return code 1
4: -- run_test.py: generate result file 'C:/<Path>/build/examples/test_results/examples/cppcheck.xunit.xml' with failed test
4: -- run_test.py: verify result file 'C:/<Path>/build/examples/test_results/examples/cppcheck.xunit.xml'
4/7 Test #4: cppcheck .........................***Failed    0.36 sec

Thanks,
Dennis Young

Dirk Thomas

unread,
Apr 5, 2016, 2:11:53 PM4/5/16
to ROS SIG NG ROS
Hi Dennis,

I assume your package is using CMake to be build? CTest has a non-zero return code if any of the tests fail. That is what make is reporting as "Error 8".

Regarding cppcheck: that test is failing since you don't have `cppcheck` installed. After installing it the test should either pass or produce warnings for your package.

Cheers,
- Dirk


--
You received this message because you are subscribed to the Google Groups "ROS SIG NG ROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-ng-ro...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dennis Young

unread,
Apr 5, 2016, 3:36:23 PM4/5/16
to ROS SIG NG ROS
Thanks Dirk.

I am using the ament system with cmake.

I guess I am wondering why in Linux it reports the error but in Windows it does not.  Regardless, sounds like I need to get the unit tests passing.

Thanks,
Dennis
Reply all
Reply to author
Forward
0 new messages