From c0cb974a3daa1011c2e0a63372a810d0d9b4a564 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Fri, 3 Jan 2014 20:38:22 +0100 Subject: [PATCH 1/6] Use catkin_make to run tests --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 01c2fbc..ecb687b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ SRC_DIR=$(shell pwd) -BUILD_DIR=/tmp/$(shell basename ${SRC_DIR})_build +BUILD_DIR=/tmp/$(shell basename ${SRC_DIR})_ws define COVERAGERC [run] @@ -11,16 +11,16 @@ export COVERAGERC coverage: @echo "Using SRC_DIR: ${SRC_DIR}" @echo "Using BUILD_DIR: ${BUILD_DIR}" - mkdir -p ${BUILD_DIR} + mkdir -p ${BUILD_DIR}/src echo "$$COVERAGERC" > ${BUILD_DIR}/.coveragerc @echo "Cleaning out old coverage files" -rm ~/.ros/.coverage -rm ${BUILD_DIR}/.coverage -rm ./.coverage - cd ${BUILD_DIR} && cmake ${SRC_DIR} -DCMAKE_INSTALL_PREFIX=`pwd`/install - cd ${BUILD_DIR} && make - cd ${BUILD_DIR} && make tests - cd ${BUILD_DIR} && make run_tests + cp -av ${SRC_DIR} ${BUILD_DIR}/src + cd ${BUILD_DIR} && catkin_init_workspace + cd ${BUILD_DIR} && catkin_make + cd ${BUILD_DIR} && catkin_make test catkin_test_results ${BUILD_DIR} ls ${HOME}/.ros/.coverage cp ${HOME}/.ros/.coverage ./.coverage.1 From e0c3354029dea723d49f1bfb10ac9a91f1e9bc21 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Fri, 3 Jan 2014 20:45:32 +0100 Subject: [PATCH 2/6] Run catkin_init_workspace from src/ --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ecb687b..f2af30b 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ coverage: -rm ${BUILD_DIR}/.coverage -rm ./.coverage cp -av ${SRC_DIR} ${BUILD_DIR}/src - cd ${BUILD_DIR} && catkin_init_workspace + cd ${BUILD_DIR}/src && catkin_init_workspace cd ${BUILD_DIR} && catkin_make cd ${BUILD_DIR} && catkin_make test catkin_test_results ${BUILD_DIR} From 3d4f7566d69fdfcbe9c8f8071c0fa0a2263cfb25 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Thu, 9 Jan 2014 16:39:13 +0100 Subject: [PATCH 3/6] Revert catkin_make and use catkin_test_results to collect results from the testsuite --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f2af30b..9cf0703 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,10 @@ coverage: -rm ~/.ros/.coverage -rm ${BUILD_DIR}/.coverage -rm ./.coverage - cp -av ${SRC_DIR} ${BUILD_DIR}/src - cd ${BUILD_DIR}/src && catkin_init_workspace - cd ${BUILD_DIR} && catkin_make - cd ${BUILD_DIR} && catkin_make test + cd ${BUILD_DIR} && cmake ${SRC_DIR} -DCMAKE_INSTALL_PREFIX=`pwd`/install + cd ${BUILD_DIR} && make + cd ${BUILD_DIR} && make tests + cd ${BUILD_DIR} && make run_tests catkin_test_results ${BUILD_DIR} ls ${HOME}/.ros/.coverage cp ${HOME}/.ros/.coverage ./.coverage.1 From 01f49541a87dcc32beac5c180a1629857f57f5d9 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Thu, 9 Jan 2014 16:44:48 +0100 Subject: [PATCH 4/6] Revert to original directories --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9cf0703..01c2fbc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ SRC_DIR=$(shell pwd) -BUILD_DIR=/tmp/$(shell basename ${SRC_DIR})_ws +BUILD_DIR=/tmp/$(shell basename ${SRC_DIR})_build define COVERAGERC [run] @@ -11,7 +11,7 @@ export COVERAGERC coverage: @echo "Using SRC_DIR: ${SRC_DIR}" @echo "Using BUILD_DIR: ${BUILD_DIR}" - mkdir -p ${BUILD_DIR}/src + mkdir -p ${BUILD_DIR} echo "$$COVERAGERC" > ${BUILD_DIR}/.coveragerc @echo "Cleaning out old coverage files" -rm ~/.ros/.coverage From e19914e4c5f6967cba264fd98426ff2189980d17 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Mon, 13 Jan 2014 20:28:54 +0100 Subject: [PATCH 5/6] Use catkin_make to run the testsuite. Disable parallel jobs to avoid errors with simultaneous rostests. --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 01c2fbc..0ef19fa 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,11 @@ coverage: -rm ~/.ros/.coverage -rm ${BUILD_DIR}/.coverage -rm ./.coverage - cd ${BUILD_DIR} && cmake ${SRC_DIR} -DCMAKE_INSTALL_PREFIX=`pwd`/install - cd ${BUILD_DIR} && make - cd ${BUILD_DIR} && make tests - cd ${BUILD_DIR} && make run_tests + 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 -j1 run_tests catkin_test_results ${BUILD_DIR} ls ${HOME}/.ros/.coverage cp ${HOME}/.ros/.coverage ./.coverage.1 From cf60748c13dc529e699764ef386ff9e1ea6c1c60 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Tue, 14 Jan 2014 16:04:43 +0100 Subject: [PATCH 6/6] Use new path to the test results --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 173c3d2..afefaf8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ install: script: - source /opt/ros/hydro/setup.bash - make coverage - - catkin_test_results /tmp/capabilities_build/test_results + - catkin_test_results /tmp/capabilities_build/build/test_results notifications: email: false after_success: