1# Makefile.in for tests
2# $OpenLDAP$
3## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4##
5## Copyright 1998-2021 The OpenLDAP Foundation.
6## All rights reserved.
7##
8## Redistribution and use in source and binary forms, with or without
9## modification, are permitted only as authorized by the OpenLDAP
10## Public License.
11##
12## A copy of this license is available in the file LICENSE in the
13## top-level directory of the distribution or, alternatively, at
14## <http://www.OpenLDAP.org/license.html>.
15
16RUN=./run
17SUBDIRS= progs
18
19BUILD_MDB=@BUILD_MDB@
20BUILD_SQL=@BUILD_SQL@
21BUILD_SLAPD=@BUILD_SLAPD@
22BUILD_BALANCER=@BUILD_BALANCER@
23
24# test primary backends (default)
25test tests:
26	@$(MAKE) mdb
27	@$(MAKE) lloadd
28
29# test all backends
30alltests: tests
31	@$(MAKE) sql
32	@$(MAKE) ldif
33
34mdb test-mdb:	mdb-$(BUILD_MDB)
35mdb-no:
36	@echo "run configure with --enable-mdb to run MDB tests"
37
38mdb-yes mdb-mod: FORCE
39	@echo "Initiating LDAP tests for MDB..."
40	@$(RUN) -b mdb all
41
42sql test-sql:	sql-$(BUILD_SQL)
43sql-no:
44	@echo "run configure with --enable-sql to run SQL tests"
45
46sql-yes sql-mod:	FORCE
47	@echo "Initiating LDAP tests for SQL..."
48	@$(RUN) -b sql sql-all
49
50ldif test-ldif: FORCE
51	@echo "Initiating LDAP tests for LDIF..."
52	@$(RUN) -b ldif all
53
54lloadd test-lloadd: lloadd-$(BUILD_BALANCER)
55lloadd-no:
56	@echo "run configure with --enable-balancer to run the Load Balancer tests"
57
58lloadd-yes lloadd-mod: lloadd-slapd-$(BUILD_SLAPD)
59
60lloadd-slapd-no:
61	@echo "run configure with --enable-slapd to run the Load Balancer tests"
62
63lloadd-slapd-yes: FORCE
64	@echo "Initiating LDAP tests for the Load Balancer..."
65	@$(RUN) lloadd-all
66
67regressions:	FORCE
68	@echo "Testing (available) ITS regressions"
69	@$(MAKE) mdb-its
70
71its: regressions
72
73mdb-its: mdb-its-$(BUILD_MDB)
74mdb-its-no:
75	@echo "run configure with --enable-mdb to run MDB ITS regressions"
76
77mdb-its-yes mdb-its-mod: FORCE
78	@$(RUN) -b mdb its-all
79
80clean-local:	FORCE
81	-$(RM) -r testrun configpw configpw.conf *leak *gmon *core
82
83veryclean-local: FORCE
84	@-$(RM) run testdata schema ucdata
85
86