[spec] Fix lcov options for different Tizen/lcov versions accepted/tizen_8.0_unified tizen_8.0 accepted/tizen/7.0/unified/20240509.012438 accepted/tizen/8.0/unified/20240507.165648 accepted/tizen/unified/20240503.115758 accepted/tizen/unified/dev/20240620.010950 accepted/tizen/unified/toolchain/20240508.012357 accepted/tizen/unified/x/20240507.050944 accepted/tizen/unified/x/asan/20240625.091934
authorYongjoo Ahn <yongjoo1.ahn@samsung.com>
Tue, 30 Apr 2024 06:43:32 +0000 (15:43 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Tue, 30 Apr 2024 09:08:02 +0000 (18:08 +0900)
- Set proper lcov options w.r.t. Tizen/lcov versions.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
packaging/nnstreamer-edge.spec

index 641eb8e44419151a7964d72f5caeb545884a3dff..89729c3ddb7b982a40056c21e07420a729e5571e 100644 (file)
@@ -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}