2019-01-03 16:48:45 +00:00
|
|
|
# Copyright (c) 2017 - 2019 LiteSpeed Technologies Inc. See LICENSE.
|
2019-01-30 20:28:35 +00:00
|
|
|
INCLUDE_DIRECTORIES(../../src/liblsquic)
|
2018-03-30 14:57:17 +00:00
|
|
|
|
2019-01-30 20:28:35 +00:00
|
|
|
ENABLE_TESTING()
|
2018-03-30 18:05:18 +00:00
|
|
|
|
2019-09-11 15:27:58 +00:00
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DLSQUIC_TEST=1")
|
|
|
|
|
2019-01-30 20:28:35 +00:00
|
|
|
IF (MSVC)
|
|
|
|
SET(ADDL_SOURCES ../../wincompat/getopt.c ../../wincompat/getopt1.c)
|
|
|
|
SET(LIB_FLAGS "-FORCE:MULTIPLE")
|
2018-03-12 22:25:01 +00:00
|
|
|
ELSE()
|
2019-01-30 20:28:35 +00:00
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-value")
|
2019-09-11 15:27:58 +00:00
|
|
|
IF (CMAKE_C_COMPILER_ID STREQUAL GNU)
|
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-override-init")
|
|
|
|
ENDIF()
|
|
|
|
IF (CMAKE_C_COMPILER_ID STREQUAL Clang)
|
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-initializer-overrides")
|
|
|
|
ENDIF()
|
2018-03-12 22:25:01 +00:00
|
|
|
ENDIF()
|
|
|
|
|
2019-09-11 15:27:58 +00:00
|
|
|
include_directories(../../src/liblsquic/ls-qpack)
|
|
|
|
|
2019-01-30 20:28:35 +00:00
|
|
|
SET(TESTS
|
2019-09-11 15:27:58 +00:00
|
|
|
ack
|
2019-01-30 20:28:35 +00:00
|
|
|
ackgen_gquic_be
|
|
|
|
ackparse_gquic_be
|
2019-11-11 19:05:54 +00:00
|
|
|
ackparse_ietf
|
2019-01-30 20:28:35 +00:00
|
|
|
alarmset
|
2019-09-11 15:27:58 +00:00
|
|
|
alt_svc_ver
|
2019-01-30 20:28:35 +00:00
|
|
|
arr
|
|
|
|
attq
|
|
|
|
blocked_gquic_be
|
2019-09-11 15:27:58 +00:00
|
|
|
bw_sampler
|
2019-01-30 20:28:35 +00:00
|
|
|
conn_close_gquic_be
|
2019-09-11 15:27:58 +00:00
|
|
|
crypto_gen
|
2019-01-30 20:28:35 +00:00
|
|
|
cubic
|
|
|
|
dec
|
|
|
|
di_nocopy
|
|
|
|
elision
|
|
|
|
engine_ctor
|
|
|
|
export_key
|
|
|
|
frame_chop
|
|
|
|
frame_reader
|
|
|
|
frame_writer
|
|
|
|
goaway_gquic_be
|
2019-09-11 15:27:58 +00:00
|
|
|
h3_framing
|
|
|
|
hcsi_reader
|
2019-01-30 20:28:35 +00:00
|
|
|
hkdf
|
|
|
|
lsquic_hash
|
|
|
|
packet_out
|
|
|
|
packno_len
|
2019-09-11 15:27:58 +00:00
|
|
|
parse
|
2019-01-30 20:28:35 +00:00
|
|
|
parse_packet_in
|
2019-09-11 15:27:58 +00:00
|
|
|
purga
|
|
|
|
qlog
|
2019-01-30 20:28:35 +00:00
|
|
|
quic_be_floats
|
|
|
|
rechist
|
|
|
|
reg_pkt_headergen
|
|
|
|
rst_stream_gquic_be
|
|
|
|
rtt
|
2019-09-11 15:27:58 +00:00
|
|
|
send_headers
|
2019-01-30 20:28:35 +00:00
|
|
|
senhist
|
|
|
|
set
|
|
|
|
sfcw
|
2019-09-11 15:27:58 +00:00
|
|
|
shi
|
2019-01-30 20:28:35 +00:00
|
|
|
spi
|
|
|
|
stop_waiting_gquic_be
|
|
|
|
streamgen
|
|
|
|
streamparse
|
2019-09-11 15:27:58 +00:00
|
|
|
trapa
|
|
|
|
varint
|
2019-01-30 20:28:35 +00:00
|
|
|
ver_nego
|
|
|
|
wuf_gquic_be
|
|
|
|
)
|
|
|
|
|
|
|
|
IF (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
|
|
# Linux has fmemopen
|
|
|
|
SET(TESTS ${TESTS} frame_rw)
|
|
|
|
ENDIF()
|
2018-03-30 14:57:17 +00:00
|
|
|
|
2019-02-04 13:59:11 +00:00
|
|
|
|
2019-01-30 20:28:35 +00:00
|
|
|
FOREACH(TEST_NAME ${TESTS})
|
|
|
|
ADD_EXECUTABLE(test_${TEST_NAME} test_${TEST_NAME}.c ${ADDL_SOURCES})
|
|
|
|
TARGET_LINK_LIBRARIES(test_${TEST_NAME} ${LIBS} ${LIB_FLAGS})
|
|
|
|
ADD_TEST(${TEST_NAME} test_${TEST_NAME})
|
|
|
|
ENDFOREACH()
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(test_stream test_stream.c ${ADDL_SOURCES})
|
|
|
|
TARGET_LINK_LIBRARIES(test_stream ${LIBS} ${LIB_FLAGS})
|
|
|
|
ADD_TEST(stream test_stream)
|
|
|
|
ADD_TEST(stream_hash test_stream -h)
|
|
|
|
ADD_TEST(stream_A test_stream -A)
|
|
|
|
ADD_TEST(stream_hash_A test_stream -A -h)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(graph_cubic graph_cubic.c ${ADDL_SOURCES})
|
|
|
|
TARGET_LINK_LIBRARIES(graph_cubic ${LIBS})
|
2019-02-04 13:59:11 +00:00
|
|
|
|
2019-09-11 15:27:58 +00:00
|
|
|
ADD_EXECUTABLE(mini_parse mini_parse.c ${ADDL_SOURCES})
|
|
|
|
TARGET_LINK_LIBRARIES(mini_parse ${LIBS})
|
|
|
|
|
2019-12-11 14:38:58 +00:00
|
|
|
ADD_EXECUTABLE(test_min_heap test_min_heap.c ../../src/liblsquic/lsquic_min_heap.c)
|
|
|
|
ADD_TEST(min_heap test_min_heap)
|
|
|
|
|
2019-09-11 15:27:58 +00:00
|
|
|
ADD_EXECUTABLE(test_malo_pooled test_malo.c ../../src/liblsquic/lsquic_malo.c)
|
|
|
|
SET_TARGET_PROPERTIES(test_malo_pooled
|
|
|
|
PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DLSQUIC_USE_POOLS=1")
|
|
|
|
ADD_TEST(malo_pooled test_malo_pooled)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(test_malo_nopool test_malo.c ../../src/liblsquic/lsquic_malo.c)
|
|
|
|
SET_TARGET_PROPERTIES(test_malo_nopool
|
|
|
|
PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DLSQUIC_USE_POOLS=0")
|
|
|
|
ADD_TEST(malo_nopool test_malo_nopool)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(test_minmax test_minmax.c ../../src/liblsquic/lsquic_minmax.c)
|
|
|
|
ADD_TEST(minmax test_minmax)
|