[PATCH 1/3] Add a kickstart test for lang settings.

Vratislav Podzimek vpodzime at redhat.com
Mon Jun 1 08:25:00 UTC 2015


On Thu, 2015-05-28 at 13:24 -0400, Samantha N. Bueno wrote:
> This is just a simple test which verifies that specifying a certain
> lang in your ks file actually produces an installed system with that
> lang set as the default.
> ---
>  tests/kickstart_tests/lang.ks | 33 +++++++++++++++++++++++++++++
>  tests/kickstart_tests/lang.sh | 48 +++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 81 insertions(+)
>  create mode 100644 tests/kickstart_tests/lang.ks
>  create mode 100755 tests/kickstart_tests/lang.sh
> 
> diff --git a/tests/kickstart_tests/lang.ks b/tests/kickstart_tests/lang.ks
> new file mode 100644
> index 0000000..e87b68c
> --- /dev/null
> +++ b/tests/kickstart_tests/lang.ks
> @@ -0,0 +1,33 @@
> +#version=DEVEL
> +url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/$releasever/$basearch/os/"
> +install
> +network --bootproto=dhcp
> +
> +bootloader --timeout=1
> +zerombr
> +clearpart --all --initlabel
> +part --fstype=ext4 --size=4400 /
> +part --fstype=ext4 --size=500 /boot
> +part --fstype=swap --size=500 swap
> +
> +keyboard us
> +lang cs_CZ.UTF-8
> +timezone America/New_York --utc
> +rootpw testcase
> +shutdown
> +
> +%packages
> + at core
> +%end
> +
> +%post
> +INSTLANG=cs_CZ.UTF-8
> +
> +if [[ "$LANG" != "$INSTLANG" ]]; then
> +    echo '*** specified language was not set' >> /root/RESULT
> +fi
This tests if the end of the installation runs with the $LANG set
properly which is probably not what you intended. To check the
configuration of the installed system, it would be better to check the
contents of the /etc/locale.conf file. See
write_language_configuration() for more details.

> +
> +if [[ ! -e /root/RESULT ]]; then
> +    echo SUCCESS > /root/RESULT
> +fi
> +%end


-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list