]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: remove logs before chronyd start in system tests
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 29 Apr 2021 11:15:03 +0000 (13:15 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 29 Apr 2021 11:26:01 +0000 (13:26 +0200)
test/system/010-nts
test/system/test.common

index 7897ceb05ea2bbe6aaa7f92e48fd8946f7896294..66007256a82d401fdc0802fc203d993b893583f1 100755 (executable)
@@ -51,8 +51,6 @@ stop_chronyd || test_fail
 check_chronyd_messages || test_fail
 check_chronyd_files || test_fail
 
-rm -f $TEST_LOGDIR/measurements.log
-
 server_options="port $ntpport nts ntsport $((ntsport + 1))"
 
 start_chronyd || test_fail
index b9a99293a6c79330800dd228072994905b9ecbe6..7005c9e1b937cc1d53c46c8a2df336316eb578cc 100644 (file)
@@ -260,6 +260,8 @@ start_chronyd() {
 
        trap stop_chronyd EXIT
 
+       rm -f "$TEST_LOGDIR"/*.log
+
        $CHRONYD_WRAPPER "$chronyd" $(get_chronyd_options) > "$TEST_DIR/chronyd.out" 2>&1
 
        [ $? -eq 0 ] && [ -f "$pidfile" ] && ps -p "$(cat "$pidfile")" > /dev/null && test_ok || test_error