From 9e5db410576879c0696370b9818eda088cbdaf2f Mon Sep 17 00:00:00 2001 From: Bborie Park Date: Fri, 24 May 2013 17:27:38 +0000 Subject: [PATCH] Removed unnecessary test due to introduction of ST_FromGDALRaster() git-svn-id: http://svn.osgeo.org/postgis/trunk@11495 b70326c6-7e19-0410-871a-916f4a2858ee --- raster/test/regress/Makefile.in | 5 - raster/test/regress/testgdalraster | 164 -------------------- raster/test/regress/testgdalraster.test | 15 -- raster/test/regress/testgdalraster_expected | 27 ---- 4 files changed, 211 deletions(-) delete mode 100644 raster/test/regress/testgdalraster delete mode 100644 raster/test/regress/testgdalraster.test delete mode 100644 raster/test/regress/testgdalraster_expected diff --git a/raster/test/regress/Makefile.in b/raster/test/regress/Makefile.in index c2314099a..161f746d4 100644 --- a/raster/test/regress/Makefile.in +++ b/raster/test/regress/Makefile.in @@ -154,8 +154,3 @@ check: $(MAKE) -C ../../../regress staged-install $(PERL) ../../../regress/run_test.pl --raster $(RUNTESTFLAGS) $(TESTS) $(PERL) ../../../regress/run_test.pl --upgrade --raster $(RUNTESTFLAGS) $(TESTS) - -testgdalraster: - chmod +x $@ - chmod +x ../../scripts/python/rtgdalraster.py - ./testgdalraster diff --git a/raster/test/regress/testgdalraster b/raster/test/regress/testgdalraster deleted file mode 100644 index ef9cf10e8..000000000 --- a/raster/test/regress/testgdalraster +++ /dev/null @@ -1,164 +0,0 @@ -#!/bin/bash - -POSTGIS_SRC=../../.. -RTGDAL=${POSTGIS_SRC}/raster/scripts/python/rtgdalraster.py -DB=postgis_reg -DBENABLERS="${POSTGIS_SRC}/postgis/postgis.sql ../../rt_pg/rtpostgis.sql" - -PSQL=`which psql` -GDALINFO=`which gdalinfo` - -OPT_DROP=yes -OPT_CREATE=yes - -# create temp -if [ -z "$TMPDIR" ]; then - TMPDIR=/tmp/pgis_reg_$$ -fi - -mkdir -p ${TMPDIR} -echo "TMPDIR is ${TMPDIR}" -echo - -TESTFILE=${POSTGIS_SRC}/raster/test/regress/testgdalraster.test -EXPECTEDFILE=${POSTGIS_SRC}/raster/test/regress/testgdalraster_expected -CHECKSUMFILE=${TMPDIR}/checksum_log -DIFFFILE=${TMPDIR}/checksum_diff - -# testfile doesn't exist -if [ ! -f $TESTFILE ]; then - exit 1 -fi - -while [ -n "$1" ]; do - if test "$1" = "--nodrop"; then - OPT_DROP=no - shift - continue - elif test "$1" = "--nocreate"; then - OPT_CREATE=no - shift - continue - else - break - fi -done - -# create database -db_exists=`${PSQL} -l | grep -w ${DB}` -if test -z "$db_exists"; then - if test x"$OPT_CREATE" = "xyes"; then - echo "Creating spatial db ${DB} " - - createdb "${DB}" > ${TMPDIR}/regress_log - createlang plpgsql "${DB}" >> ${TMPDIR}/regress_log - for f in $DBENABLERS; do - ${PSQL} -f $f "${DB}" >> ${TMPDIR}/regress_log 2>&1 - done - else - - echo "Database ${DB} does not exist" >&2 - echo "Run w/out the --nocreate flag to create it" >&2 - exit 1 - fi -else - if test x"$OPT_CREATE" = "xyes"; then - echo "Database ${DB} already exist." >&2 - echo "Run with the --nocreate flag to use it " \ - "or drop it and try again." >&2 - exit 1 - else - echo "Using existing database ${DB}" - fi -fi - -libver=`${PSQL} -tAc "select postgis_lib_version()" "${DB}"` -if [ -z "$libver" ]; then - echo - echo " Something went wrong (no postgis installed in ${DB})." - if [ -z "$db_exists" ]; then - echo " For details, check ${TMPDIR}/regress_log" - else - echo " Try dropping the database, it will be recreated" \ - " on next run." - fi - echo - exit 1 -fi - -rtlibver=`${PSQL} -tAc "select postgis_raster_lib_version()" "${DB}"` -if [ -z "$rtlibver" ]; then - echo - echo " Something went wrong (no raster installed in ${DB})." - if [ -z "$db_exists" ]; then - echo " For details, check ${TMPDIR}/regress_log" - else - echo " Try dropping the database, it will be recreated" \ - " on next run." - fi - echo - exit 1 -fi - -LC=`wc -l $TESTFILE | awk '{print $1}'` -for x in `seq $LC`; do - ln=`head -n $x $TESTFILE | tail -n 1` - - FORMAT=GTiff - OPTS= - RASTER= - - while IFS=';' read -ra ELE; do - j=0 - for i in "${ELE[@]}"; do - if [ ${#i} -ne 0 ]; then - case "$j" in - "0") - FORMAT="$i" - ;; - "1") - OPTS="$i" - ;; - "2") - RASTER="$i" - ;; - esac - fi - - let j=j+1 - done - done <<< "$ln" - - if [ ${#RASTER} -eq 0 ]; then - continue - fi - if [ ${#FORMAT} -ne 0 ]; then - FORMAT="-f ${FORMAT}" - fi - if [ ${#OPTS} -ne 0 ]; then - OPTS="-c ${OPTS}" - fi - - #echo "format: "$FORMAT - #echo "opts: "$OPTS - #echo "raster: "$RASTER - - $RTGDAL -d "dbname=${DB}" -r "${RASTER}" ${FORMAT} ${OPTS} -o ${TMPDIR}/q${x} >> ${TMPDIR}/rtgdalraster_log - - $GDALINFO -checksum ${TMPDIR}/q${x} | grep Checksum | cut -c 3- >> ${CHECKSUMFILE} -done - -if test x"$OPT_DROP" = "xyes" -a x"$OPT_CREATE" = "xyes"; then - sleep 1 - dropdb "${DB}" > /dev/null -fi - -echo -if diff -c "${EXPECTEDFILE}" "${CHECKSUMFILE}" > ${DIFFFILE}; then - echo "Test passed." -else - cat ${DIFFFILE} - - echo - echo "Test failed." -fi diff --git a/raster/test/regress/testgdalraster.test b/raster/test/regress/testgdalraster.test deleted file mode 100644 index 8fdf2603e..000000000 --- a/raster/test/regress/testgdalraster.test +++ /dev/null @@ -1,15 +0,0 @@ -;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 123.4567, NULL) -GTiff;;ST_AddBand( ST_AddBand( ST_AddBand( ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1) , 1, '64BF', 1234.5678, NULL) , '64BF', 987.654321, NULL) , '64BF', 9876.54321, NULL) -GTiff;;ST_AddBand( ST_AddBand( ST_AddBand( ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1) , 1, '64BF', 1234.5678, -9999) , '64BF', 987.654321, -9999) , '64BF', 9876.54321, -9999) -PNG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', 123, NULL) -PNG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 123, NULL) -PNG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', -123, NULL) -PNG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 254, NULL) -PNG;ZLEVEL=1;ST_AddBand( ST_AddBand( ST_AddBand( ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1) , 1, '8BSI', 1, -1) , 2, '8BSI', 11, -1) , 3, '8BSI', 111, -1) -PNG;ZLEVEL=9;ST_AddBand( ST_AddBand( ST_AddBand( ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1) , 1, '8BSI', 1, -1) , 2, '8BSI', 11, -1) , 3, '8BSI', 111, -1) -JPEG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', 123, NULL) -JPEG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 123, NULL) -JPEG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', -123, NULL) -JPEG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 254, NULL) -JPEG;;ST_AddBand( ST_AddBand( ST_AddBand( ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1) , 1, '8BSI', 1, -1) , 2, '8BSI', 11, -1) , 3, '8BSI', 111, -1) -JPEG;QUALITY=90,PROGRESSIVE=ON;ST_AddBand( ST_AddBand( ST_AddBand( ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1) , 1, '8BSI', 1, -1) , 2, '8BSI', 11, -1) , 3, '8BSI', 111, -1) diff --git a/raster/test/regress/testgdalraster_expected b/raster/test/regress/testgdalraster_expected deleted file mode 100644 index 0f478e57f..000000000 --- a/raster/test/regress/testgdalraster_expected +++ /dev/null @@ -1,27 +0,0 @@ -Checksum=39484 -Checksum=64937 -Checksum=32120 -Checksum=13684 -Checksum=64937 -Checksum=32120 -Checksum=13684 -Checksum=39484 -Checksum=39484 -Checksum=28666 -Checksum=53950 -Checksum=40000 -Checksum=46854 -Checksum=35679 -Checksum=40000 -Checksum=46854 -Checksum=35679 -Checksum=39484 -Checksum=39484 -Checksum=28666 -Checksum=53950 -Checksum=40000 -Checksum=46861 -Checksum=35679 -Checksum=40000 -Checksum=46861 -Checksum=35679 -- 2.40.0