GDAL2/autotest
Even Rouault 73839c499a
PNG: fix reading 16-bit interlaced images (on little-endian machines)
Fixes https://lists.osgeo.org/pipermail/gdal-dev/2024-December/059989.html
2024-12-28 18:01:59 +01:00
..
alg GDALRasterizeLayers(): do not emit warning about missing SRS if the target raster dataset has no SRS 2024-12-18 17:57:32 +01:00
benchmark Remove lines with '$Id$' in source files 2024-11-24 19:33:53 +01:00
cpp autotest: fix Coverity Scan warning 2024-12-22 21:24:02 +01:00
gcore [gdal][api] GDALDriverHasOpenOption (#11517) 2024-12-20 18:24:27 +01:00
gdrivers PNG: fix reading 16-bit interlaced images (on little-endian machines) 2024-12-28 18:01:59 +01:00
gnm Remove lines with '$Id$' in source files 2024-11-24 19:33:53 +01:00
ogc_cite_testing Remove lines with '$Id$' in source files 2024-11-24 19:33:53 +01:00
ogr Merge pull request #11543 from rouault/fix_11519 2024-12-26 16:31:59 +01:00
osr OGRSpatialReference::importFromEPSG(): tries with ESRI when it looks like an ESRI code, but with a warning when that succeeds 2024-11-29 19:55:44 +01:00
postinstall Merge pull request #11303 from rouault/rfc104 2024-12-12 13:02:36 +01:00
proj_grids OGR_CT: handle point motion operations (PROJ >= 9.4) 2023-09-15 11:41:53 +02:00
pymod gdalbuildvrt: Emit warning on invalid value for -vrtnodata 2024-12-15 18:24:20 -05:00
pyscripts test_ogrmerge.py: avoid failure on ASAN CI config 2024-12-03 19:32:15 +01:00
slow_tests Remove lines with '$Id$' in source files 2024-11-24 19:33:53 +01:00
utilities gdal raster edit/reproject: use --bbox instead of --extent 2024-12-20 23:51:11 +01:00
.gitignore Update .gitignore with files generated during a Linux build/test (#4525) [ci skip] 2021-09-22 11:31:37 +02:00
CMakeLists.txt autotest: run Python tests directly from source tree on Windows (#9224) 2024-04-18 11:28:21 +02:00
README.md autotest/README.md: more tips [ci skip] 2019-04-19 21:45:58 +02:00
asan_suppressions.txt CI ASAN: port to Ubuntu 20.04 (fixes #5124) 2022-01-17 23:26:16 +01:00
conftest.py remove Python2 crumbs 2024-11-11 23:22:22 +01:00
generate_parquet_test_file.py Remove lines with '$Id$' in source files 2024-11-24 19:33:53 +01:00
lsan_suppressions.txt CI: update ASAN job to Ubuntu 22.04 2024-03-14 01:38:48 +01:00
requirements.txt Revert "requirements.txt: add pin for importlib-resources to avoid issue with pytest with jsonschema" 2024-04-06 19:22:54 +02:00
run_slow_tests.sh Add autotest/slow_tests and a CI job to run them 2023-12-19 02:59:56 +01:00
test_random_tiff.py Remove lines with '$Id$' in source files 2024-11-24 19:33:53 +01:00
valgrind-gdal.supp Autotest: Add a Valgrind suppression file 2023-02-14 14:14:10 -05:00

README.md

GDAL test suite

How to run tests

  1. You need to install pytest to run the test suite. This should do it:
cd autotest
pip install -r ./requirements.txt
  1. Then, run tests with:
pytest
  1. Some quick usage tips:
# get more verbose output; don't capture stdout/stdin
pytest -vvs

# run all the gcore tests
pytest gcore/

# run a particular module only
pytest gcore/basic_test.py

# run a particular test case in a module
pytest gcore/basic_test.py::test_basic_test_1

Full documentation of pytest at https://docs.pytest.org/en/latest/

GDAL's tests are not independent

GDAL's test functions are not currently independent of each other. In particular, running individual test functions from a given module may not work. Most tests were originally written with the assumption that entire modules will be run at once.

Practically, this means that you should avoid using:

  • pytest's --last-failed / --lf option (since it runs only failed tests, not the whole module)
  • test specifiers that run individual tests (e.g. pytest gcore/basic_test.py::test_basic_test_1 )
  • the xunit plugin to run tests in parallel, unless you also use --dist=loadfile. (This may have other issues; untested)

This will hopefully be addressed in the future. When writing new tests, please try to make them independent of each other.

Notes about availability of GDAL sample and test data

The GDAL Team makes every effort to assure that all sample data files available from GDAL download server (http://download.osgeo.org/gdal/data/) and test data files used in GDAL Autotest package (https://github.com/OSGeo/gdal/tree/master/autotest) are available as public and freely redistributable geodata.

--

http://gdal.org/