mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
test: Makes the unit tests to work again
The unit tests was not working due to lack update. This patch adds the necessary stuff to have it work again.
This commit is contained in:
parent
ad330a44bf
commit
cc982ae42e
@ -1,5 +1,7 @@
|
||||
check_PROGRAMS = msc_test
|
||||
msc_test_SOURCES = msc_test.c \
|
||||
$(top_srcdir)/standalone/server.c \
|
||||
$(top_srcdir)/standalone/regex.c \
|
||||
$(top_srcdir)/apache2/re.c \
|
||||
$(top_srcdir)/apache2/re_operators.c \
|
||||
$(top_srcdir)/apache2/re_actions.c \
|
||||
@ -16,6 +18,7 @@ msc_test_SOURCES = msc_test.c \
|
||||
$(top_srcdir)/apache2/persist_dbm.c \
|
||||
$(top_srcdir)/apache2/msc_reqbody.c \
|
||||
$(top_srcdir)/apache2/msc_crypt.c \
|
||||
$(top_srcdir)/apache2/msc_json.c \
|
||||
$(top_srcdir)/apache2/msc_tree.c \
|
||||
$(top_srcdir)/apache2/msc_geo.c \
|
||||
$(top_srcdir)/apache2/msc_gsb.c \
|
||||
@ -24,14 +27,17 @@ msc_test_SOURCES = msc_test.c \
|
||||
$(top_srcdir)/apache2/msc_release.c \
|
||||
$(top_srcdir)/apache2/libinjection/libinjection_sqli.c
|
||||
msc_test_CFLAGS = @APXS_CFLAGS@ @APR_CFLAGS@ @APU_CFLAGS@ \
|
||||
@PCRE_CFLAGS@ @LIBXML2_CFLAGS@ @MODSEC_EXTRA_CFLAGS@ @LUA_CFLAGS@
|
||||
@PCRE_CFLAGS@ @LIBXML2_CFLAGS@ @MODSEC_EXTRA_CFLAGS@ @LUA_CFLAGS@ \
|
||||
@YAJL_CFLAGS@
|
||||
msc_test_CPPFLAGS = -I$(top_srcdir)/apache2 \
|
||||
@APR_CPPFLAGS@ @LIBXML2_CPPFLAGS@ \
|
||||
@PCRE_CPPFLAGS@
|
||||
msc_test_LDADD = @APR_LDADD@ @APU_LDADD@ \
|
||||
@PCRE_LDADD@ @LIBXML2_LDADD@ @LUA_LDADD@
|
||||
@PCRE_LDADD@ @LIBXML2_LDADD@ @LUA_LDADD@ \
|
||||
@YAJL_LDADD@
|
||||
msc_test_LDFLAGS = @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@ \
|
||||
@YAJL_LDFLAGS@
|
||||
|
||||
check_SCRIPTS = run-unit-tests.pl
|
||||
TESTS = $(check_SCRIPTS)
|
||||
|
@ -178,7 +178,8 @@ void msr_log_warn(modsec_rec *msr, const char *text, ...) {
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
const char *ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip) {
|
||||
#define ap_get_remote_host(a, b, c, d) test_ap_get_remote_host(a, b, c, d)
|
||||
const char *test_ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip) {
|
||||
return "FAKE-REMOTE-HOST";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user