diff options
author | Björn Svensson <bjorn.a.svensson@est.tech> | 2021-10-25 10:13:48 +0200 |
---|---|---|
committer | Björn Svensson <bjorn.a.svensson@est.tech> | 2021-10-26 09:54:44 +0200 |
commit | 648763c36e9f6493b13a77da35eb33ef0652b4e2 (patch) | |
tree | 0428b4fdc5b89f1d737b4e267dc279f36c1a9c06 /Makefile | |
parent | c98c6994ded45e774c3459baa2936f06f8a2c331 (diff) |
Add build options for enabling async tests
Asynchronous testcases that requires the event library `libevent`
can be built and enabled by using the added build flags:
- ENABLE_ASYNC_TESTS when using CMake
- TEST_ASYNC when using Make
The async tests are disabled by default to avoid adding new requirements,
but the testcases are built and run in CI.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -75,6 +75,9 @@ USE_SSL?=0 ifeq ($(USE_SSL),1) export CFLAGS+=-DHIREDIS_TEST_SSL endif +ifeq ($(TEST_ASYNC),1) + export CFLAGS+=-DHIREDIS_TEST_ASYNC +endif ifeq ($(uname_S),Linux) ifdef OPENSSL_PREFIX @@ -211,6 +214,9 @@ ifeq ($(USE_SSL),1) TEST_LIBS += $(SSL_STLIBNAME) TEST_LDFLAGS = $(SSL_LDFLAGS) -lssl -lcrypto -lpthread endif +ifeq ($(TEST_ASYNC),1) + TEST_LDFLAGS += -levent +endif hiredis-test: test.o $(TEST_LIBS) $(CC) -o $@ $(REAL_CFLAGS) -I. $^ $(REAL_LDFLAGS) $(TEST_LDFLAGS) |