[PATCH 1/3] Add a kickstart test in Arabic.

Chris Lumens clumens at redhat.com
Wed Sep 2 20:21:35 UTC 2015


This tests a couple things:  (1) Non-Latin character sets don't result
in a UnicodeDecodeError.  (2) The arabic-support group is installed.
(3) We set up /etc/dnf/plugins/langpacks.conf correctly.
---
 tests/kickstart_tests/lang-2.ks | 43 +++++++++++++++++++++++++++++++++++++++++
 tests/kickstart_tests/lang-2.sh | 22 +++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 tests/kickstart_tests/lang-2.ks
 create mode 100755 tests/kickstart_tests/lang-2.sh

diff --git a/tests/kickstart_tests/lang-2.ks b/tests/kickstart_tests/lang-2.ks
new file mode 100644
index 0000000..4b92f37
--- /dev/null
+++ b/tests/kickstart_tests/lang-2.ks
@@ -0,0 +1,43 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard ara
+lang ar_EG.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+@^xfce-desktop-environment
+%end
+
+%post
+count=$(rpm -qa kacst\* | wc -l)
+if [[ $count -lt 5 ]]; then
+    echo '*** kacst packages were not installed' >> /root/RESULT
+    exit 1
+fi
+
+LANG="ar_EG.UTF-8"
+
+INSTLANG=`cat /etc/locale.conf | awk -F\" '{ print $2 }'`
+
+if [[ "$INSTLANG" != "$LANG" ]]; then
+    echo '*** specified language was not set' >> /root/RESULT
+fi
+
+if ! grep -q "langpack_locales=$LANG" /etc/dnf/plugins/langpacks.conf; then
+    echo '*** /etc/dnf/plugins/langpacks.conf was not set up' >> /root/RESULT
+fi
+
+if [[ ! -e /root/RESULT ]]; then
+    echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/lang-2.sh b/tests/kickstart_tests/lang-2.sh
new file mode 100755
index 0000000..a877777
--- /dev/null
+++ b/tests/kickstart_tests/lang-2.sh
@@ -0,0 +1,22 @@
+#
+# 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 at redhat.com>
+
+TESTTYPE="language i18n"
+
+. ${KSTESTDIR}/functions.sh
-- 
2.4.3



More information about the anaconda-patches mailing list