Skip to content

Commit

Permalink
pkgs(gdal): call correct binaries in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imincik committed Dec 22, 2023
1 parent 32e4aa3 commit 6f5bec5
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions pkgs/gdal/tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,31 @@ let
inherit (gdal) pname version;

in
runCommand "${pname}-tests" {
nativeBuildInputs = [ gdal ];
meta.timeout = 60;
} ''
runCommand "${pname}-tests" { meta.timeout = 60; }
''
# test version
ogrinfo --version \
${gdal}/bin/ogrinfo --version \
| grep 'GDAL ${version}'
gdalinfo --version \
${gdal}/bin/gdalinfo --version \
| grep 'GDAL ${version}'
# test formats
ogrinfo --formats \
${gdal}/bin/ogrinfo --formats \
| grep 'GPKG.*GeoPackage'
gdalinfo --formats \
${gdal}/bin/gdalinfo --formats \
| grep 'GTiff.*GeoTIFF'
# test vector file
echo -e "Latitude,Longitude,Name\n48.1,0.25,'Test point'" > test.csv
ogrinfo ./test.csv
${gdal}/bin/ogrinfo ./test.csv
# test raster file
gdal_create \
${gdal}/bin/gdal_create \
-a_srs "EPSG:4326" \
-of GTiff \
-ot UInt16 \
Expand All @@ -40,7 +38,7 @@ runCommand "${pname}-tests" {
-co COMPRESS=LZW \
test.tif
gdalinfo ./test.tif
${gdal}/bin/gdalinfo ./test.tif
touch $out
''

0 comments on commit 6f5bec5

Please sign in to comment.