]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: test-auth - Run Lua unit tests even when building Lua as plugin
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 23 Feb 2026 17:33:16 +0000 (19:33 +0200)
committerRebaser <foobar@foobar>
Thu, 26 Mar 2026 08:41:12 +0000 (08:41 +0000)
src/auth/Makefile.am
src/auth/test-lua.c
src/auth/test-main.c

index 9b9bbdec16a80c61122d77a8d22ba19cb67ab5a1..1ebb75615f7d33b0234961bffb0821fd96dd6356 100644 (file)
@@ -135,6 +135,8 @@ auth_common_sources += \
 endif
 endif
 
+test_auth_ldadd_plugins =
+
 headers = \
        auth.h \
        auth-cache.h \
@@ -201,6 +203,7 @@ libauthdb_lua_la_LDFLAGS = -module -avoid-version -shared
 libauthdb_lua_la_LIBADD = $(LIBDOVECOT_LUA)
 libauthdb_lua_la_CPPFLAGS = $(AM_CPPFLAGS) -DPLUGIN_BUILD
 libauthdb_lua_la_SOURCES = $(lua_sources)
+test_auth_ldadd_plugins += libauthdb_lua.la
 endif
 
 libauthdb_imap_la_LDFLAGS = -module -avoid-version -shared
@@ -240,8 +243,8 @@ test_auth_SOURCES = \
        test-mock.c \
        test-main.c
 
-test_auth_LDADD = $(LIBDOVECOT) $(auth_libs) $(AUTH_LIBS) $(LUA_LIBS)
-test_auth_DEPENDENCIES = $(pkglibexec_PROGRAMS) $(LIBDOVECOT_DEPS)
+test_auth_LDADD = $(test_auth_ldadd_plugins) $(LIBDOVECOT) $(LIBDOVECOT_LUA) $(auth_libs) $(AUTH_LIBS) $(LUA_LIBS)
+test_auth_DEPENDENCIES = $(test_auth_ldadd_plugins) $(pkglibexec_PROGRAMS) $(LIBDOVECOT_DEPS)
 
 test_mech_SOURCES = \
        $(auth_common_sources) \
index ab177e9b46df9ae4c104496a978429b5fad44cc6..0531e4a763d3b676d8e7f190fdec1425af6fece2 100644 (file)
@@ -2,7 +2,7 @@
 
 #include "test-auth.h"
 
-#ifdef BUILTIN_LUA
+#ifdef HAVE_LUA
 #include "istream.h"
 #include "auth-settings.h"
 #include "auth-request.h"
index dedffbea3948417ead932d30e7ebfb784d4c050e..2bbf3339c8f59a0cec8845d35721c18f5f25b4c2 100644 (file)
@@ -22,7 +22,7 @@ int main(int argc, char *argv[])
                TEST_NAMED(test_auth_request_var_expand)
                TEST_NAMED(test_auth_request_fields)
                TEST_NAMED(test_username_filter)
-#if defined(BUILTIN_LUA)
+#if defined(HAVE_LUA)
                TEST_NAMED(test_db_lua)
 #endif
                { NULL, NULL }