[Replicant] [libsamsung-ipc] [PATCH 2/4] Fix and simplify code coverage support

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Tue Aug 1 16:30:30 UTC 2023


This also changes the way code coverage support work: before it was
supposed to build libsamsung-ipc again from a tarball.

This simplification also enables code coverage testing with release
tarballs as before, to prevent infinite recursion of tests it only run
the tests when running from a git checkout.

This bug was introduced in the
commit 2a83232e195af5434bfd8aaa7ec163b806405305 ("Add code coverage
support").

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 Makefile.am | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 17c4ab2..1e9ba3d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -84,21 +84,13 @@ CODE_COVERAGE_DIR = lcov
 EXTRA_DIST += $(CODE_COVERAGE_DIR)
 
 build-code-coverage:
-	lcov --compat-libtool --directory . --capture --output-file libsamsung-ipc.info
+	lcov \
+		--capture \
+		--compat-libtool \
+		--directory . \
+		--output-file libsamsung-ipc.info
 	genhtml -o $(CODE_COVERAGE_DIR) libsamsung-ipc.info
 
-	BUILD_TMPDIR=$(mktemp -d) && \
-	cd ${BUILD_TMPDIR} && \
-	mkdir build destdir && \
-	tar xf $(srcdir)/libsamsung-ipc-$(VERSION).tar.xz && \
-	cd build && \
-	../libsamsung-ipc-$(VERSION)/configure \
-		--enable-code-coverage-tests \
-		--enable-debug \
-		--enable-samsung-ipc-device=fifo \
-	make -j3 check \
-	make install DESTDIR=$(realpath ../destdir)
-
 install-code-coverage: check
 	install -d $(DESTDIR)/$(datadir)/libsamsung-ipc/$(CODE_COVERAGE_DIR)/
 	find $(srcdir)/$(CODE_COVERAGE_DIR) -type f | \
-- 
2.41.0



More information about the Replicant mailing list