git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #166012 from risicle/ris-gdal-tests

gdal: enable tests

commit2a693d5b1316f993ae3a7f2b5e5d296cf1826b1b authorRobert Scott <code@humanleg.org.uk> dateSun 3 Apr 2022, 23:07 (5 years ago) parente6a7acde52d6c1
1 file changed+40
pkgs/development/libraries/gdal/default.nix+40
pkgs/development/libraries/gdal/default.nix+40
@@ -86,6 +86,46 @@ stdenv.mkDerivation rec {
8686
8787 enableParallelBuilding = true;
8888
89+ doInstallCheck = true;
90+ # preCheck rather than preInstallCheck because this is what pytestCheckHook
91+ # calls (coming from the python world)
92+ preCheck = ''
93+ pushd ../autotest
94+ # something has made files here read-only by this point
95+ chmod -R u+w .
96+
97+ export HOME=$(mktemp -d)
98+ export PYTHONPATH="$out/${pythonPackages.python.sitePackages}:$PYTHONPATH"
99+ '';
100+ installCheckInputs = with pythonPackages; [
101+ pytestCheckHook
102+ pytest-env
103+ lxml
104+ ];
105+ disabledTestPaths = [
106+ # tests that attempt to make network requests
107+ "gcore/vsis3.py"
108+ "gdrivers/gdalhttp.py"
109+ "gdrivers/wms.py"
110+ ];
111+ disabledTests = [
112+ # tests that attempt to make network requests
113+ "test_jp2openjpeg_45"
114+ # tests that require the full proj dataset which we don't package yet
115+ # https://github.com/OSGeo/gdal/issues/5523
116+ "test_transformer_dem_overrride_srs"
117+ "test_osr_ct_options_area_of_interest"
118+ ] ++ lib.optionals (!stdenv.isx86_64) [
119+ # likely precision-related expecting x87 behaviour
120+ "test_jp2openjpeg_22"
121+ ] ++ lib.optionals stdenv.isDarwin [
122+ # flaky on macos
123+ "test_rda_download_queue"
124+ ];
125+ postCheck = ''
126+ popd # ../autotest
127+ '';
128+
89129 meta = {
90130 description = "Translator library for raster geospatial data formats";
91131 homepage = "https://www.gdal.org/";