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

rosbuild_add_rostest does not work in catkin 0.5.68 #483

Closed
k-okada opened this issue Jul 20, 2013 · 8 comments
Closed

rosbuild_add_rostest does not work in catkin 0.5.68 #483

k-okada opened this issue Jul 20, 2013 · 8 comments

Comments

@k-okada
Copy link
Contributor

k-okada commented Jul 20, 2013

I'm still using rosbuild in groovy and use rosbuild_add_rostest.
This worked until catkin 0.5.67, but not worked on 0.5.68.

k-okada@kokada-t430s:~/ros/groovy/rtm-ros-robotics/rtmros_common/hoge$ cat CMakeLists.txt 
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
rosbuild_add_rostest(hoge.launch)
k-okada@kokada-t430s:~/ros/groovy/rtm-ros-robotics/rtmros_common/hoge$ cat hoge.launch 
<launch>
</launch>
k-okada@kokada-t430s:~/ros/groovy/rtm-ros-robotics/rtmros_common/hoge$ rm -fr build/; make test mkdir -p bin
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=/opt/ros/groovy/share/ros/core/rosbuild/rostoolchain.cmake  ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PythonInterp: /usr/bin/python (found version "2.7.3")
[rosbuild] Building package hoge
[rosbuild] Cached build flags older than manifests; calling rospack to get flags
-- Using CATKIN_DEVEL_PREFIX: /home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build/devel
-- Using CMAKE_PREFIX_PATH: /home/k-okada/ros/groovy/catkin/build/devel;/opt/ros/groovy
-- This workspace overlays: /home/k-okada/ros/groovy/catkin/build/devel;/opt/ros/groovy
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: on
-- Using CATKIN_TEST_RESULTS_DIR: /home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build/test_results
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.68
[rosbuild] Including /opt/ros/groovy/share/roslisp/rosbuild/roslisp.cmake
[rosbuild] Including /opt/ros/groovy/share/roscpp/rosbuild/roscpp.cmake
[rosbuild] Including /opt/ros/groovy/share/rospy/rosbuild/rospy.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build
cd build && make 
make[1]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[1]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
if cd build && make -k test; then make test-results; else make test-results && exit 1; fi
make[1]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Running tests...
Test project /home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build
No tests were found!!!
make[1]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[1]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[2]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[3]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target rostest_hoge.launch_result
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Checking for test results in /home/k-okada/ros/groovy/catkin/build/test_results/hoge/rostest-hoge.xml
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Built target rostest_hoge.launch_result
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target test-results-run
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Built target test-results-run
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target test-results
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
--------------------------------------------------------------------------------
[AGGREGATED TEST RESULTS SUMMARY]

ERRORS/FAILURES:
[hoge.rostest-hoge/test_ran][FAILURE]-------------------------------------------
Unable to find test results for rostest-hoge.xml, test did not run. Expected results in /home/k-okada/ros/groovy/catkin/build/test_results/hoge/rostest-hoge.xml
--------------------------------------------------------------------------------

PACKAGES: 
 * hoge


SUMMARY
 * RESULT: FAIL
 * TESTS: 1
 * ERRORS: 0
 * FAILURES: 1

make[4]: *** [CMakeFiles/test-results] Error 1
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[3]: *** [CMakeFiles/test-results.dir/all] Error 2
make[3]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[2]: *** [CMakeFiles/test-results.dir/rule] Error 2
make[2]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[1]: *** [test-results] Error 2
make[1]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make: *** [test] Error 2

k-okada@kokada-t430s:~/ros/groovy/rtm-ros-robotics/rtmros_common/hoge$ rm -fr build/; make test 
mkdir -p bin
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=/opt/ros/groovy/share/ros/core/rosbuild/rostoolchain.cmake  ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PythonInterp: /usr/bin/python (found version "2.7.3")
[rosbuild] Building package hoge
[rosbuild] Cached build flags older than manifests; calling rospack to get flags
-- Using CATKIN_DEVEL_PREFIX: /home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build/devel
-- Using CMAKE_PREFIX_PATH: /home/k-okada/ros/groovy/catkin/build/devel;/opt/ros/groovy
-- This workspace overlays: /home/k-okada/ros/groovy/catkin/build/devel;/opt/ros/groovy
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using CATKIN_TEST_RESULTS_DIR: /home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build/test_results
-- catkin 0.5.67
[rosbuild] Including /opt/ros/groovy/share/roslisp/rosbuild/roslisp.cmake
[rosbuild] Including /opt/ros/groovy/share/roscpp/rosbuild/roscpp.cmake
[rosbuild] Including /opt/ros/groovy/share/rospy/rosbuild/rospy.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build
cd build && make 
make[1]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[1]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
if cd build && make -k test; then make test-results; else make test-results && exit 1; fi
make[1]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[2]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[3]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target rosbuild_clean-test-results
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Built target rosbuild_clean-test-results
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target tests
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Built target tests
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target rostest_hoge.launch
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
... logging to /home/k-okada/.ros/log/rostest-kokada-t430s-25875.log
[ROSUNIT] Outputting test results to /home/k-okada/ros/groovy/catkin/build/test_results/hoge/rostest-hoge.xml
[ROSTEST]-----------------------------------------------------------------------


SUMMARY
 * RESULT: SUCCESS
 * TESTS: 0
 * ERRORS: 0
 * FAILURES: 0

rostest log file is in /home/k-okada/.ros/log/rostest-kokada-t430s-25875.log
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Built target rostest_hoge.launch
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target test
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Built target test
make[3]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[2]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[1]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[1]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[2]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[3]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target rostest_hoge.launch_result
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Checking for test results in /home/k-okada/ros/groovy/catkin/build/test_results/hoge/rostest-hoge.xml
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Built target rostest_hoge.launch_result
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target test-results-run
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Built target test-results-run
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target test-results
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
--------------------------------------------------------------------------------
[AGGREGATED TEST RESULTS SUMMARY]

PACKAGES: 
 * hoge


SUMMARY
 * RESULT: SUCCESS
 * TESTS: 0
 * ERRORS: 0
 * FAILURES: 0

make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Built target test-results
make[3]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[2]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[1]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
@dirk-thomas
Copy link
Member

Please retry with the latest available version of catkin (currently 0.5.70).

@k-okada
Copy link
Contributor Author

k-okada commented Jul 20, 2013

it fails on 0.5.70 too,

k-okada@kokada-t430s:~/ros/groovy/rtm-ros-robotics/rtmros_common/hoge$ rm -fr build/; make test 
mkdir -p bin
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=/opt/ros/groovy/share/ros/core/rosbuild/rostoolchain.cmake  ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PythonInterp: /usr/bin/python (found version "2.7.3")
[rosbuild] Building package hoge
[rosbuild] Cached build flags older than manifests; calling rospack to get flags
-- Using CATKIN_DEVEL_PREFIX: /home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build/devel
-- Using CMAKE_PREFIX_PATH: /home/k-okada/ros/groovy/catkin/build/devel;/opt/ros/groovy
-- This workspace overlays: /home/k-okada/ros/groovy/catkin/build/devel;/opt/ros/groovy
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Using CATKIN_TEST_RESULTS_DIR: /home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build/test_results
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.70
[rosbuild] Including /opt/ros/groovy/share/roslisp/rosbuild/roslisp.cmake
[rosbuild] Including /opt/ros/groovy/share/roscpp/rosbuild/roscpp.cmake
[rosbuild] Including /opt/ros/groovy/share/rospy/rosbuild/rospy.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build
cd build && make 
make[1]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[1]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
if cd build && make -k test; then make test-results; else make test-results && exit 1; fi
make[1]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Running tests...
Test project /home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build
No tests were found!!!
make[1]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[1]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[2]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[3]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target rostest_hoge.launch_result
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Checking for test results in /home/k-okada/ros/groovy/catkin/build/test_results/hoge/rostest-hoge.xml
Cannot find results, writing failure results to /home/k-okada/ros/groovy/catkin/build/test_results/hoge/rostest-hoge.xml
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Built target rostest_hoge.launch_result
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target test-results-run
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Built target test-results-run
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
Scanning dependencies of target test-results
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[4]: Entering directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
--------------------------------------------------------------------------------
[AGGREGATED TEST RESULTS SUMMARY]

ERRORS/FAILURES:
[hoge.rostest-hoge/test_ran][FAILURE]-------------------------------------------
Unable to find test results for rostest-hoge.xml, test did not run. Expected results in /home/k-okada/ros/groovy/catkin/build/test_results/hoge/rostest-hoge.xml
--------------------------------------------------------------------------------

PACKAGES: 
 * hoge


SUMMARY
 * RESULT: FAIL
 * TESTS: 1
 * ERRORS: 0
 * FAILURES: 1

make[4]: *** [CMakeFiles/test-results] Error 1
make[4]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[3]: *** [CMakeFiles/test-results.dir/all] Error 2
make[3]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[2]: *** [CMakeFiles/test-results.dir/rule] Error 2
make[2]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make[1]: *** [test-results] Error 2
make[1]: Leaving directory `/home/k-okada/ros/groovy/rtm-ros-robotics/rtmros_common/hoge/build'
make: *** [test] Error 2

@dirk-thomas
Copy link
Member

Have you done a clean rebuild (removing the CMakeCache file or wiped the build folder)?

@k-okada
Copy link
Contributor Author

k-okada commented Jul 20, 2013

yes, I clean up bulid folder before make test. I believe this removes cache files for cmake

hoge$ rm -fr build/; make test 

@dirk-thomas
Copy link
Member

I could not find the repository containing rtmros_common/hoge. Can you please provide the repository information in order to reproduce the problem?

@k-okada
Copy link
Contributor Author

k-okada commented Jul 20, 2013

the repository is created for quick test.

create empty package

k-okada@kokada-t430s:~/ros/groovy/rtm-ros-robotics/rtmros_common/$  roscreate-pkg  hoge

and add rosbuild_add_rostest(hoge.launch) in the CMakeLists.txt and create empty test launch file

k-okada@kokada-t430s:~/ros/groovy/rtm-ros-robotics/rtmros_common/hoge$ cat CMakeLists.txt 
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
rosbuild_add_rostest(hoge.launch)
k-okada@kokada-t430s:~/ros/groovy/rtm-ros-robotics/rtmros_common/hoge$ cat hoge.launch 
<launch>
</launch>

@tfoote
Copy link
Member

tfoote commented Jul 20, 2013

This looks like expected behavior. If you do not have a test program inside the launch file it will not create a test result, which is exactly what the error is.

@dirk-thomas
Copy link
Member

The "empty" launch file is not the actual problem - just an (probably bad) example. It also happens with other launch files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants