Skip to content

Instantly share code, notes, and snippets.

@gacarrillor
Last active March 12, 2024 16:41
Show Gist options
  • Save gacarrillor/e3e7dfec713c660b866d6a601bbbf7b1 to your computer and use it in GitHub Desktop.
Save gacarrillor/e3e7dfec713c660b866d6a601bbbf7b1 to your computer and use it in GitHub Desktop.
Running QGIS Processing tests

Running processing (yamls based) tests

export LD_LIBRARY_PATH=/docs/dev/qgis/QGIS/build_duplicate_nodes/output/lib/
export PYTHONPATH=/docs/dev/qgis/QGIS/build_duplicate_nodes/output/python/:/docs/dev/qgis/QGIS/tests/src/python:/docs/dev/    qgis/QGIS/build_duplicate_nodes/output/python/plugins
export QGIS_PREFIX_PATH=/docs/dev/qgis/QGIS/build_duplicate_nodes/output

/docs/dev/qgis/QGIS/python/plugins/processing$ python3 tests/QgisAlgorithmsTest4.py

Run other Python tests

QGIS_PREFIX_PATH=output PYTHONPATH=output/python:$PYTHONPATH python3 /docs/dev/qgis/core/QGIS/tests/src/python/test_plugindependencies.py

Specific test

QGIS_PREFIX_PATH=output PYTHONPATH=output/python:$PYTHONPATH python3 tests/src/python/test_provider_postgres.py TestPyQgsPostgresProvider.testNoDefaultValueClauseForPKWithNoDefaultValue

PG tests

In /etc/postgresql-common/pg_service.conf:

[qgis_test]
host=localhost
port=5432
user=postgres
password=postgres
dbname=qgis_test_db

Follow instructions from https://github.com/qgis/QGIS/tree/master/tests#postgres

Cpp specific test

output/bin/test_analysis_processing parameterDxfLayers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment