[QGIS-Developer] Unit tests: compare images is failing in my local setup

Sandro Santilli strk at kbt.io
Fri Feb 7 01:07:15 PST 2020


On Wed, Feb 05, 2020 at 03:40:43PM +0000, Jorge Gustavo Rocha wrote:
> Hi devs,
> 
> In my local development setup (Ubuntu 18.04, Qt 5.11.1), my unit tests
> are failing when comparing images. (I'm running these tests on master,
> to make sure everything is ok. The tests are working properly on CI.)

[...]

> The images are available at: http://webgis.di.uminho.pt/~jgr/QGIS/images.zip
> 
> In fact, the images have different sizes on the file system. I don't
> know why.
> 
> -rw-r--r-- 1 jgr jgr 175786 mai 29  2019 WMS_GetPrint_TwoMaps.png
> -rw-r--r-- 1 jgr jgr 176003 fev  5 15:19 WMS_GetPrint_TwoMaps_result.png
> -rw-r--r-- 1 jgr jgr  31288 fev  5 15:19 WMS_GetPrint_TwoMaps_result_diff.png
> 
> My libpng-dev version is 1.6.34-2ubuntu0.1.

I would suggest to make the test tolerant to difference in file size,
and only rely on pixel equality (which you say you obtain).

The inability to successfully run QGIS tests locally is a stress point
for me as well. I think it should be improved as much as possible to
make contributing to the project a pleasure.

--strk;


More information about the QGIS-Developer mailing list