3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 04:32:37 +01:00

build: Only compile unit test and tools when daemon is enabled

This commit is contained in:
Marcel Holtmann 2023-04-25 16:09:45 +02:00
parent 8f0420c533
commit dd1000f245

View File

@ -376,6 +376,7 @@ man_MANS += wired/ead.8
endif
endif
if DAEMON
noinst_PROGRAMS += tools/probe-req tools/iwd-decrypt-profile
tools_probe_req_SOURCES = tools/probe-req.c src/mpdu.h src/mpdu.c \
@ -391,6 +392,7 @@ tools_iwd_decrypt_profile_SOURCES = tools/iwd-decrypt-profile.c \
src/crypto.h src/crypto.c \
src/storage.h src/storage.c
tools_iwd_decrypt_profile_LDADD = ${ell_ldadd}
endif
if HWSIM
bin_PROGRAMS += tools/hwsim
@ -414,7 +416,10 @@ man_MANS += tools/hwsim.1
endif
endif
unit_tests = unit/test-cmac-aes \
unit_tests =
if DAEMON
unit_tests += unit/test-cmac-aes \
unit/test-hmac-md5 unit/test-hmac-sha1 unit/test-hmac-sha256 \
unit/test-prf-sha1 unit/test-kdf-sha256 \
unit/test-crypto unit/test-eapol unit/test-mpdu \
@ -422,6 +427,7 @@ unit_tests = unit/test-cmac-aes \
unit/test-arc4 unit/test-wsc unit/test-eap-mschapv2 \
unit/test-eap-sim unit/test-sae unit/test-p2p unit/test-band \
unit/test-dpp unit/test-json
endif
if CLIENT
unit_tests += unit/test-client
@ -431,6 +437,7 @@ if MAINTAINER_MODE
noinst_PROGRAMS += $(unit_tests)
endif
if DAEMON
unit_test_eap_sim_SOURCES = unit/test-eap-sim.c \
src/crypto.h src/crypto.c src/simutil.h src/simutil.c \
src/ie.h src/ie.c \
@ -444,7 +451,6 @@ unit_test_eap_sim_SOURCES = unit/test-eap-sim.c \
src/erp.h src/erp.c \
src/band.h src/band.c \
src/eap-sim.c
unit_test_eap_sim_LDADD = $(ell_ldadd)
unit_test_cmac_aes_SOURCES = unit/test-cmac-aes.c \
@ -453,7 +459,6 @@ unit_test_cmac_aes_LDADD = $(ell_ldadd)
unit_test_arc4_SOURCES = unit/test-arc4.c \
src/crypto.h src/crypto.c
unit_test_arc4_LDADD = $(ell_ldadd)
unit_test_hmac_md5_SOURCES = unit/test-hmac-md5.c \
@ -542,19 +547,6 @@ unit_test_eap_mschapv2_SOURCES = src/eap-mschapv2.h src/eap-mschapv2.c \
unit/test-eap-mschapv2.c
unit_test_eap_mschapv2_LDADD = $(ell_ldadd)
if CLIENT
unit_test_client_SOURCES = unit/test-client.c \
client/adapter.c \
client/agent.h client/agent.c \
client/agent-manager.h client/agent-manager.c \
client/command.h client/command.c \
client/dbus-proxy.h client/dbus-proxy.c \
client/display.h client/display.c \
client/network.h client/network.c \
client/properties.h client/properties.c
unit_test_client_LDADD = $(ell_ldadd) $(client_ldadd)
endif
unit_test_sae_SOURCES = unit/test-sae.c \
src/sae.h src/sae.c \
src/crypto.h src/crypto.c \
@ -583,6 +575,20 @@ unit_test_dpp_LDADD = $(ell_ldadd)
unit_test_json_SOURCES = unit/test-json.c src/json.h src/json.c shared/jsmn.h
unit_test_json_LDADD = $(ell_ldadd)
endif
if CLIENT
unit_test_client_SOURCES = unit/test-client.c \
client/adapter.c \
client/agent.h client/agent.c \
client/agent-manager.h client/agent-manager.c \
client/command.h client/command.c \
client/dbus-proxy.h client/dbus-proxy.c \
client/display.h client/display.c \
client/network.h client/network.c \
client/properties.h client/properties.c
unit_test_client_LDADD = $(ell_ldadd) $(client_ldadd)
endif
TESTS = $(unit_tests)