mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
Merge in Lua to test framework.
This commit is contained in:
parent
e357bb55af
commit
a96cbc0f69
@ -53,13 +53,13 @@ CFLAGS = -O2 -g -Wuninitialized -Wall -Wmissing-prototypes -Wshadow -Wunused-var
|
|||||||
all: local-shared-build
|
all: local-shared-build
|
||||||
|
|
||||||
### Experimental Test Framework (UNIX only right now)
|
### Experimental Test Framework (UNIX only right now)
|
||||||
TESTOBJS = \
|
TESTOBJS = re.o re_operators.o re_actions.o re_tfns.o re_variables.o \
|
||||||
re.o re_operators.o re_actions.o re_tfns.o re_variables.o \
|
msc_logging.o msc_xml.o msc_multipart.o modsecurity.o \
|
||||||
msc_logging.o msc_xml.o msc_multipart.o modsecurity.o msc_parsers.o msc_util.o msc_pcre.o \
|
msc_parsers.o msc_util.o msc_pcre.o persist_dbm.o \
|
||||||
persist_dbm.o msc_reqbody.o msc_geo.o acmp.o
|
msc_reqbody.o msc_geo.o acmp.o msc_lua.o
|
||||||
|
|
||||||
msc-test: msc-test.c ${TESTOBJS}
|
msc-test: msc-test.c ${TESTOBJS}
|
||||||
@${CC} -I .. -I `${top_dir}/bin/${APXS} -q INCLUDEDIR` ${INCLUDES} ${DEFS} -L ${top_dir}/lib -o msc-test ${TESTOBJS} msc-test.c -lapr-1 -laprutil-1 -lpcre -lxml2
|
@${CC} -I `${top_dir}/bin/${APXS} -q INCLUDEDIR` ${INCLUDES} ${DEFS} -L ${top_dir}/lib -o msc-test ${TESTOBJS} msc-test.c -lapr-1 -laprutil-1 -lpcre -lxml2 -llua5.1
|
||||||
|
|
||||||
test: msc-test
|
test: msc-test
|
||||||
t/run-tests.pl
|
t/run-tests.pl
|
||||||
|
@ -75,6 +75,9 @@ apr_status_t unixd_set_proc_mutex_perms(apr_proc_mutex_t *pmutex) {
|
|||||||
return APR_SUCCESS;
|
return APR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Escaping functions */
|
||||||
|
|
||||||
static unsigned char hex2dec(unsigned char *what) {
|
static unsigned char hex2dec(unsigned char *what) {
|
||||||
register unsigned char digit;
|
register unsigned char digit;
|
||||||
|
|
||||||
@ -125,6 +128,8 @@ static char *escape(unsigned char *str, apr_size_t *len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Testing functions */
|
||||||
|
|
||||||
static int test_tfn(const char *name, unsigned char *input, long input_len, unsigned char **rval, long *rval_len, char **errmsg)
|
static int test_tfn(const char *name, unsigned char *input, long input_len, unsigned char **rval, long *rval_len, char **errmsg)
|
||||||
{
|
{
|
||||||
int rc = -1;
|
int rc = -1;
|
||||||
@ -150,6 +155,8 @@ static int test_tfn(const char *name, unsigned char *input, long input_len, unsi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Main */
|
||||||
|
|
||||||
int main(int argc, const char * const argv[])
|
int main(int argc, const char * const argv[])
|
||||||
{
|
{
|
||||||
apr_file_t *fd;
|
apr_file_t *fd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user