From db7d9639b4f6c75cbf559a1a065b2735e773452b Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 27 Feb 2020 08:29:58 +0100 Subject: [PATCH] test: fix unit tests to build with -NTP and -CMDMON --- test/unit/clientlog.c | 13 ++++++++++++- test/unit/keys.c | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/test/unit/clientlog.c b/test/unit/clientlog.c index a412b69..6f0babb 100644 --- a/test/unit/clientlog.c +++ b/test/unit/clientlog.c @@ -18,9 +18,13 @@ ********************************************************************** */ -#include +#include #include "test.h" +#if defined(FEAT_NTP) || defined(FEAT_CMDMON) + +#include + void test_unit(void) { @@ -82,3 +86,10 @@ test_unit(void) CLG_Finalise(); CNF_Finalise(); } +#else +void +test_unit(void) +{ + TEST_REQUIRE(0); +} +#endif diff --git a/test/unit/keys.c b/test/unit/keys.c index a787338..9c69b4a 100644 --- a/test/unit/keys.c +++ b/test/unit/keys.c @@ -18,9 +18,13 @@ ********************************************************************** */ -#include +#include #include "test.h" +#if defined(FEAT_NTP) || defined(FEAT_CMDMON) + +#include + #define KEYS 100 #define KEYFILE "keys.test-keys" @@ -157,3 +161,10 @@ test_unit(void) CNF_Finalise(); HSH_Finalise(); } +#else +void +test_unit(void) +{ + TEST_REQUIRE(0); +} +#endif