QGIS/tests/env.sh.in
Sandro Santilli e4ec6f0700 Provide a sourceable shell script setting up test environment
Testing locally becomes as simple as (from build dir):

  . tests/env.sh
  python ${srcdir}/tests/src/python/test_provider_postgres.py
2024-06-23 15:44:32 +02:00

22 lines
555 B
Bash

# Source this to configure environment in a way to make
# it easy to run python tests manually.
#
# See tests/README.md in source dir
#
_srcdir=@CMAKE_SOURCE_DIR@
_builddir=@CMAKE_BINARY_DIR@
if expr "${_builddir}" : "@" > /dev/null || test -z "${_builddir}" ||
expr "${_srcdir}" : "@" > /dev/null || test -z "${_srcdir}"
then
echo "This File, it wasn't generated properly." >&2
return 1
fi
export srcdir=${_srcdir}
export builddir=${_builddir}
export QGIS_PREFIX_PATH=${builddir}/output
export PYTHONPATH=${builddir}/output/python:$PYTHONPATH