Skip to content

Commit

Permalink
systemtest: when finding multiple psql binaries, select the first
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Oct 15, 2020
1 parent 15397ad commit a6ebc10
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions systemtests/environment.in
Expand Up @@ -107,10 +107,11 @@ export PYTHON_EXECUTABLE=@PYTHON_EXECUTABLE@

export OVIRT_SERVER=@ovirt_server@

# real postgres binaries are hidden on debian, instead there are wrappers
# which we do not want for our tests
# Real postgres binaries are hidden on debian, instead there are wrappers
# which we do not want for our tests.
# If there are multiple version, select the first.
if [ -d /usr/lib/postgresql ]; then
POSTGRES_BINARY_DIR=$(dirname $(find -L /usr/lib/postgresql | grep psql))
POSTGRES_BINARY_DIR=$(dirname $(find -L /usr/lib/postgresql -name psql | sort | head -n 1))
export PATH=$POSTGRES_BINARY_DIR:$PATH
else
export PATH=/sbin:/usr/sbin:$PATH
Expand Down

0 comments on commit a6ebc10

Please sign in to comment.