diff --git a/packaging/nnstreamer-edge.spec b/packaging/nnstreamer-edge.spec index 641eb8e..89729c3 100644 --- a/packaging/nnstreamer-edge.spec +++ b/packaging/nnstreamer-edge.spec @@ -145,10 +145,15 @@ find . -name "*.gcno" -exec sh -c 'touch -a "${1%.gcno}.gcda"' _ {} \; # Remove gcda for meaningless file (CMake's autogenerated) find . -name "CMakeCCompilerId*.gcda" -delete find . -name "CMakeCXXCompilerId*.gcda" -delete -# Generate report +# Generate report and exclude test files. +# Set different lcov options for Tizen/lcov versions. +%if 0%{tizen_version_major} >= 9 lcov -t 'NNStreamer-edge unittest coverage' -o unittest.info -c -d . -b $(pwd) --no-external --ignore-errors mismatch -# Exclude test files. lcov -r unittest.info "*/tests/*" -o unittest-filtered.info --ignore-errors graph,unused +%else +lcov -t 'NNStreamer-edge unittest coverage' -o unittest.info -c -d . -b $(pwd) --no-external +lcov -r unittest.info "*/tests/*" -o unittest-filtered.info +%endif # tizen_version_major >= 9 # Visualize the report genhtml -o result unittest-filtered.info -t "NNStreamer-edge %{version}-%{release} ${VCS}" --ignore-errors source -p ${RPM_BUILD_DIR}