systemd/debian/tests/timedated
Martin Pitt 3e589263a1 Add autopkgtests
This covers smoke-testing logind, hostnamed, timedated, localed, and a
compile/link/run test against libsystemd-login-dev.
2014-04-26 20:53:53 +02:00

21 lines
485 B
Bash
Executable File

#!/bin/sh
set -e
ORIG_TZ=`grep -v '^#' /etc/timezone`
# should activate daemon and work
STATUS=`timedatectl`
echo "$STATUS" | grep -q "Local time:"
# change timezone
OUT=`timedatectl set-timezone Europe/Moscow 2>&1`
[ -z "$OUT" ]
[ "`cat /etc/timezone`" = "Europe/Moscow" ]
STATUS=`timedatectl`
echo "$STATUS" | grep -q "Timezone: Europe/Moscow (MSK, +"
# reset timezone to original
OUT=`timedatectl set-timezone $ORIG_TZ 2>&1`
[ -z "$OUT" ]
[ "`cat /etc/timezone`" = "$ORIG_TZ" ]