8000 [CI] An initization of python virtualenv is simplified · postgrespro/testgres@62d1d20 · GitHub
[go: up one dir, main page]

Skip to content

Commit 62d1d20

Browse files
[CI] An initization of python virtualenv is simplified
Let's avoid creating useless environment variables.
1 parent 126608d commit 62d1d20

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

run_tests.sh

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,17 @@ if [ -z ${TEST_FILTER+x} ]; \
88
then export TEST_FILTER="TestgresTests or (TestTestgresCommon and (not remote_ops))"; \
99
fi
1010

11-
# choose python version
12-
echo python version is $PYTHON_VERSION
13-
VIRTUALENV="virtualenv --python=/usr/bin/python$PYTHON_VERSION"
14-
PIP="pip$PYTHON_VERSION"
15-
1611
# fail early
1712
echo check that pg_config is in PATH
1813
command -v pg_config
1914

20-
# prepare environment
21-
VENV_PATH=/tmp/testgres_venv
15+
# prepare python environment
16+
VENV_PATH="/tmp/testgres_venv"
2217
rm -rf $VENV_PATH
23-
$VIRTUALENV $VENV_PATH
18+
virtualenv --python="/usr/bin/python${PYTHON_VERSION}" "${VENV_PATH}"
2419
export VIRTUAL_ENV_DISABLE_PROMPT=1
25-
source $VENV_PATH/bin/activate
26-
27-
# install utilities
28-
$PIP install coverage flake8 psutil Sphinx pytest pytest-xdist psycopg2 six psutil
20+
source "${VENV_PATH}/bin/activate"
21+
pip install coverage flake8 psutil Sphinx pytest pytest-xdist psycopg2 six psutil
2922

3023
# install testgres' dependencies
3124
export PYTHONPATH=$(pwd)

0 commit comments

Comments
 (0)
0