Test suite fails if Kea is built without gtest
Describe the bug
Running make check
after building Kea without gtest results in a test failure due to a missing library (libco1.so
) which is only built when gtest is enabled.
To Reproduce
Steps:
- ./configure Kea without gtest enables
- make && make check
- See error
Expected behavior
The test suite should successfully run all tests that do not depend on gtest.
Environment:
- Kea version: Observed in 2.1.0 and later
- OS: Multiple Linux distributions
- NO GTEST SUPPORT
Additional Information Here's a snip from a test failure due to this issue:
Running command "/home/djt/code/kea/src/bin/dhcp4/kea-dhcp4 -d -t /home/djt/code/kea/src/bin/dhcp4/tests/test_config.json".
Syntax check OK
Error encountered: hooks libraries failed to validate - library or libraries in error are: /home/djt/code/kea/src/bin/dhcp4/tests/.libs/libco1.so (/home/djt/code/kea/src/bin/dhcp4/tests/test_config.json:13:5)
ERROR: expected exit code 0, got 1
Log file dump:
2021-11-03 01:14:51.206 DEBUG [kea-dhcp4.dhcp4/166087.140200568062528] DHCP4_OPEN_SOCKET opening service sockets on port 0
2021-11-03 01:14:51.206 DEBUG [kea-dhcp4.commands/166087.140200568062528] COMMAND_REGISTERED Command list-commands registered
2021-11-03 01:14:51.206 DEBUG [kea-dhcp4.commands/166087.140200568062528] COMMAND_REGISTERED Command build-report registered
2021-11-03 01:14:51.207 DEBUG [kea-dhcp4.commands/166087.140200568062528] COMMAND_REGISTERED Command config-backend-pull registered
...snip...
2021-11-03 01:14:51.207 DEBUG [kea-dhcp4.commands/166087.140200568062528] COMMAND_REGISTERED Command statistic-sample-count-set-all registered
2021-11-03 01:14:51.207 DEBUG [kea-dhcp4.dhcp4/166087.140200568062528] DHCP4_CONFIG_START DHCPv4 server is processing the following configuration: { "config-control": { "config-databases": [ { "password": "*****", "type": "mysql", "user": "keatest" } ] }, "hooks-libraries": [ { "library": "/home/djt/code/kea/src/bin/dhcp4/tests/.libs/libco1.so", "parameters": { "nested-map": { "password": "*****", "user": "keatest" }, "password": "*****", "user": "keatest" } } ], "hosts-database": { "password": "*****", "type": "mysql", "user": "keatest" }, "lease-database": { "password": "*****", "type": "mysql", "user": "keatest" }, "user-context": { "password": "superadmin", "secret": "superadmin", "shared-info": { "password": "superadmin", "secret": "superadmin" } } }
2021-11-03 01:14:51.207 INFO [kea-dhcp4.hosts/166087.140200568062528] HOSTS_BACKENDS_REGISTERED the following host backend types are available:
2021-11-03 01:14:51.208 ERROR [kea-dhcp4.hooks/166087.140200568062528] HOOKS_OPEN_ERROR failed to open hook library /home/djt/code/kea/src/bin/dhcp4/tests/.libs/libco1.so: /home/djt/code/kea/src/bin/dhcp4/tests/.libs/libco1.so: cannot open shared object file: No such file or directory
2021-11-03 01:14:51.208 ERROR [kea-dhcp4.dhcp4/166087.140200568062528] DHCP4_PARSER_FAIL failed to create or run parser for configuration element hooks-libraries: hooks libraries failed to validate - library or libraries in error are: /home/djt/code/kea/src/bin/dhcp4/tests/.libs/libco1.so (/home/djt/code/kea/src/bin/dhcp4/tests/test_config.json:13:5)
2021-11-03 01:14:51.208 DEBUG [kea-dhcp4.dhcpsrv/166087.140200568062528] DHCPSRV_TIMERMGR_UNREGISTER_ALL_TIMERS unregistering all timers
2021-11-03 01:14:51.208 DEBUG [kea-dhcp4.commands/166087.140200568062528] COMMAND_DEREGISTERED Command build-report deregistered
2021-11-03 01:14:51.208 DEBUG [kea-dhcp4.commands/166087.140200568062528] COMMAND_DEREGISTERED Command config-backend-pull deregistered
2021-11-03 01:14:51.208 DEBUG [kea-dhcp4.commands/166087.140200568062528] COMMAND_DEREGISTERED Command config-get deregistered
...snip...
[ FAILED ] dhcpv4.password_redact_test
FAIL: dhcp4_process_tests.sh
======================================
1 of 1 test failed
Please report to kea-dev@lists.isc.org
======================================
make[6]: *** [Makefile:1414: check-TESTS] Error 1
make[6]: Leaving directory '/home/djt/code/kea/src/bin/dhcp4/tests'
make[5]: *** [Makefile:1566: check-am] Error 2
make[5]: Leaving directory '/home/djt/code/kea/src/bin/dhcp4/tests'
make[4]: *** [Makefile:1321: check-recursive] Error 1
make[4]: Leaving directory '/home/djt/code/kea/src/bin/dhcp4/tests'
make[3]: *** [Makefile:710: check-recursive] Error 1
make[3]: Leaving directory '/home/djt/code/kea/src/bin/dhcp4'
make[2]: *** [Makefile:448: check-recursive] Error 1
make[2]: Leaving directory '/home/djt/code/kea/src/bin'
make[1]: *** [Makefile:446: check-recursive] Error 1
make[1]: Leaving directory '/home/djt/code/kea/src'
make: *** [Makefile:611: check-recursive] Error 1