mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
Fix qt5 travis build and update README for Processing tests
This commit is contained in:
parent
3f6e84f959
commit
235f986517
@ -84,6 +84,7 @@ matrix:
|
|||||||
- graphviz
|
- graphviz
|
||||||
- libpq-dev
|
- libpq-dev
|
||||||
- libfcgi-dev
|
- libfcgi-dev
|
||||||
|
- libfftw3-3
|
||||||
- pkg-config
|
- pkg-config
|
||||||
- poppler-utils
|
- poppler-utils
|
||||||
- txt2tags
|
- txt2tags
|
||||||
|
@ -100,23 +100,21 @@ class AlgorithmsTest:
|
|||||||
|
|
||||||
expectFailure = False
|
expectFailure = False
|
||||||
if 'expectedFailure' in defs:
|
if 'expectedFailure' in defs:
|
||||||
exec '\n'.join(defs['expectedFailure'][:-1]) in globals(), locals()
|
exec('\n'.join(defs['expectedFailure'][:-1])) in globals(), locals()
|
||||||
expectFailure = eval(defs['expectedFailure'][-1])
|
expectFailure = eval(defs['expectedFailure'][-1])
|
||||||
|
|
||||||
def doCheck():
|
|
||||||
alg.execute()
|
|
||||||
|
|
||||||
self.check_results(alg.getOutputValuesAsDictionary(), defs['results'])
|
|
||||||
|
|
||||||
if expectFailure:
|
if expectFailure:
|
||||||
try:
|
try:
|
||||||
doCheck()
|
alg.execute()
|
||||||
|
self.check_results(alg.getOutputValuesAsDictionary(), defs['results'])
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
raise _UnexpectedSuccess
|
raise _UnexpectedSuccess
|
||||||
else:
|
else:
|
||||||
doCheck()
|
alg.execute()
|
||||||
|
self.check_results(alg.getOutputValuesAsDictionary(), defs['results'])
|
||||||
|
|
||||||
|
|
||||||
def load_params(self, params):
|
def load_params(self, params):
|
||||||
"""
|
"""
|
||||||
|
@ -54,6 +54,23 @@ The above translates to
|
|||||||
name: expected/polys_densify.gml
|
name: expected/polys_densify.gml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For GRASS 7 raster outputs
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
If you want to create a test for a GRASS 7 module which exports a raster output, you will need extra steps. There isa great chance that your GRASS 7 installation will be different from the Travis-Ci environment (for the moment, it is provided by [osgeo4travis archive]( and it is based on GRASS 7.0.2). It means that your raster hashes will be different from the ones produced in Travis-Ci (GRASS adds a metadata which contains the GRASS version in the GTiff).
|
||||||
|
|
||||||
|
Here are a few instructions (for Debian based GNU/Linux distributions) to assure you use the same version of GRASS than in Travis-Ci:
|
||||||
|
|
||||||
|
* Install osgeo4travis binaries into your home directory:
|
||||||
|
`curl -L https://github.com/opengisch/osgeo4travis/archive/qt4bin.tar.gz | tar -xzC ${HOME} --strip-components=1`
|
||||||
|
* Modify the grass70 script which incorporates a hardlink to /home/travis:
|
||||||
|
`sed -i 's#/home/travis#'${HOME}'#g' ${HOME}/osgeo4travis/bin/grass70`
|
||||||
|
* Launch QGIS with the following command:
|
||||||
|
`PATH=${HOME}/osgeo4travis/bin:$PATH LD_LIBRARY_PATH=${HOME}/osgeo4travis/lib:$LD_LIBRARY_PATH qgis`
|
||||||
|
|
||||||
|
From now, you will be using osgeo4travis GRASS 7 installation in QGIS Processing and you can proceed with the above method to easily produce unit tests.
|
||||||
|
|
||||||
|
|
||||||
Params and results
|
Params and results
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user