Commit aa27dff2 authored by Adrien Oliva's avatar Adrien Oliva

Handle lcov-cobertura to produce jenkins coverage report

parent 2f6764df
Pipeline #321 passed with stages
in 1 minute and 14 seconds
......@@ -53,6 +53,17 @@ genhtml-coverage-report:
endif # LCOV
if LCOV_COBERTURA
lcov-cobertura-report:
lcov_cobertura "coverage-report.info" -o "coverage-report.xml"
gcovr-coverage-report:
else # LCOV_COBERTURA
lcov-cobertura-report:
if GCOVR
gcovr-coverage-report:
......@@ -63,10 +74,12 @@ gcovr-coverage-report:
endif # GCOVR
endif # LCOV_COBERTURA
coverage-clean: lcov-coverage-clean
coverage-report: lcov-coverage-filter genhtml-coverage-report gcovr-coverage-report
coverage-report: lcov-coverage-filter genhtml-coverage-report lcov-cobertura-report gcovr-coverage-report
coverage: coverage-clean check coverage-report
......@@ -76,6 +89,7 @@ ALLPHONY += lcov-coverage-clean
ALLPHONY += lcov-coverage-filter
ALLPHONY += genhtml-coverage-report
ALLPHONY += gcovr-coverage-report
ALLPHONY += lcov-cobertura-report
else # COVERAGE
......
......@@ -152,6 +152,8 @@ AS_IF([test "x$have_cpputest" = "xno"],
# Check coverage tools
AC_CHECK_PROG([gcovr], [gcovr], [yes])
AM_CONDITIONAL(GCOVR, [test "x${gcovr}" = "xyes"])
AC_CHECK_PROG([lcov_cobertura], [lcov_cobertura], [yes])
AM_CONDITIONAL(LCOV_COBERTURA, [test "x${lcov_cobertura}" = "xyes"])
AC_CHECK_PROG([lcov], [lcov], [yes])
AM_CONDITIONAL(LCOV, [test "x${lcov}" = "xyes"])
AC_CHECK_PROG([genhtml], [genhtml], [yes])
......
......@@ -121,7 +121,7 @@ void fixtures::call(const char *function)
int count;
try {
count = m_actual_function_call_map.at(function);
} catch (std::out_of_range) {
} catch (std::out_of_range &) {
count = 0;
}
......@@ -192,7 +192,7 @@ void fixtures::check() const
int actual_count;
try {
actual_count = m_actual_function_call_map.at(it->first);
} catch (std::out_of_range) {
} catch (std::out_of_range &) {
if (expected_count != 0) {
std::stringstream ss;
ss << "No call to " << it->first;
......@@ -217,7 +217,7 @@ void fixtures::check() const
try {
actual_attribute = m_actual_pin_map.at(it->first);
} catch (std::out_of_range) {
} catch (std::out_of_range &) {
if (expected_attribute.mode != NOTSET) {
std::stringstream ss;
ss << "Pin " << static_cast<int>(it->first);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment