diff --git a/Makefile b/Makefile
index 5481ad0..b965f11 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,8 @@ include = *src/capabilities*
endef
export COVERAGERC
+COVERAGE_BIN=${SRC_DIR}/test/run_coverage
+
coverage:
@echo "Using SRC_DIR: ${SRC_DIR}"
@echo "Using BUILD_DIR: ${BUILD_DIR}"
@@ -28,5 +30,5 @@ coverage:
cd ${BUILD_DIR} && ${BUILD_DIR}/devel/env.sh nosetests --where=${SRC_DIR}/test/unit --with-coverage -s
ls ${BUILD_DIR}/.coverage
cp ${BUILD_DIR}/.coverage ./.coverage.2
- coverage combine
- coverage report --include='*capabilities/src*' -m
+ ${COVERAGE_BIN} combine
+ ${COVERAGE_BIN} report --include='*capabilities/src*' -m
diff --git a/test/rostest/test_client/test_client_module.test b/test/rostest/test_client/test_client_module.test
index 829cf77..b9853fa 100644
--- a/test/rostest/test_client/test_client_module.test
+++ b/test/rostest/test_client/test_client_module.test
@@ -3,5 +3,5 @@
-
+
diff --git a/test/rostest/test_launch_manager/test_launch_manager.test b/test/rostest/test_launch_manager/test_launch_manager.test
index 3d20062..5af93a3 100644
--- a/test/rostest/test_launch_manager/test_launch_manager.test
+++ b/test/rostest/test_launch_manager/test_launch_manager.test
@@ -1,4 +1,4 @@
+ launch-prefix="$(find capabilities)/test/run_coverage run --append " time-limit="360.0" />
diff --git a/test/rostest/test_server/test_client.py b/test/rostest/test_server/test_client.py
index 8bc5f4b..1ff9192 100755
--- a/test/rostest/test_server/test_client.py
+++ b/test/rostest/test_server/test_client.py
@@ -31,7 +31,7 @@ def wait_for_result_to_happen(expected, initial_result, tries=10, sleep_period=1
class Test(unittest.TestCase):
def test_use_and_free_capability(self):
- wait_for_capability_server(3)
+ assert wait_for_capability_server(10)
c = CapabilitiesClient()
c.wait_for_services(timeout=3.0)
# Give invalid bond id to use_capability
diff --git a/test/rostest/test_server/test_client.test b/test/rostest/test_server/test_client.test
index e8d3ed2..2bf4466 100644
--- a/test/rostest/test_server/test_client.test
+++ b/test/rostest/test_server/test_client.test
@@ -1,6 +1,6 @@
+ launch-prefix="$(find capabilities)/test/run_coverage run --append ">
diff --git a/test/rostest/test_server/test_default_provider.py b/test/rostest/test_server/test_default_provider.py
index 26adad2..73fdb8b 100755
--- a/test/rostest/test_server/test_default_provider.py
+++ b/test/rostest/test_server/test_default_provider.py
@@ -16,7 +16,7 @@
class Test(unittest.TestCase):
def test_default_provider(self):
- wait_for_capability_server(None)
+ assert wait_for_capability_server(10)
call_service('/capability_server/start_capability', 'no_default_provider_pkg/Minimal', '')
rospy.sleep(1) # Wait for the system to settle
resp = call_service('/capability_server/get_running_capabilities')
diff --git a/test/rostest/test_server/test_default_provider.test b/test/rostest/test_server/test_default_provider.test
index c731b87..af1d081 100644
--- a/test/rostest/test_server/test_default_provider.test
+++ b/test/rostest/test_server/test_default_provider.test
@@ -1,6 +1,6 @@
+ launch-prefix="$(find capabilities)/test/run_coverage run --append ">
diff --git a/test/rostest/test_server/test_dependent_capabilities.py b/test/rostest/test_server/test_dependent_capabilities.py
index 661714b..7fedd79 100755
--- a/test/rostest/test_server/test_dependent_capabilities.py
+++ b/test/rostest/test_server/test_dependent_capabilities.py
@@ -18,7 +18,7 @@
class Test(unittest.TestCase):
def test_start_stop_dependent_capabilities(self):
- wait_for_capability_server(3)
+ wait_for_capability_server(10)
call_service('/capability_server/start_capability',
'navigation_capability/Navigation',
'navigation_capability/faux_navigation')
@@ -51,7 +51,7 @@ def test_stop_base_capability(self):
"""
Stopping a base capability should stop all dependent capabilities too.
"""
- wait_for_capability_server(3)
+ wait_for_capability_server(10)
call_service('/capability_server/start_capability',
'navigation_capability/Navigation',
'navigation_capability/faux_navigation')
diff --git a/test/rostest/test_server/test_dependent_capabilities.test b/test/rostest/test_server/test_dependent_capabilities.test
index bf1330d..7ebed50 100644
--- a/test/rostest/test_server/test_dependent_capabilities.test
+++ b/test/rostest/test_server/test_dependent_capabilities.test
@@ -1,6 +1,6 @@
+ launch-prefix="$(find capabilities)/test/run_coverage run --append ">
diff --git a/test/rostest/test_server/test_invalid_specs.test b/test/rostest/test_server/test_invalid_specs.test
index afcb389..5beb180 100644
--- a/test/rostest/test_server/test_invalid_specs.test
+++ b/test/rostest/test_server/test_invalid_specs.test
@@ -1,4 +1,4 @@
+ launch-prefix="$(find capabilities)/test/run_coverage run --append " />
diff --git a/test/rostest/test_server/test_package_white_black_lists.test b/test/rostest/test_server/test_package_white_black_lists.test
index 69cd57b..4835876 100644
--- a/test/rostest/test_server/test_package_white_black_lists.test
+++ b/test/rostest/test_server/test_package_white_black_lists.test
@@ -1,6 +1,6 @@
+ launch-prefix="$(find capabilities)/test/run_coverage run --append ">
diff --git a/test/rostest/test_server/test_remapping.test b/test/rostest/test_server/test_remapping.test
index 896a865..99d56ab 100644
--- a/test/rostest/test_server/test_remapping.test
+++ b/test/rostest/test_server/test_remapping.test
@@ -1,6 +1,6 @@
+ launch-prefix="$(find capabilities)/test/run_coverage run --append ">
diff --git a/test/rostest/test_server/test_ros_services.test b/test/rostest/test_server/test_ros_services.test
index 2e2c996..1acc4fe 100644
--- a/test/rostest/test_server/test_ros_services.test
+++ b/test/rostest/test_server/test_ros_services.test
@@ -1,6 +1,6 @@
+ launch-prefix="$(find capabilities)/test/run_coverage run --append ">
diff --git a/test/rostest/test_server/test_white_black_lists.test b/test/rostest/test_server/test_white_black_lists.test
index c068b89..9f060c2 100644
--- a/test/rostest/test_server/test_white_black_lists.test
+++ b/test/rostest/test_server/test_white_black_lists.test
@@ -1,6 +1,6 @@
+ launch-prefix="$(find capabilities)/test/run_coverage run --append ">
diff --git a/test/rostest/test_service_discovery/test_spec_index_from_service.test b/test/rostest/test_service_discovery/test_spec_index_from_service.test
index 4862391..37bb345 100644
--- a/test/rostest/test_service_discovery/test_spec_index_from_service.test
+++ b/test/rostest/test_service_discovery/test_spec_index_from_service.test
@@ -3,5 +3,5 @@
-
+
diff --git a/test/run_coverage b/test/run_coverage
new file mode 100755
index 0000000..30fa753
--- /dev/null
+++ b/test/run_coverage
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+
+import sys
+from pkg_resources import load_entry_point
+
+if __name__ == '__main__':
+ sys.exit(load_entry_point('coverage', 'console_scripts', 'coverage')())