mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Merge remote-tracking branch 'origin/patches-2.0'
This commit is contained in:
commit
33124033fd
@ -72,7 +72,13 @@ bench_httpclient_SOURCES = bench_httpclient.c
|
||||
bench_httpclient_LDADD = $(LIBEVENT_GC_SECTIONS) ../libevent_core.la
|
||||
|
||||
regress.gen.c regress.gen.h: regress.rpc $(top_srcdir)/event_rpcgen.py
|
||||
$(top_srcdir)/event_rpcgen.py $(srcdir)/regress.rpc || echo "No Python installed"
|
||||
if $(top_srcdir)/event_rpcgen.py $(srcdir)/regress.rpc ; then \
|
||||
echo "HI"; \
|
||||
else \
|
||||
echo "No Python installed; can't test RPC."; \
|
||||
echo ""> regress.gen.c; \
|
||||
echo "#define NO_PYTHON_EXISTS" > regress.gen.h; \
|
||||
fi
|
||||
|
||||
DISTCLEANFILES = *~
|
||||
|
||||
|
@ -50,6 +50,11 @@ bench_http.exe: bench_http.obj
|
||||
bench_httpclient.exe: bench_httpclient.obj
|
||||
$(CC) $(CFLAGS) $(LIBS) bench_httpclient.obj
|
||||
|
||||
regress.gen.c regress.gen.h: regress.rpc ../event_rpcgen.py
|
||||
echo // > regress.gen.c
|
||||
echo #define NO_PYTHON_EXISTS > regress.gen.h
|
||||
-python ..\event_rpcgen.py regress.rpc
|
||||
|
||||
clean:
|
||||
-del $(REGRESS_OBJS)
|
||||
-del $(OTHER_OBJS)
|
||||
|
@ -71,6 +71,8 @@
|
||||
#include "regress.h"
|
||||
#include "regress_testutils.h"
|
||||
|
||||
#ifndef NO_PYTHON_EXISTS
|
||||
|
||||
static struct evhttp *
|
||||
http_setup(ev_uint16_t *pport)
|
||||
{
|
||||
@ -870,6 +872,13 @@ end:
|
||||
{ #name, run_legacy_test_fn, TT_FORK|TT_NEED_BASE|TT_LEGACY, \
|
||||
&legacy_setup, \
|
||||
rpc_##name }
|
||||
#else
|
||||
/* NO_PYTHON_EXISTS */
|
||||
|
||||
#define RPC_LEGACY(name) \
|
||||
{ #name, NULL, TT_SKIP, NULL, NULL }
|
||||
|
||||
#endif
|
||||
|
||||
struct testcase_t rpc_testcases[] = {
|
||||
RPC_LEGACY(basic_test),
|
||||
|
Loading…
x
Reference in New Issue
Block a user