Package: pacemaker / 1.1.16-1~bpo8+1

Make-the-testing-infrastructure-optional.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org>
Date: Thu, 29 Sep 2016 10:47:49 +0200
Subject: Make the testing infrastructure optional

Upstream does not want this option, unfortunately.
https://github.com/ClusterLabs/pacemaker/pull/1149
---
 Makefile.am         | 2 ++
 configure.ac        | 5 +++++
 fencing/Makefile.am | 2 ++
 lrmd/Makefile.am    | 2 ++
 pengine/Makefile.am | 2 ++
 tools/Makefile.am   | 2 ++
 6 files changed, 15 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 3834afb..b2d4de8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,6 +33,7 @@ ACLOCAL_AMFLAGS  = -I m4
 licensedir              = $(docdir)/licenses/
 license_DATA            = $(wildcard licenses/*)
 
+if ENABLE_TESTS
 # Test components
 SUBDIRS	+= cts
 
@@ -44,6 +45,7 @@ test_DATA		= valgrind-pcmk.suppressions
 noinst_PROGRAMS = scratch
 nodist_scratch_SOURCES	= scratch.c
 scratch_LDADD	= $(top_builddir)/lib/common/libcrmcommon.la -lm
+endif
 
 scratch.c:
 	echo 'int main(void){}' >$@
diff --git a/configure.ac b/configure.ac
index 9b2df7a..97af60d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -333,6 +333,11 @@ AC_ARG_WITH(configdir,
     [ CONFIGDIR="$withval" ]
 )
 
+AC_ARG_ENABLE([tests],
+    [AS_HELP_STRING([--disable-tests],[don't build and install the testing components])],,
+    [enable_tests=yes])
+AM_CONDITIONAL([ENABLE_TESTS],[test "x$enable_tests" != xno])
+
 dnl ===============================================
 dnl General Processing
 dnl ===============================================
diff --git a/fencing/Makefile.am b/fencing/Makefile.am
index c53ead6..c680abe 100644
--- a/fencing/Makefile.am
+++ b/fencing/Makefile.am
@@ -18,8 +18,10 @@
 include $(top_srcdir)/Makefile.common
 
 ## binary progs
+if ENABLE_TESTS
 testdir			= $(datadir)/$(PACKAGE)/tests/fencing
 test_SCRIPTS		= regression.py
+endif
 
 halibdir	= $(CRM_DAEMON_DIR)
 halib_PROGRAMS	= stonithd stonith-test
diff --git a/lrmd/Makefile.am b/lrmd/Makefile.am
index 1d50e11..44a4fd9 100644
--- a/lrmd/Makefile.am
+++ b/lrmd/Makefile.am
@@ -19,11 +19,13 @@ include $(top_srcdir)/Makefile.common
 lrmdlibdir		= $(CRM_DAEMON_DIR)
 lrmdlib_PROGRAMS	= lrmd lrmd_internal_ctl
 
+if ENABLE_TESTS
 # Test components
 lrmdlib_PROGRAMS	+= lrmd_test
 
 testdir			= $(datadir)/$(PACKAGE)/tests/lrmd
 test_SCRIPTS		= regression.py
+endif
 
 initdir			= $(INITDIR)
 init_SCRIPTS		= pacemaker_remote
diff --git a/pengine/Makefile.am b/pengine/Makefile.am
index c81a737..d55e586 100644
--- a/pengine/Makefile.am
+++ b/pengine/Makefile.am
@@ -21,6 +21,7 @@ AM_CPPFLAGS	+= -I$(top_builddir) -I$(top_srcdir)
 
 halibdir	= $(CRM_DAEMON_DIR)
 
+if ENABLE_TESTS
 PE_TESTS	= $(wildcard test10/*.scores)
 
 testdir			= $(datadir)/$(PACKAGE)/tests/pengine
@@ -29,6 +30,7 @@ test_DATA		= regression.core.sh
 
 test10dir		= $(datadir)/$(PACKAGE)/tests/pengine/test10
 test10_DATA		= $(PE_TESTS) $(PE_TESTS:%.scores=%.xml) $(PE_TESTS:%.scores=%.exp) $(PE_TESTS:%.scores=%.dot) $(PE_TESTS:%.scores=%.summary) $(wildcard test10/*.stderr)
+endif
 
 beekhof:
 	echo $(shell ls -1 test10/*.xml)
diff --git a/tools/Makefile.am b/tools/Makefile.am
index b0a2aff..59e6627 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -38,10 +38,12 @@ EXTRA_DIST		= $(sbin_SCRIPTS)
 sbin_PROGRAMS		= crm_simulate crmadmin cibadmin crm_node crm_attribute crm_resource crm_verify \
 			 crm_shadow attrd_updater crm_diff crm_mon iso8601 crm_ticket crm_error
 
+if ENABLE_TESTS
 testdir			= $(datadir)/$(PACKAGE)/tests/cli
 test_SCRIPTS		= regression.sh
 test_DATA               = regression.dates.exp regression.tools.exp regression.acls.exp \
 			  regression.validity.exp
+endif
 
 if BUILD_HEARTBEAT_SUPPORT
 sbin_PROGRAMS           += crm_uuid