From f0875d13c3bd4766eea72b054365abfb9fd610a4 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 6 Jan 2014 15:27:44 +0100 Subject: IFP: Add utility functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a number of utility functions, most importanly ifp_req_create(). The ifp_req is a structure that will be passed along with the ifp request and would provide easy access to both the sbus_request data and per-responder data, like the ifp_ctx. Also includes a utility function to split a path prefix from a full path and add a ldb_element into a dictionary. These will be reused later. Reviewed-by: Pavel Březina Reviewed-by: Stef Walter (cherry picked from commit f92ace4a52602e8c38a34f2392bec3deeac2dddd) --- Makefile.am | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 65595aa06..a60c97e0f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -165,7 +165,12 @@ if HAVE_CMOCKA responder-get-domains-tests \ sbus-internal-tests \ test_search_bases -endif + +if BUILD_IFP +non_interactive_cmocka_based_tests += ifp_tests +endif # BUILD_IFP + +endif # HAVE_CMOCKA check_PROGRAMS = \ stress-tests \ @@ -788,6 +793,7 @@ sssd_ifp_SOURCES = \ src/responder/ifp/ifpsrv_cmd.c \ src/responder/ifp/ifp_iface_generated.c \ src/responder/ifp/ifp_iface_generated.h \ + src/responder/ifp/ifpsrv_util.c \ $(SSSD_UTIL_OBJ) \ $(SSSD_RESPONDER_OBJ) sssd_ifp_CFLAGS = \ @@ -1619,8 +1625,23 @@ dp_opt_tests_LDADD = \ $(SSSD_INTERNAL_LTLIBS) \ libsss_test_common.la +if BUILD_IFP +ifp_tests_SOURCES = \ + $(TEST_MOCK_RESP_OBJ) \ + src/tests/cmocka/test_ifp.c \ + src/responder/ifp/ifpsrv_cmd.c \ + src/responder/ifp/ifpsrv_util.c +ifp_tests_CFLAGS = \ + $(AM_CFLAGS) +ifp_tests_LDADD = \ + $(CMOCKA_LIBS) \ + $(SSSD_LIBS) \ + $(SSSD_INTERNAL_LTLIBS) \ + libsss_test_common.la endif +endif # HAVE_CMOCKA + noinst_PROGRAMS = pam_test_client if BUILD_SUDO noinst_PROGRAMS += sss_sudo_cli -- cgit