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