Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable coverage information generation for pytest tests with CMake (#226
) * Enable coverage information generation for pytest tests with CMake Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Add comment about pytest-cov version requirement for --cov-branch Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Add --pytest-with-coverage to run_test.py and mention the env var Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Rename to AMENT_CMAKE_TEST_PYTEST_WITH_COVERAGE Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Fix missing quote Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Exclude gtests from pytest coverage explicitly They were excluded before, but only because gtests didn't use --env or --append-end. Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Append pytest-cov flags in ament_add_pytest_test() directly Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Fix ament_has_pytest_cov() Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Change default logic to avoid overriding CLI params Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Remove --cov-append pytest_cov option Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Simplify indentation Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Remove QUIET arg from ament_has_pytest_cov() Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Change ament_has_pytest_cov() to ament_get_pytest_cov_version() Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Do not return() if pytest_cov is not found in ament_add_pytest_test() Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Fix missing empty <options> argument Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Simplify pytest_cov version regex match Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Write pytest_cov results to test-specific directory Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> * Make sure to create test-specific pytest_cov directory Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
- Loading branch information