. ./test.common
test_start "SHM refclock"
+check_config_h 'FEAT_REFCLOCK 1' || test_skip
+check_config_h 'FEAT_PHC 1' || test_skip
+check_config_h 'FEAT_CMDMON 1' || test_skip
+
servers=0
limit=1000
refclock_jitter=$jitter
test_start "allow/deny directives"
+check_config_h 'FEAT_CMDMON 1' || test_skip
+
limit=500
# Note that start_client in clknetsim.bash always adds allow to the config
test_start "chronyc"
+check_config_h 'FEAT_REFCLOCK 1' || test_skip
+check_config_h 'FEAT_CMDMON 1' || test_skip
+
refclock_jitter=$jitter
client_conf="
refclock SHM 0 noselect
test_start "port and acquisitionport directives"
+check_config_h 'FEAT_CMDMON 1' || test_skip
+
run_test || test_fail
check_chronyd_exit || test_fail
check_source_selection || test_fail
#!/bin/bash
. ./test.common
+
test_start "leap second"
+check_config_h 'FEAT_REFCLOCK 1' || test_skip
+
export CLKNETSIM_START_DATE=$(TZ=UTC date -d 'Dec 30 2008 0:00:00' +'%s')
leap=$[2 * 24 * 3600]
# The following tests need 64-bit time_t
check_config_h 'HAVE_LONG_TIME_T 1' || test_skip
+check_config_h 'FEAT_CMDMON 1' || test_skip
limit=2
client_server_options="noselect"
#!/bin/bash
. ./test.common
+
test_start "smoothtime option"
+check_config_h 'FEAT_REFCLOCK 1' || test_skip
+
server_strata=2
server_conf="smoothtime 400 0.001"
server_server_options="minpoll 8"
test_start "orphan option"
+check_config_h 'FEAT_CMDMON 1' || test_skip
+
server_strata=3
server_conf="local stratum 5 orphan
server 192.168.123.1
#!/bin/bash
. ./test.common
+
test_start "tai option"
+check_config_h 'FEAT_REFCLOCK 1' || test_skip
+
export CLKNETSIM_START_DATE=$(TZ=UTC date -d 'Dec 31 2008 23:50:00' +'%s')
leap=$[10 * 60]
test_start "-x option"
+check_config_h 'FEAT_CMDMON 1' || test_skip
+
wander=0.0
time_offset=0.0
freq_offset=0.0
test_start "hwtimestamp directive"
+check_config_h 'HAVE_LINUX_TIMESTAMPING 1' || test_skip
+
export CLKNETSIM_TIMESTAMPING=2
refclock_jitter=1e-8
#!/bin/bash
. ./test.common
+
test_start "log directive"
+check_config_h 'FEAT_PHC 1' || test_skip
+
refclock_jitter=$jitter
client_server_options="maxpoll 6"
client_conf="refclock PHC /dev/ptp0 dpoll 4 poll 6 noselect
test_start() {
rm -f tmp/*
echo "Testing $@:"
+
+ check_config_h 'FEAT_NTP 1' || test_skip
}
test_pass() {
#include <local.h>
#include "test.h"
+#ifdef FEAT_NTP
+
static struct timespec current_time;
static NTP_Receive_Buffer req_buffer, res_buffer;
static int req_length, res_length;
CNF_Finalise();
HSH_Finalise();
}
+
+#else
+void
+test_unit(void)
+{
+ TEST_REQUIRE(0);
+}
+#endif
**********************************************************************
*/
+#include <config.h>
+#include "test.h"
+
+#ifdef FEAT_NTP
+
#include <ntp_sources.c>
#include <conf.h>
#include <ntp_io.h>
-#include "test.h"
void
test_unit(void)
CNF_Finalise();
HSH_Finalise();
}
+
+#else
+void
+test_unit(void)
+{
+ TEST_REQUIRE(0);
+}
+#endif