2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00

[#3729] Added bootp tests (tentative)

This commit is contained in:
Francis Dupont
2025-02-06 04:03:47 +01:00
committed by Andrei Pavel
parent 24db2a6d5b
commit ae506b9a75
3 changed files with 42 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
if not gtest.found()
subdir_done()
endif
HOOK_INCLUDES = [include_directories('..')]
dhcp_bootp_libload_tests = executable(
'dhcp-bootp-libload-tests',
'load_unload_unittests.cc',
'run_unittests.cc',
cpp_args: [
f'-DLIBDHCP_BOOTP_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/bootp/libdhcp_bootp.so"',
],
dependencies: [gtest, crypto],
include_directories: [include_directories('.')] + INCLUDES + HOOK_INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
test('dhcp_bootp_libload_tests', dhcp_bootp_libload_tests, protocol: 'gtest')

View File

@@ -1,4 +1,4 @@
dhcp_bootp_lib = library(
dhcp_bootp_lib = shared_library(
'dhcp_bootp',
'bootp_callouts.cc',
'bootp_log.cc',
@@ -11,3 +11,10 @@ dhcp_bootp_lib = library(
link_with: LIBS_BUILT_SO_FAR,
name_suffix: 'so',
)
dhcp_bootp_archive = static_library(
'dhcp_bootp',
objects: dhcp_bootp_lib.extract_all_objects(recursive: false),
link_with: LIBS_BUILT_SO_FAR,
)
subdir('tests')
subdir('libloadtests')

View File

@@ -0,0 +1,17 @@
if not gtest.found()
subdir_done()
endif
HOOK_INCLUDES = [include_directories('..')]
dhcp_bootp_lib_tests = executable(
'dhcp-bootp-lib-tests',
'bootp_unittests.cc',
'run_unittests.cc',
cpp_args: [
f'-DBOOTP_LIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/bootp/libdhcp_bootp.so"',
],
dependencies: [gtest],
include_directories: [include_directories('.')] + INCLUDES + HOOK_INCLUDES,
link_with: [dhcp_bootp_archive] + LIBS_BUILT_SO_FAR,
)
test('dhcp_bootp_lib_tests', dhcp_bootp_lib_tests, protocol: 'gtest')