mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Create a runner for the feature tests.
This commit is contained in:
parent
34518d328e
commit
bd917f2348
37
ci/run_feature_tests.sh
Executable file
37
ci/run_feature_tests.sh
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "EXECUTING: Feature tests"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "Starting virtual frame buffer..."
|
||||||
|
echo
|
||||||
|
|
||||||
|
Xvfb -ac :99 -screen 0 1280x1024x16 &
|
||||||
|
FB_PID=$!
|
||||||
|
export DISPLAY=:99
|
||||||
|
|
||||||
|
echo "Creating Python ${PYTHON_VERSION} virtual environment..."
|
||||||
|
echo
|
||||||
|
|
||||||
|
cd $WORKSPACE/
|
||||||
|
|
||||||
|
PYTHON_SUFFIX=""
|
||||||
|
|
||||||
|
if [[ "$PYTHON_VERSION" == 3* ]]; then
|
||||||
|
PYTHON_SUFFIX="3"
|
||||||
|
fi
|
||||||
|
|
||||||
|
/usr/bin/virtualenv -p /usr/local/python-$PYTHON_VERSION/bin/python$PYTHON_SUFFIX $WORKSPACE/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
|
||||||
|
. $WORKSPACE/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
|
||||||
|
$WORKSPACE/pgadmin-venv/bin/pip install -r requirements.txt || { echo 'ERROR: Failed to install the application requirements.' ; exit 1; }
|
||||||
|
$WORKSPACE/pgadmin-venv/bin/pip install -r web/regression/requirements.txt || { echo 'ERROR: Failed to install the regression test requirements.' ; exit 1; }
|
||||||
|
|
||||||
|
echo "Running regression tests..."
|
||||||
|
echo
|
||||||
|
|
||||||
|
$WORKSPACE/pgadmin-venv/bin/python $WORKSPACE/web/regression/runtests.py --pkg feature_tests || { echo 'ERROR: Error detected when running the Feature tests.' ; exit 1; }
|
||||||
|
|
||||||
|
echo "Cleaning up..."
|
||||||
|
echo
|
||||||
|
|
||||||
|
kill $FB_PID
|
@ -3,13 +3,6 @@
|
|||||||
echo "EXECUTING: Python tests"
|
echo "EXECUTING: Python tests"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "Starting virtual frame buffer..."
|
|
||||||
echo
|
|
||||||
|
|
||||||
Xvfb -ac :99 -screen 0 1280x1024x16 &
|
|
||||||
FB_PID=$!
|
|
||||||
export DISPLAY=:99
|
|
||||||
|
|
||||||
echo "Creating Python ${PYTHON_VERSION} virtual environment..."
|
echo "Creating Python ${PYTHON_VERSION} virtual environment..."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@ -31,7 +24,3 @@ echo
|
|||||||
|
|
||||||
$WORKSPACE/pgadmin-venv/bin/python $WORKSPACE/web/regression/runtests.py --exclude feature_tests || { echo 'ERROR: Error detected when running the Python tests.' ; exit 1; }
|
$WORKSPACE/pgadmin-venv/bin/python $WORKSPACE/web/regression/runtests.py --exclude feature_tests || { echo 'ERROR: Error detected when running the Python tests.' ; exit 1; }
|
||||||
|
|
||||||
echo "Cleaning up..."
|
|
||||||
echo
|
|
||||||
|
|
||||||
kill $FB_PID
|
|
||||||
|
Loading…
Reference in New Issue
Block a user