Merge pull request #275389 from NixOS/gdal-tests-correct-binary
gdal: call correct binaries in tests
This commit is contained in:
commit
3eb3e297c3
1 changed files with 9 additions and 11 deletions
|
@ -4,33 +4,31 @@ let
|
||||||
inherit (gdal) pname version;
|
inherit (gdal) pname version;
|
||||||
|
|
||||||
in
|
in
|
||||||
runCommand "${pname}-tests" {
|
runCommand "${pname}-tests" { meta.timeout = 60; }
|
||||||
nativeBuildInputs = [ gdal ];
|
''
|
||||||
meta.timeout = 60;
|
|
||||||
} ''
|
|
||||||
# test version
|
# test version
|
||||||
ogrinfo --version \
|
${gdal}/bin/ogrinfo --version \
|
||||||
| grep 'GDAL ${version}'
|
| grep 'GDAL ${version}'
|
||||||
|
|
||||||
gdalinfo --version \
|
${gdal}/bin/gdalinfo --version \
|
||||||
| grep 'GDAL ${version}'
|
| grep 'GDAL ${version}'
|
||||||
|
|
||||||
|
|
||||||
# test formats
|
# test formats
|
||||||
ogrinfo --formats \
|
${gdal}/bin/ogrinfo --formats \
|
||||||
| grep 'GPKG.*GeoPackage'
|
| grep 'GPKG.*GeoPackage'
|
||||||
|
|
||||||
gdalinfo --formats \
|
${gdal}/bin/gdalinfo --formats \
|
||||||
| grep 'GTiff.*GeoTIFF'
|
| grep 'GTiff.*GeoTIFF'
|
||||||
|
|
||||||
|
|
||||||
# test vector file
|
# test vector file
|
||||||
echo -e "Latitude,Longitude,Name\n48.1,0.25,'Test point'" > test.csv
|
echo -e "Latitude,Longitude,Name\n48.1,0.25,'Test point'" > test.csv
|
||||||
ogrinfo ./test.csv
|
${gdal}/bin/ogrinfo ./test.csv
|
||||||
|
|
||||||
|
|
||||||
# test raster file
|
# test raster file
|
||||||
gdal_create \
|
${gdal}/bin/gdal_create \
|
||||||
-a_srs "EPSG:4326" \
|
-a_srs "EPSG:4326" \
|
||||||
-of GTiff \
|
-of GTiff \
|
||||||
-ot UInt16 \
|
-ot UInt16 \
|
||||||
|
@ -40,7 +38,7 @@ runCommand "${pname}-tests" {
|
||||||
-co COMPRESS=LZW \
|
-co COMPRESS=LZW \
|
||||||
test.tif
|
test.tif
|
||||||
|
|
||||||
gdalinfo ./test.tif
|
${gdal}/bin/gdalinfo ./test.tif
|
||||||
|
|
||||||
touch $out
|
touch $out
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in a new issue