summaryrefslogtreecommitdiffstats
path: root/debian/patches/901_testsuite_gcov
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 12:50:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 12:50:01 +0000
commitdf4dbd3378e13e9f43c727c36339f078fe3093fe (patch)
tree9edf4a31373538bd239af5be10e00f5a449d3d0e /debian/patches/901_testsuite_gcov
parentAdding upstream version 1:4.8.1. (diff)
downloadshadow-3924f1174ba4b7d98534d9ebabb3af6ee96ac885.tar.xz
shadow-3924f1174ba4b7d98534d9ebabb3af6ee96ac885.zip
Adding debian version 1:4.8.1-1.debian/1%4.8.1-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/901_testsuite_gcov')
-rw-r--r--debian/patches/901_testsuite_gcov76
1 files changed, 76 insertions, 0 deletions
diff --git a/debian/patches/901_testsuite_gcov b/debian/patches/901_testsuite_gcov
new file mode 100644
index 0000000..717ccca
--- /dev/null
+++ b/debian/patches/901_testsuite_gcov
@@ -0,0 +1,76 @@
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -1,6 +1,8 @@
+
+ AUTOMAKE_OPTIONS = 1.0 foreign
+
++CFLAGS += -fprofile-arcs -ftest-coverage
++
+ DEFS =
+
+ noinst_LTLIBRARIES = libshadow.la
+--- a/libmisc/Makefile.am
++++ b/libmisc/Makefile.am
+@@ -1,6 +1,8 @@
+
+ EXTRA_DIST = .indent.pro xgetXXbyYY.c
+
++CFLAGS += -fprofile-arcs -ftest-coverage
++
+ INCLUDES = -I$(top_srcdir)/lib
+
+ noinst_LIBRARIES = libmisc.a
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -7,6 +7,8 @@
+ suidperms = 4755
+ sgidperms = 2755
+
++CFLAGS += -fprofile-arcs -ftest-coverage
++
+ INCLUDES = \
+ -I${top_srcdir}/lib \
+ -I$(top_srcdir)/libmisc
+--- a/debian/rules
++++ b/debian/rules
+@@ -40,6 +40,12 @@
+ endif
+ export CFLAGS
+
++clean:: clean_gcov
++
++clean_gcov:
++ find . -name "*.gcda" -delete
++ find . -name "*.gcno" -delete
++
+ # Add extras to the install process:
+ binary-install/login::
+ dh_installpam -p login
+--- a/lib/defines.h
++++ b/lib/defines.h
+@@ -174,23 +174,9 @@
+ trust the formatted time received from the unix domain (or worse,
+ UDP) socket. -MM */
+ /* Avoid translated PAM error messages: Set LC_ALL to "C".
++ * This is disabled for coverage testing
+ * --Nekral */
+-#define SYSLOG(x) \
+- do { \
+- char *old_locale = setlocale (LC_ALL, NULL); \
+- char *saved_locale = NULL; \
+- if (NULL != old_locale) { \
+- saved_locale = strdup (old_locale); \
+- } \
+- if (NULL != saved_locale) { \
+- (void) setlocale (LC_ALL, "C"); \
+- } \
+- syslog x ; \
+- if (NULL != saved_locale) { \
+- (void) setlocale (LC_ALL, saved_locale); \
+- free (saved_locale); \
+- } \
+- } while (false)
++#define SYSLOG(x) syslog x
+ #else /* !ENABLE_NLS */
+ #define SYSLOG(x) syslog x
+ #endif /* !ENABLE_NLS */