From 6369641d6f594557114b78fe740544ecf69a6d37 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 26 Feb 2016 11:25:22 +0100 Subject: clock-util: make clock_is_localtime() testable and add initial tests Add path argument to clock_is_localtime() and default to "/etc/adjtime" if it's NULL. This makes the function testable. Add test-clock: initial test cases for some scenarios, using a temporary file. This also checks the behaviour with a NULL (i. e. the system's /etc/adjtime) file. --- Makefile.am | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 7bd98dddf6..4f9072c0ff 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1448,6 +1448,7 @@ tests += \ test-prioq \ test-fileio \ test-time \ + test-clock \ test-hashmap \ test-set \ test-bitmap \ @@ -1961,6 +1962,12 @@ test_time_SOURCES = \ test_time_LDADD = \ libshared.la +test_clock_SOURCES = \ + src/test/test-clock.c + +test_clock_LDADD = \ + libshared.la + test_architecture_SOURCES = \ src/test/test-architecture.c -- cgit v1.2.3-54-g00ecf