forked from ConservationInternational/cplus-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-tests.sh
More file actions
37 lines (25 loc) · 1.06 KB
/
run-tests.sh
File metadata and controls
37 lines (25 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
QGIS_IMAGE=qgis/qgis
QGIS_IMAGE_latest=latest
QGIS_IMAGE_V_3_26=release-3_26
QGIS_VERSION_TAGS=($QGIS_IMAGE_latest $QGIS_IMAGE_V_3_26)
export IMAGE=$QGIS_IMAGE
python admin.py build --tests
for TAG in "${QGIS_VERSION_TAGS[@]}"
do
echo "Running tests for QGIS $TAG"
export QGIS_VERSION_TAG=$TAG
export WITH_PYTHON_PEP=false
export ON_TRAVIS=false
export MUTE_LOGS=true
docker-compose up -d
sleep 10
docker-compose exec -T qgis-testing-environment sh -c "pip3 install flask"
docker-compose exec -T qgis-testing-environment qgis_testrunner.sh test_suite.test_package
# Removing the autogenerated .pyc, .pyo and __pycache__ files that were created during running tests,
# this will enable the admin.py script to clean the build folder without issues next time
# running tests.
docker-compose exec -T qgis-testing-environment sh -c 'find . -type f -name "*.py[c|o]" -delete'
docker-compose exec -T qgis-testing-environment sh -c 'find . -type d -name "__pycache__" -delete'
docker-compose down
done