# TODO: the --no-external option is removed to include machine-learning-agent related source files.
# Restore this option when there is proper way to include those source files.
pushd %{builddir}
-lcov -t 'ML-Agent unittest coverage' -o unittest.info -c -d . -b $(pwd)
+lcov -t 'ML-Agent unittest coverage' -o unittest.info -c -d . -b $(pwd) --ignore-errors mismatch
# Exclude generated files (e.g., Orc, Protobuf) and device-dependent files.
# Exclude files which are generated by gdbus-codegen and external files in /usr/*.
-lcov -r unittest.info "*/tests/*" "*/meson*/*" "*/*@sha/*" "*/*.so.p/*" "*/*tizen*" "*/*-dbus.c" "/usr/*" -o unittest-filtered.info
+lcov -r unittest.info "*/tests/*" "*/meson*/*" "*/*@sha/*" "*/*.so.p/*" "*/*tizen*" "*/*-dbus.c" "/usr/*" -o unittest-filtered.info --ignore-errors graph,unused
# Visualize the report
genhtml -o result unittest-filtered.info -t "ML-Agent %{version}-%{release} ${VCS}" --ignore-errors source -p ${RPM_BUILD_DIR}