Signed-off-by: Karel Valek kvalek@redhat.com
From: Karel Valek kvalek@redhat.com
Signed-off-by: Karel Valek kvalek@redhat.com --- tests/kickstart_tests/timezoneLOCAL.ks | 39 ++++++++++++++++++++++++++++++++++ tests/kickstart_tests/timezoneLOCAL.sh | 20 +++++++++++++++++ tests/kickstart_tests/timezoneUTC.ks | 39 ++++++++++++++++++++++++++++++++++ tests/kickstart_tests/timezoneUTC.sh | 20 +++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 tests/kickstart_tests/timezoneLOCAL.ks create mode 100755 tests/kickstart_tests/timezoneLOCAL.sh create mode 100644 tests/kickstart_tests/timezoneUTC.ks create mode 100755 tests/kickstart_tests/timezoneUTC.sh
diff --git a/tests/kickstart_tests/timezoneLOCAL.ks b/tests/kickstart_tests/timezoneLOCAL.ks new file mode 100644 index 0000000..09009f0 --- /dev/null +++ b/tests/kickstart_tests/timezoneLOCAL.ks @@ -0,0 +1,39 @@ +#version=DEVEL +url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/$releasever/$basear..." +install +network --bootproto=dhcp + +bootloader --timeout=1 +zerombr +clearpart +autopart + +keyboard en +lang en +timezone Europe/Prague +rootpw testcase + +shutdown + +%packages +%end + +%post +## UTC ZONE TEST +# First, we need to run hwclock -D to get the time... +hwclock -D | grep "Assuming hardware clock is kept in local time." +if [[ $? -ne 0 ]]; then + echo "FAILED: hwclock not set to LOCAL time." >> /root/RESULT +fi + +# ...and if it passes, let's check if the adjtime is correct. +cat /etc/adjtime | grep LOCAL +if [[ $? -ne 0 ]]; then + echo "FAILED: Time in /etc/adjtime is not set to LOCAL." >> /root/RESULT +fi + +# If everything passes, give a pack of cookies to dev team. +if [[ ! -e /root/RESULT ]]; then + echo SUCCESS > /root/RESULT +fi +%end diff --git a/tests/kickstart_tests/timezoneLOCAL.sh b/tests/kickstart_tests/timezoneLOCAL.sh new file mode 100755 index 0000000..7b2f4f0 --- /dev/null +++ b/tests/kickstart_tests/timezoneLOCAL.sh @@ -0,0 +1,20 @@ +# +# Copyright (C) 2015 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions of +# the GNU General Public License v.2, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY expressed or implied, including the implied warranties of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. You should have received a copy of the +# GNU General Public License along with this program; if not, write to the +# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. Any Red Hat trademarks that are incorporated in the +# source code or documentation are not subject to the GNU General Public +# License and may only be used or replicated with the express permission of +# Red Hat, Inc. +# +# Red Hat Author(s): Chris Lumens clumens@redhat.com + +. ${KSTESTDIR}/functions.sh diff --git a/tests/kickstart_tests/timezoneUTC.ks b/tests/kickstart_tests/timezoneUTC.ks new file mode 100644 index 0000000..a4a115e --- /dev/null +++ b/tests/kickstart_tests/timezoneUTC.ks @@ -0,0 +1,39 @@ +#version=DEVEL +url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/$releasever/$basear..." +install +network --bootproto=dhcp + +bootloader --timeout=1 +zerombr +clearpart +autopart + +keyboard en +lang en +timezone Europe/Prague --utc +rootpw testcase + +shutdown + +%packages +%end + +%post +## UTC ZONE TEST +# First, we need to run hwclock -D to get the time... +hwclock -D | grep "Assuming hardware clock is kept in UTC time." +if [[ $? -ne 0 ]]; then + echo "FAILED: hwclock not set to UTC.." >> /root/RESULT +fi + +# ...and if it passes, let's check if the adjtime is correct. +cat /etc/adjtime | grep UTC +if [[ $? -ne 0 ]]; then + echo "FAILED: Time in /etc/adjtime not set to UTC." >> /root/RESULT +fi + +# If everything passes, give a pack of cookies to dev team. +if [[ ! -e /root/RESULT ]]; then + echo SUCCESS > /root/RESULT +fi +%end diff --git a/tests/kickstart_tests/timezoneUTC.sh b/tests/kickstart_tests/timezoneUTC.sh new file mode 100755 index 0000000..7b2f4f0 --- /dev/null +++ b/tests/kickstart_tests/timezoneUTC.sh @@ -0,0 +1,20 @@ +# +# Copyright (C) 2015 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions of +# the GNU General Public License v.2, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY expressed or implied, including the implied warranties of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. You should have received a copy of the +# GNU General Public License along with this program; if not, write to the +# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. Any Red Hat trademarks that are incorporated in the +# source code or documentation are not subject to the GNU General Public +# License and may only be used or replicated with the express permission of +# Red Hat, Inc. +# +# Red Hat Author(s): Chris Lumens clumens@redhat.com + +. ${KSTESTDIR}/functions.sh
From: Karel Valek kvalek@redhat.com
Signed-off-by: Karel Valek kvalek@redhat.com --- tests/kickstart_tests/timezoneLOCAL.ks | 6 +++--- tests/kickstart_tests/timezoneUTC.ks | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/kickstart_tests/timezoneLOCAL.ks b/tests/kickstart_tests/timezoneLOCAL.ks index 09009f0..0a1e48a 100644 --- a/tests/kickstart_tests/timezoneLOCAL.ks +++ b/tests/kickstart_tests/timezoneLOCAL.ks @@ -20,19 +20,19 @@ shutdown
%post ## UTC ZONE TEST -# First, we need to run hwclock -D to get the time... +# hwclock LOCAL test hwclock -D | grep "Assuming hardware clock is kept in local time." if [[ $? -ne 0 ]]; then echo "FAILED: hwclock not set to LOCAL time." >> /root/RESULT fi
-# ...and if it passes, let's check if the adjtime is correct. +# cat adjtime LOCAL test cat /etc/adjtime | grep LOCAL if [[ $? -ne 0 ]]; then echo "FAILED: Time in /etc/adjtime is not set to LOCAL." >> /root/RESULT fi
-# If everything passes, give a pack of cookies to dev team. +# everything passes if [[ ! -e /root/RESULT ]]; then echo SUCCESS > /root/RESULT fi diff --git a/tests/kickstart_tests/timezoneUTC.ks b/tests/kickstart_tests/timezoneUTC.ks index a4a115e..f8e8cfe 100644 --- a/tests/kickstart_tests/timezoneUTC.ks +++ b/tests/kickstart_tests/timezoneUTC.ks @@ -20,19 +20,19 @@ shutdown
%post ## UTC ZONE TEST -# First, we need to run hwclock -D to get the time... +# hwclock -D UTC test hwclock -D | grep "Assuming hardware clock is kept in UTC time." if [[ $? -ne 0 ]]; then echo "FAILED: hwclock not set to UTC.." >> /root/RESULT fi
-# ...and if it passes, let's check if the adjtime is correct. +# cat adjtime UTC test cat /etc/adjtime | grep UTC if [[ $? -ne 0 ]]; then echo "FAILED: Time in /etc/adjtime not set to UTC." >> /root/RESULT fi
-# If everything passes, give a pack of cookies to dev team. +# everything passes if [[ ! -e /root/RESULT ]]; then echo SUCCESS > /root/RESULT fi
anaconda-patches@lists.fedorahosted.org