Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qgis: enable tests #267919

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
177 changes: 176 additions & 1 deletion pkgs/applications/gis/qgis/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
, ninja
, openssl
, pdal
, perl
, postgresql
, proj
, protobuf
Expand All @@ -45,6 +46,9 @@
, sqlite
, txt2tags
, zstd
, xfontsel
, xvfb-run
, xorg
}:

let
Expand All @@ -57,6 +61,8 @@ let
};

pythonBuildInputs = with py.pkgs; [
# FIXME: remove not needed packages
# See: https://github.com/qgis/QGIS/blob/master/.docker/qgis3-qt5-build-deps.dockerfile
chardet
gdal
jinja2
Expand Down Expand Up @@ -155,7 +161,10 @@ in mkDerivation rec {
"-DCMAKE_BUILD_TYPE=Release"
"-DWITH_3D=True"
"-DWITH_PDAL=True"
"-DENABLE_TESTS=False"
"-DENABLE_TESTS=True"
"-DHAS_KDE_QT5_PDF_TRANSFORM_FIX=True"
"-DHAS_KDE_QT5_SMALL_CAPS_FIX=True"
"-DHAS_KDE_QT5_FONT_STRETCH_FIX=True"
] ++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF"
++ lib.optional withGrass (let
gmajor = lib.versions.major grass.version;
Expand All @@ -179,6 +188,172 @@ in mkDerivation rec {
--prefix PATH : ${lib.makeBinPath [ grass ]}
'';

doCheck = true;

# List of build dependencies:
# https://github.com/qgis/QGIS/blob/master/.docker/qgis3-qt5-build-deps.dockerfile
nativeCheckInputs = [
wrapQtAppsHook
python3.pkgs.nose2
python3.pkgs.mock
(perl.withPackages(p: [ p.YAMLTiny ])) # required for tests/code_layout/sipify
qtbase
xfontsel
xorg.xauth
xvfb-run
];

preCheck = ''
export QT_PLUGIN_PATH="${qtbase}/${qtbase.qtPluginPrefix}"
export QT_QPA_PLATFORM_PLUGIN_PATH=${qtbase.bin}/lib/qt-${qtbase.version}/plugins/platforms
export QGIS_PREFIX_PATH="output"
'';

checkPhase = ''
runHook preCheck
xvfb-run -a -n 1 -s '-screen 0 1280x1024x24 -dpi 96' ctest --label-exclude POSTGRES --exclude-regex '^(${lib.concatStringsSep "|" disabledTests})$'
runHook postCheck
'';

# List of excluded tests:
# https://github.com/qgis/QGIS/blob/master/.ci/test_blocklist_qt5.txt
# List of flaky tests:
# https://github.com/qgis/QGIS/blob/master/.ci/test_flaky.txt
disabledTests = [
"ProcessingGrass7.*"
"ProcessingOtbAlgorithmsTest"
"ProcessingGdalAlgorithmsVectorTest"

# Subprocess aborted
"test_gui_queryresultwidget"
"test_gui_filedownloader"
"test_provider_wcsprovider"

# Failing tests:
# 29 - test_core_application (Failed)
# 35 - test_core_authmanager (Failed)
# 40 - test_core_callout (Failed)
# 45 - test_core_colorschemeregistry (Failed)
# 46 - test_core_compositionconverter (Failed)
# 48 - test_core_coordinatereferencesystemregistry (Failed)
# 54 - test_core_datadefinedsizelegend (Failed)
# 55 - test_core_dataitem (Failed)
# 59 - test_core_dxfexport (Failed)
# 62 - test_core_expression (Failed)
# 69 - test_core_fontmarker (Failed)
# 70 - test_core_fontutils (Failed)
# 72 - test_core_gdalutils (Failed)
# 88 - test_core_labelingengine (Failed)
# 99 - test_core_layoutlabel (Failed)
# 100 - test_core_layoutmanualtable (Failed)
# 101 - test_core_layoutmap (Failed)
# 102 - test_core_layoutmapgrid (Failed)
# 108 - test_core_layoutpicture (Failed)
# 110 - test_core_layoutscalebar (Failed)
# 112 - test_core_layouttable (Failed)
# 114 - test_core_layoututils (Failed)
# 115 - test_core_legendrenderer (Failed)
# 117 - test_core_mapdevicepixelratio (Failed)
# 121 - test_core_maprendererjob (Failed)
# 122 - test_core_maprotation (Failed)
# 131 - test_core_mesheditor (Failed)
# 132 - test_core_meshlayer (Subprocess aborted)
# 133 - test_core_meshlayerinterpolator (Failed)
# 134 - test_core_meshlayerrenderer (Subprocess aborted)
# 136 - test_core_networkaccessmanager (Subprocess aborted)
# 140 - test_core_offlineediting (Subprocess aborted)
# 148 - test_core_pallabeling (Failed)
# 151 - test_core_pointcloudlayerexporter (Failed)
# 157 - test_core_projectstorage (Failed)
# 168 - test_core_rasterlayer (Failed)
# 177 - test_core_settingsentry (Failed)
# 191 - test_core_style (Failed)
# 193 - test_core_svgmarker (Failed)
# 213 - test_core_vectortilelayer (Failed)
# 223 - test_core_coordinatereferencesystem (Failed)
# 263 - test_gui_mapcanvas (Failed)
# 268 - test_gui_processinggui (Failed)
# 283 - test_gui_valuerelationwidgetwrapper (Failed)
# 289 - test_gui_newdatabasetablewidget (Failed)
# 293 - test_gui_meshlayerpropertiesdialog (Subprocess aborted)
# 307 - test_3d_mesh3drendering (Failed)
# 313 - test_analysis_processingalgspt1 (Failed)
# 314 - test_analysis_processingalgspt2 (Failed)
# 322 - test_analysis_meshcalculator (Subprocess aborted)
# 323 - test_analysis_meshcontours (Subprocess aborted)
# 325 - test_analysis_gcptransformer (Failed)
# 326 - test_analysis_processingpdalalgs (Subprocess aborted)
# 327 - test_analysis_processing (Failed)
# 328 - test_geometry_checker_geometrychecks (Failed)
# 334 - test_provider_wmsprovider (Subprocess aborted)
# 339 - test_provider_mdalprovider (Subprocess aborted)
# 340 - test_provider_virtualrasterprovider (Subprocess aborted)
# 341 - test_provider_eptprovider (Failed)
# 344 - test_provider_pdalprovider (Subprocess aborted)
# 345 - qgis_grassprovidertest8 (Subprocess aborted)
# 356 - test_app_layerpropertiesdialogs (Failed)
# 359 - test_app_maptooleditannotation (Failed)
# 360 - test_app_maptoolidentifyaction (Failed)
# 361 - test_app_maptoollabel (Failed)
# 367 - test_app_maptooleditmesh (Failed)
# 382 - test_app_projectproperties (Failed)
# 384 - test_app_meshcalculatordialog (Subprocess aborted)
# 389 - test_app_qgisapppython (Subprocess aborted)
# 412 - PyQgsAnnotation (Failed)
# 433 - PyQgsBlockingProcess (Failed)
# 460 - PyQgsConnectionRegistry (Failed)
# 473 - PyQgsDatumTransform (Failed)
# 488 - PyQgsExternalStorageWebDav (Failed)
# 489 - PyQgsExternalStorageAwsS3 (Failed)
# 494 - PyQgsFieldFormattersTest (Failed)
# 512 - PyQgsFileUtils (Failed)
# 520 - PyQgsGeometryGeneratorSymbolLayer (Failed)
# 521 - PyQgsGeometryTest (Failed)
# 530 - PyQgsGroupLayer (Failed)
# 531 - PyQgsHashLineSymbolLayer (Failed)
# 533 - PyQgsHighlight (Failed)
# 547 - PyQgsLayerMetadataProviderPython (Failed)
# 558 - PyQgsLayoutExporter (Failed)
# 566 - PyQgsLayoutHtml (Failed)
# 593 - PyQgsLineSymbolLayers (Failed)
# 599 - PyQgsMapCanvas (Failed)
# 600 - PyQgsMapCanvasAnnotationItem (Failed)
# 636 - PyQgsNullSymbolRenderer (Failed)
# 644 - PyQgsOGRProviderGpkg (Failed)
# 651 - PyQgsPalLabelingBase (Failed)
# 652 - PyQgsPalLabelingCanvas (Failed)
# 653 - PyQgsPalLabelingLayout (Failed)
# 654 - PyQgsPalLabelingPlacement (Failed)
# 671 - PyQgsProcessExecutablePt1 (Failed)
# 672 - PyQgsProcessExecutablePt2 (Failed)
# 684 - PyQgsProjectionSelectionWidgets (Failed)
# 693 - PyQgsProviderConnectionGpkg (Failed)
# 694 - PyQgsProviderConnectionSpatialite (Failed)
# 709 - PyQgsRasterAttributeTable (Failed)
# 710 - PyQgsRasterAttributeTableModel (Failed)
# 712 - PyQgsRasterFileWriter (Failed)
# 714 - PyQgsRasterLayer (Failed)
# 725 - PyQgsRasterTransparencyWidget (Failed)
# 739 - PyQgsRubberBand (Failed)
# 743 - PyQgsSingleSymbolRenderer (Failed)
# 753 - PyQgsOGRProvider (Failed)
# 765 - PyQgsSpatialiteProvider (Failed)
# 771 - PyQgsSymbolLayerReadSld (Failed)
# 772 - PyQgsArrowSymbolLayer (Failed)
# 773 - PyQgsSymbolExpressionVariables (Failed)
# 802 - PyQgsVectorFileWriter (Failed)
# 808 - PyQgsVectorLayerEditBuffer (Failed)
# 821 - PyQgsVirtualLayerProvider (Failed)
# 825 - PyQgsWFSProvider (Failed)
# 829 - PyQgsLayerDependencies (Failed)
# 831 - PyQgsDBManagerGpkg (Failed)
# 832 - PyQgsDBManagerSpatialite (Failed)
# 837 - PyQgsSettingsTreeNode (Failed)
# 842 - PyQgsAuxiliaryStorage (Failed)
# 847 - PyQgsSelectiveMasking (Failed)
# 855 - PyQgsRasterAttributeTableWidget (Failed)
];

meta = with lib; {
description = "A Free and Open Source Geographic Information System";
homepage = "https://www.qgis.org";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pyqt/sip.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

buildPythonPackage rec {
pname = "pyqt5-sip";
version = "12.11.0";
version = "12.13.0";

src = fetchPypi {
pname = "PyQt5_sip";
inherit version;
hash = "sha256-tHEP2FtX7e9xbMVfrkW/1b+sb8e6kQNvHcw/Mxyg6zk=";
hash = "sha256-fzIdr4S5ydvKYbgOHvN72v/A6TMS7a4s19oluVOXHZE=";
};

# There is no test code and the check phase fails with:
Expand Down
3 changes: 3 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30301,6 +30301,9 @@ with pkgs;

qgis = callPackage ../applications/gis/qgis { };

# FIXME: remove qgis-unwrapped
qgis-unwrapped = libsForQt5.callPackage ../applications/gis/qgis/unwrapped.nix { };

qmapshack = libsForQt5.callPackage ../applications/gis/qmapshack { };

saga = callPackage ../applications/gis/saga {
Expand Down