Skip to content
Browse files

Fix qt5 travis build and update README for Processing tests

  • Loading branch information
Médéric Ribreux Médéric RIBREUX
Médéric Ribreux authored and Médéric RIBREUX committed May 29, 2016
1 parent 3f6e84f commit 235f986517168b955e8aaaa76cf6d2741cb64744
Showing with 24 additions and 8 deletions.
  1. +1 −0 .travis.yml
  2. +6 −8 python/plugins/processing/tests/
  3. +17 −0 python/plugins/processing/tests/
@@ -84,6 +84,7 @@ matrix:
- graphviz
- libpq-dev
- libfcgi-dev
- libfftw3-3
- pkg-config
- poppler-utils
- txt2tags
@@ -100,23 +100,21 @@ def check_algorithm(self, name, defs):

expectFailure = False
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])

def doCheck():

self.check_results(alg.getOutputValuesAsDictionary(), defs['results'])

if expectFailure:
self.check_results(alg.getOutputValuesAsDictionary(), defs['results'])
except Exception:
raise _UnexpectedSuccess
self.check_results(alg.getOutputValuesAsDictionary(), defs['results'])

def load_params(self, params):
@@ -54,6 +54,23 @@ The above translates to
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 | 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

0 comments on commit 235f986

Please sign in to comment.
You can’t perform that action at this time.