forked from ConservationInternational/trends.earth
-
Notifications
You must be signed in to change notification settings - Fork 2
/
rundockertests.bat
24 lines (19 loc) · 1.12 KB
/
rundockertests.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@echo off
REM Run docker tests on your local machine
set PLUGIN_NAME="LDMP"
set CONTAINER=trendsearth_qgis_1
set DOCKER_RUN_COMMAND=docker exec -it %CONTAINER% sh -c
REM docker-compose down -v
docker-compose up -d
REM Setup docker instance
%DOCKER_RUN_COMMAND% "qgis_setup.sh %PLUGIN_NAME%"
%DOCKER_RUN_COMMAND% "cd /tests_directory && git submodule update --init --recursive"
%DOCKER_RUN_COMMAND% "cd /tests_directory && invoke testdata-sync"
%DOCKER_RUN_COMMAND% "cd /tests_directory && invoke zipfile-build -t -f /LDMP.zip"
%DOCKER_RUN_COMMAND% "unzip -qq -o /LDMP.zip -d /"
%DOCKER_RUN_COMMAND% "rm -f /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/%PLUGIN_NAME%"
%DOCKER_RUN_COMMAND% "ln -s /LDMP/ /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/%PLUGIN_NAME%"
docker cp trends.earth_test_user_credentials.json %CONTAINER%:/LDMP/test/trends.earth_test_user_credentials.json
docker cp trends.earth_admin_user_credentials.json %CONTAINER%:/LDMP/test/trends.earth_admin_user_credentials.json
REM Run the tests
%DOCKER_RUN_COMMAND% "cd /LDMP && /usr/bin/test_runner/qgis_testrunner.sh LDMP.test.testplugin"