osrf / capabilities

Implements the concept of capabilities as part of the robots-in-concert system.
Other
8 stars 26 forks source link

Use catkin to build and run the testsuite #43

Closed esteve closed 10 years ago

esteve commented 10 years ago

Plain CMake works, but using our own tools (such as catkin) will help users understand the ROS workflow better.

esteve commented 10 years ago

This seems to work, there's actually a failing test so Travis reports that the build wasn't successful. I'll fix the test in a separate branch and get back to this one to make sure that the rest of the steps are correct.

esteve commented 10 years ago

@wjwwood I reverted my changes and integrated yours. I think we should use catkin_make, though, the more we dogfood on our own tools, the better IMHO. Let's see if this makes the testsuite fail too, it's rather strange that it fails randomly.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling e0e9768231600fa9c376dabbb8b5edaaf1a8ff15 on esteve:travis-robustness-43 into f065699a5da1161728c6c0b66d614dde667ccc5f on osrf:master.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling e0e9768231600fa9c376dabbb8b5edaaf1a8ff15 on esteve:travis-robustness-43 into f065699a5da1161728c6c0b66d614dde667ccc5f on osrf:master.

wjwwood commented 10 years ago

@esteve we can certainly use catkin_make, but it just automation of cmake ... && make, so sometimes I just use CMake and Make directly for a single package. This is especially useful for single packages because you don't have to setup a workspace, and setting up the workspace on travis is a bit wonky because you already have the source code checked out at the root of your travis instance. Using catkin_make would look like this:

cd ${BUILD_DIR} && catkin_make --source ${SRC_DIR}
cd ${BUILD_DIR} && catkin_make --source ${SRC_DIR} tests
cd ${BUILD_DIR} && catkin_make --source ${SRC_DIR} run_tests
catkin_test_results ${BUILD_DIR}
wjwwood commented 10 years ago

Or actually, it should have to be more like this, because you need the source to be in a folder which can have the CMakeLists.txt top-level CMake file for a catkin workspace:

cd ${BUILD_DIR} && mkdir src
ln -s ${SRC_DIR} ${BUILD_DIR}/src
cd ${BUILD_DIR} && catkin_make
cd ${BUILD_DIR} && catkin_make tests
cd ${BUILD_DIR} && catkin_make run_tests
catkin_test_results ${BUILD_DIR}
wjwwood commented 10 years ago

It is easy to forget that catkin packages are just CMake projects, and need no special tooling. We made catkin_make just to help automate the process and put in sane default settings for new users.

wjwwood commented 10 years ago

Oh I see that you basically had the same thing before you reverted. I should have looked at the commits first.

esteve commented 10 years ago

@wjwwood Yep, I had that code in the commits :-) Though it's strange that it now works, but not with catkin_make

esteve commented 10 years ago

@wjwwood Is there anything under the hood that catkin_make does that cmake doesn't? This build [1] finished, but the previous one [2] failed, despite both having the same tests and the same code.

1 - https://travis-ci.org/osrf/capabilities/builds/16662412

2 - https://travis-ci.org/osrf/capabilities/builds/16155234#L1321

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 08ca1c6bf4c6f4f4045b62d890a0de43e4d69796 on esteve:travis-robustness-43 into f065699a5da1161728c6c0b66d614dde667ccc5f on osrf:master.

wjwwood commented 10 years ago

I think I partially addressed this in https://github.com/osrf/capabilities/commit/c23d549dc64e7643069cd809745087cc5d09053b#diff-b67911656ef5d18c4ae36cb6741b7965R24

Looks like it needs to be rebased.

esteve commented 10 years ago

@wjwwood Just pushed a rebase and all the tests pass, I think it's safe to merge it.

wjwwood commented 10 years ago

For some reason coveralls is not commenting here, but coverage is 100%.