Ticket #89: tifftest.sh

File tifftest.sh, 887 bytes (added by Alan Beccati <beccati@…>, 13 years ago)
Line 
1#!/bin/bash
2# Test case for rasdaman tiff formatter
3
4RADM="--user alan --passwd alan" #set to rasdaman credentials
5
6rasql -q "drop collection tifftest" $RADM
7rasql -q "create collection tifftest GreySet3" $RADM
8rasql -q "insert into tifftest values marray m in [0:100,0:100,10:10] values 125c" $RADM
9rasql -q "update tifftest as x set x assign marray m in [0:100,100:200,10:10] values 250c" $RADM
10rasql -q "select tiff(m[*:*,*:*,10:10]) from tifftest as m" --out file --outfile tifftest.tif $RADM
11
12FILE=$(ls | grep tifftest.tif)
13echo "$FILE"
14if [ "$FILE" == "tifftest.tif.unknown" ] ; then
15 echo "WARN: file extension issue still present"
16elif [ "$FILE" == "tifftest.tif" ] ; then
17 echo "File name ok"
18else
19 echo File not found, test failed
20 exit 1
21fi
22
23TYPE=$(file $FILE | grep TIFF)
24echo $TYPE
25if [ "$TYPE" != "" ] ; then
26 echo Test passed
27 exit 0
28else
29 echo test failed
30 exit 1
31fi
32
33