From 371e2dcfba7ab2e322a7d0a32947c8c286794020 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 20 Nov 2014 12:32:13 +0100 Subject: postgresql-odbc-tests: fix working with %_libdir * postgresql-odbc-tests/tasks/upstream-testsuite/runtest.sh: Skip the unused /usr/lib or /usr/lib64 properly. --- .../tasks/upstream-testsuite/runtest.sh | 28 +++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'postgresql-odbc-tests/tasks') diff --git a/postgresql-odbc-tests/tasks/upstream-testsuite/runtest.sh b/postgresql-odbc-tests/tasks/upstream-testsuite/runtest.sh index 1b7da92..013d7b8 100644 --- a/postgresql-odbc-tests/tasks/upstream-testsuite/runtest.sh +++ b/postgresql-odbc-tests/tasks/upstream-testsuite/runtest.sh @@ -4,7 +4,7 @@ distribution tarball." check_libdir() { - test -d "$1" || return 0 + test -d "$1" || return 2 cd "$1" || return 1 su postgres -c "make installcheck" } @@ -12,19 +12,31 @@ check_libdir() run() { local libsubdir="postgresql-odbc/test/" - local dir= local rc=$DTF_RESULT_SUCCESS + local resdir= for i in /usr/lib64 /usr/lib; do - dir="$i/$libsubdir" - check_libdir "$dir" || { - rc="$DTF_RESULT_FAILURE" - cat "$dir/regression.diffs" + local workdir="$i/$libsubdir" + + check_libdir "$workdir" + case "$?" in + 1) + rc="$DTF_RESULT_FAILURE" + cat "$i/regression.diffs" + # fall through + ;& + 0) + resdir="$workdir" + break + ;; + 2) + # skip + ;; + esac break - } done - dtf_generate_results_tarball "$dir" + dtf_generate_results_tarball "$resdir" || return 1 return "$rc" } -- cgit