Skip to content

OSGeoLive MapServer Testing

Seth G edited this page Aug 24, 2018 · 2 revisions

OSGeoLive is a self-contained bootable DVD, USB thumb drive or Virtual Machine based on Lubuntu. MapServer is one of the preinstalled applications. An Overview page is available as well as a Quickstart Guide.

This wiki page includes notes on testing that MapServer works correctly on a new release. The first step is to manually run through the quickstart guide.

Next the script below can be run step by step on the command line to check the basics are working. It is based on the .travis.yml and Makefile found in the MapServer repository.

echo "Basic version check"
mapserv -v

echo "Cloning source for test cases"
cd /home/user
git clone https://github.com/mapserver/mapserver
cd mapserver

echo "Basic Python mapscript test"
python -c "import mapscript;print(mapscript.msGetVersion())"

echo "Python test suite"
cd /home/user/mapserver/mapscript/python
sudo pip install -r requirements-dev.txt
python -m pytest --ignore=tests/cases/imagetest.py --ignore=tests/cases/fonttest.py --ignore=tests/cases/hashtest.py --ignore=tests/cases/pgtest.py --ignore=tests/cases/threadtest.py tests/cases

echo "Python msautotest suite"
cd /home/user/mapserver/msautotest/mspython && python run_all_tests.py

echo "Setup postgres database - change user to match logged in user or FATAL: Peer authentication failed for user postgres"
cd /home/user/mapserver/msautotest
sed -i.bak 's/-U postgres/-U user/g' create_postgis_test_data.sh
bash create_postgis_test_data.sh

AUTOTEST_OPTS=-strict -q
cd /home/user/mapserver
cd /home/user/mapserver/msautotest/wxs && chmod 777 tmp && rm -f result/* && ./run_test.py $(AUTOTEST_OPTS)
cd /home/user/mapserver/msautotest/renderers  && rm -f result/* && ./run_test.py $(AUTOTEST_OPTS)
cd /home/user/mapserver/msautotest/renderers  && rm -f result/* && ./run_test.py $(AUTOTEST_OPTS)
cd /home/user/mapserver/msautotest/misc  && rm -f result/* && ./run_test.py $(AUTOTEST_OPTS)
cd /home/user/mapserver/msautotest/gdal  && rm -f result/* && ./run_test.py $(AUTOTEST_OPTS)
cd /home/user/mapserver/msautotest/query  && rm -f result/* && ./run_test.py $(AUTOTEST_OPTS)
bash /home/user/mapserver/print-test-results.sh

Note several msautotest will fail as the generated images will not exactly match the versions saved in the MapServer repository, as they were created on a different operating system. See https://github.com/mapserver/mapserver/issues/5617 for similar issues. Ideally a set of OSGeoLive/Lubuntu images would be created to compare against.

Clone this wiki locally