diff options
author | Pavel Raiskup <praiskup@redhat.com> | 2014-11-24 16:10:11 +0100 |
---|---|---|
committer | Pavel Raiskup <praiskup@redhat.com> | 2014-11-24 16:10:11 +0100 |
commit | 22a4e88e40c30c309b27c399ac6795da6c5fe7c9 (patch) | |
tree | c1fc5465c6cc37fd022dea5c33fdb90df040f8e7 /postgresql-tests | |
parent | c34469f5abba17387abcaddb2f3da77bf4a88757 (diff) | |
download | postgresql-setup-tests-22a4e88e40c30c309b27c399ac6795da6c5fe7c9.tar.gz postgresql-setup-tests-22a4e88e40c30c309b27c399ac6795da6c5fe7c9.tar.xz postgresql-setup-tests-22a4e88e40c30c309b27c399ac6795da6c5fe7c9.zip |
postgresql-tests: test upstream testsuite
* postgresql-tests/lib_pgsql.sh (dtf_postgresql_initdb): New
initdb wrapper.
* postgresql-tests/tasks/upstream-testsuite/runtest.sh: New
testcase.
Diffstat (limited to 'postgresql-tests')
-rw-r--r-- | postgresql-tests/lib_pgsql.sh | 9 | ||||
-rw-r--r-- | postgresql-tests/tasks/upstream-testsuite/runtest.sh | 30 |
2 files changed, 39 insertions, 0 deletions
diff --git a/postgresql-tests/lib_pgsql.sh b/postgresql-tests/lib_pgsql.sh index 8d44391..e1fa3b0 100644 --- a/postgresql-tests/lib_pgsql.sh +++ b/postgresql-tests/lib_pgsql.sh @@ -160,6 +160,15 @@ dtf_postgresql_upgrade_tour() return $rv } +dtf_postgresql_initdb() +{ + if rlIsFedora 18 19 20 21 || rlIsRHEL 5 6 7; then + rlRun "postgresql-setup initdb" + else + rlRun "postgresql-setup --initdb" + fi +} + dtf_postgresql_data_mirror() { if test -z "$___mirror_chosen"; then diff --git a/postgresql-tests/tasks/upstream-testsuite/runtest.sh b/postgresql-tests/tasks/upstream-testsuite/runtest.sh new file mode 100644 index 0000000..ff2617f --- /dev/null +++ b/postgresql-tests/tasks/upstream-testsuite/runtest.sh @@ -0,0 +1,30 @@ +export DTF_TEST_ID="upstream-testsuite" +export DTF_TEST_DESCRIPTION="Check package upstream testsuite" + +run() +{ + dtf_postgresql_test_init + + dtf_postgresql_initdb + rlAssert0 "test initdb finished successfully" $? + + rlServiceStart postgresql + dtf_postgresql_check_started + + local where="$(rpm --eval "%_libdir")" + where+="/pgsql/test/regress/" + + su - postgres -c "make -C '$where' check" + rlAssert0 "regression testing should success" $? + + find "$where" -name 'regression.diffs' | \ + while read line; do + echo "file $line" + cat "$line" + done + + rlServiceStop postgresql + dtf_postgresql_check_stopped + + dtf_postgresql_test_finish +} |