summaryrefslogtreecommitdiffstats
path: root/gen-data/tasks
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2014-10-17 13:12:23 +0200
committerPavel Raiskup <praiskup@redhat.com>2014-10-17 13:36:04 +0200
commitcfbbf52a744d0ce7ebcca49702924c6df7d6428c (patch)
tree644e51c2bff4448768d7b80d7ea10086ce81e75f /gen-data/tasks
parentda115e5b4e306e107ec3193192d847bcffc5feec (diff)
downloadpostgresql-setup-tests-cfbbf52a744d0ce7ebcca49702924c6df7d6428c.tar.gz
postgresql-setup-tests-cfbbf52a744d0ce7ebcca49702924c6df7d6428c.tar.xz
postgresql-setup-tests-cfbbf52a744d0ce7ebcca49702924c6df7d6428c.zip
gen-data/tasks: add new 'locale-cz' task
This data should help with checking of 'postgresql --upgrade' behavior when the system locale changed significantly (from en_US.UTF-8 to cs_CZ.utf8). * gen-data/tasks/locale-cz/run.sh: New task file. * gen-data/generate (locale_prereq): Fix missing LANG= prefix in expected locale. Quote current/expected locale strings in error output. (single_task): Adjust $INDENT in sub-shell to not affect subsequent calls. Create tarball in $OUTPUTDIR rather than in `pwd`. Introduce hook_end callback. (generate_tasks): Use dynamic list of tasks.
Diffstat (limited to 'gen-data/tasks')
-rw-r--r--gen-data/tasks/locale-cz/run.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/gen-data/tasks/locale-cz/run.sh b/gen-data/tasks/locale-cz/run.sh
new file mode 100644
index 0000000..12f0a48
--- /dev/null
+++ b/gen-data/tasks/locale-cz/run.sh
@@ -0,0 +1,18 @@
+export task_name="cz-locale"
+
+hook_start()
+{
+ export CHECK_LOCALE=0
+ ___old_locale="$(cat /etc/locale.conf)"
+ echo "LANG=cs_CZ.UTF-8" > /etc/locale.conf
+}
+
+hook_end()
+{
+ echo "$___old_locale" > /etc/locale.conf
+}
+
+run()
+{
+ create_pagila
+}