[GRASS-SVN] r61658 - in grass/trunk/temporal: t.rast.univar t.rast.univar/testsuite t.sample t.sample/testsuite t.vect.import t.vect.import/testsuite t.vect.list t.vect.list/testsuite t.vect.mapcalc

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 15 13:39:10 PDT 2014


Author: wenzeslaus
Date: 2014-08-15 13:39:10 -0700 (Fri, 15 Aug 2014)
New Revision: 61658

Added:
   grass/trunk/temporal/t.rast.univar/testsuite/
   grass/trunk/temporal/t.rast.univar/testsuite/test.t.rast.univar.sh
   grass/trunk/temporal/t.sample/testsuite/
   grass/trunk/temporal/t.sample/testsuite/test.t.sample.sh
   grass/trunk/temporal/t.vect.import/testsuite/
   grass/trunk/temporal/t.vect.import/testsuite/test.t.vect.import.sh
   grass/trunk/temporal/t.vect.list/testsuite/
   grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.layer.sh
   grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.sh
   grass/trunk/temporal/t.vect.mapcalc/testsuite/
Removed:
   grass/trunk/temporal/t.rast.univar/test.t.rast.univar.sh
   grass/trunk/temporal/t.sample/test.t.sample.sh
   grass/trunk/temporal/t.vect.import/test.t.vect.import.sh
   grass/trunk/temporal/t.vect.list/test.t.vect.list.layer.sh
   grass/trunk/temporal/t.vect.list/test.t.vect.list.sh
   grass/trunk/temporal/t.vect.mapcalc/test_suite/
Log:
testing: use shell scripts in testing framework

There is no assurance that tests will fail when something is wrong (e.g. when they test something and then print a message but not exit with non-zero return code). However, when some module fails, test will fail too (thanks to sh -e).

Deleted: grass/trunk/temporal/t.rast.univar/test.t.rast.univar.sh
===================================================================
--- grass/trunk/temporal/t.rast.univar/test.t.rast.univar.sh	2014-08-15 20:34:08 UTC (rev 61657)
+++ grass/trunk/temporal/t.rast.univar/test.t.rast.univar.sh	2014-08-15 20:39:10 UTC (rev 61658)
@@ -1,27 +0,0 @@
-#!/bin/sh
-# Test univariate statistics for space time raster datasets
-
-# We need to set a specific region in the
-# @preprocess step of this test. 
-# The region setting should work for UTM and LL test locations
-g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
-
-export GRASS_OVERWRITE=1
-
-# Data generation
-r.mapcalc expr="prec_1 = rand(0, 550)"
-r.mapcalc expr="prec_2 = rand(0, 450)"
-r.mapcalc expr="prec_3 = rand(0, 320)"
-r.mapcalc expr="prec_4 = rand(0, 510)"
-r.mapcalc expr="prec_5 = rand(0, 300)"
-r.mapcalc expr="prec_6 = rand(0, 650)"
-
-t.create type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
-t.register type=rast --v -i input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-15 12:05:45" increment="14 days"
-
-# The first @test
-t.rast.univar -e input=precip_abs1 
-
-t.rast.univar -s input=precip_abs1 
-
-t.remove  -rf type=strds input=precip_abs1

Copied: grass/trunk/temporal/t.rast.univar/testsuite/test.t.rast.univar.sh (from rev 61650, grass/trunk/temporal/t.rast.univar/test.t.rast.univar.sh)
===================================================================
--- grass/trunk/temporal/t.rast.univar/testsuite/test.t.rast.univar.sh	                        (rev 0)
+++ grass/trunk/temporal/t.rast.univar/testsuite/test.t.rast.univar.sh	2014-08-15 20:39:10 UTC (rev 61658)
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Test univariate statistics for space time raster datasets
+
+# We need to set a specific region in the
+# @preprocess step of this test. 
+# The region setting should work for UTM and LL test locations
+g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
+
+export GRASS_OVERWRITE=1
+
+# Data generation
+r.mapcalc expr="prec_1 = rand(0, 550)"
+r.mapcalc expr="prec_2 = rand(0, 450)"
+r.mapcalc expr="prec_3 = rand(0, 320)"
+r.mapcalc expr="prec_4 = rand(0, 510)"
+r.mapcalc expr="prec_5 = rand(0, 300)"
+r.mapcalc expr="prec_6 = rand(0, 650)"
+
+t.create type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
+t.register type=rast --v -i input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-15 12:05:45" increment="14 days"
+
+# The first @test
+t.rast.univar -e input=precip_abs1 
+
+t.rast.univar -s input=precip_abs1 
+
+t.remove  -rf type=strds input=precip_abs1

Deleted: grass/trunk/temporal/t.sample/test.t.sample.sh
===================================================================
--- grass/trunk/temporal/t.sample/test.t.sample.sh	2014-08-15 20:34:08 UTC (rev 61657)
+++ grass/trunk/temporal/t.sample/test.t.sample.sh	2014-08-15 20:39:10 UTC (rev 61658)
@@ -1,89 +0,0 @@
-#1/bin/sh
-# This is a test to sample a space time raster dataset with a space time vector dataset
-
-# We need to set a specific region in the
-# @preprocess step of this test. 
-# The region setting should work for UTM and LL test locations
-g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
-
-export GRASS_OVERWRITE=1
-
-r.mapcalc expr="prec_1 = rand(0, 550)"
-r.mapcalc expr="prec_2 = rand(0, 450)"
-r.mapcalc expr="prec_3 = rand(0, 320)"
-r.mapcalc expr="prec_4 = rand(0, 510)"
-r.mapcalc expr="prec_5 = rand(0, 300)"
-r.mapcalc expr="prec_6 = rand(0, 650)"
-
-v.random -z output=pnts1 n=20 zmin=0 zmax=100 column=height
-v.random -z output=pnts2 n=20 zmin=0 zmax=100 column=height
-
-v.random -z output=pnts3 n=20 zmin=0 zmax=100 column=height
-v.random -z output=pnts4 n=20 zmin=0 zmax=100 column=height
-v.random -z output=pnts5 n=20 zmin=0 zmax=100 column=height
-v.random -z output=pnts6 n=20 zmin=0 zmax=100 column=height
-v.random -z output=pnts7 n=20 zmin=0 zmax=100 column=height
-v.random -z output=pnts8 n=20 zmin=0 zmax=100 column=height
-
-n1=`g.tempfile pid=1 -d` 
-n2=`g.tempfile pid=2 -d`
-n3=`g.tempfile pid=3 -d`
-
-cat > "${n1}" << EOF
-prec_1
-prec_2
-prec_3
-prec_4
-prec_5
-prec_6
-EOF
-
-cat > "${n2}" << EOF
-pnts1|2001-01-01|2001-03-01
-pnts2|2001-05-01|2001-07-01
-EOF
-
-cat > "${n3}" << EOF
-pnts3|2001-01-01|2001-01-05
-pnts4|2001-01-05|2001-01-10
-pnts5|2001-01-10|2001-01-15
-pnts6|2001-01-15|2001-01-20
-pnts7|2001-01-20|2001-01-25
-pnts8|2001-01-25|2001-01-30
-EOF
-
-
-t.create type=strds temporaltype=absolute output=precip_abs0 \
-	title="A test with raster input files" descr="A test with raster input files"
-t.create type=stvds temporaltype=absolute output=pnts_abs0 \
-	title="A test with vector input files" descr="A test with vector input files"
-t.create type=stvds temporaltype=absolute output=pnts_abs1 \
-	title="A test with vector input files" descr="A test with vector input files"
-
-t.register type=rast -i input=precip_abs0 file="${n1}" start="2001-01-01" increment="1 months"
-t.rast.list precip_abs0
-t.register type=vect    input=pnts_abs0 file="${n2}"
-t.vect.list pnts_abs0
-t.register type=vect    input=pnts_abs1 file="${n3}"
-t.vect.list pnts_abs1
-
-# The @test
-t.sample method=start    input=precip_abs0,precip_abs0,precip_abs0,precip_abs0 samtype=stvds sample=pnts_abs0 
-t.sample method=equal    input=precip_abs0,precip_abs0,precip_abs0,precip_abs0 samtype=stvds sample=pnts_abs0
-t.sample method=contain  input=precip_abs0,precip_abs0,precip_abs0 samtype=stvds sample=pnts_abs0 -c
-t.sample method=overlap  input=precip_abs0,precip_abs0 samtype=stvds sample=pnts_abs0 -cs
-t.sample method=during   input=precip_abs0 samtype=stvds sample=pnts_abs0 -c
-t.sample method=precedes input=precip_abs0 samtype=stvds sample=pnts_abs0 -c
-t.sample method=follows  input=precip_abs0 samtype=stvds sample=pnts_abs0 -c
-t.sample method=precedes,follows input=precip_abs0 samtype=stvds sample=pnts_abs0 -c
-t.sample input=precip_abs0 samtype=strds sample=precip_abs0 -cs
-
-
-# Test with temporal point data
-t.register type=rast input=precip_abs0 file="${n1}" start="2001-01-01" increment="1 months"
-t.rast.list precip_abs0 
-t.sample input=precip_abs0 samtype=stvds sample=pnts_abs0 -cs
-t.sample input=precip_abs0 samtype=stvds sample=pnts_abs1 -cs
-
-t.remove -rf type=strds input=precip_abs0
-t.remove -rf type=stvds input=pnts_abs0,pnts_abs1

Copied: grass/trunk/temporal/t.sample/testsuite/test.t.sample.sh (from rev 61650, grass/trunk/temporal/t.sample/test.t.sample.sh)
===================================================================
--- grass/trunk/temporal/t.sample/testsuite/test.t.sample.sh	                        (rev 0)
+++ grass/trunk/temporal/t.sample/testsuite/test.t.sample.sh	2014-08-15 20:39:10 UTC (rev 61658)
@@ -0,0 +1,89 @@
+#1/bin/sh
+# This is a test to sample a space time raster dataset with a space time vector dataset
+
+# We need to set a specific region in the
+# @preprocess step of this test. 
+# The region setting should work for UTM and LL test locations
+g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
+
+export GRASS_OVERWRITE=1
+
+r.mapcalc expr="prec_1 = rand(0, 550)"
+r.mapcalc expr="prec_2 = rand(0, 450)"
+r.mapcalc expr="prec_3 = rand(0, 320)"
+r.mapcalc expr="prec_4 = rand(0, 510)"
+r.mapcalc expr="prec_5 = rand(0, 300)"
+r.mapcalc expr="prec_6 = rand(0, 650)"
+
+v.random -z output=pnts1 n=20 zmin=0 zmax=100 column=height
+v.random -z output=pnts2 n=20 zmin=0 zmax=100 column=height
+
+v.random -z output=pnts3 n=20 zmin=0 zmax=100 column=height
+v.random -z output=pnts4 n=20 zmin=0 zmax=100 column=height
+v.random -z output=pnts5 n=20 zmin=0 zmax=100 column=height
+v.random -z output=pnts6 n=20 zmin=0 zmax=100 column=height
+v.random -z output=pnts7 n=20 zmin=0 zmax=100 column=height
+v.random -z output=pnts8 n=20 zmin=0 zmax=100 column=height
+
+n1=`g.tempfile pid=1 -d` 
+n2=`g.tempfile pid=2 -d`
+n3=`g.tempfile pid=3 -d`
+
+cat > "${n1}" << EOF
+prec_1
+prec_2
+prec_3
+prec_4
+prec_5
+prec_6
+EOF
+
+cat > "${n2}" << EOF
+pnts1|2001-01-01|2001-03-01
+pnts2|2001-05-01|2001-07-01
+EOF
+
+cat > "${n3}" << EOF
+pnts3|2001-01-01|2001-01-05
+pnts4|2001-01-05|2001-01-10
+pnts5|2001-01-10|2001-01-15
+pnts6|2001-01-15|2001-01-20
+pnts7|2001-01-20|2001-01-25
+pnts8|2001-01-25|2001-01-30
+EOF
+
+
+t.create type=strds temporaltype=absolute output=precip_abs0 \
+	title="A test with raster input files" descr="A test with raster input files"
+t.create type=stvds temporaltype=absolute output=pnts_abs0 \
+	title="A test with vector input files" descr="A test with vector input files"
+t.create type=stvds temporaltype=absolute output=pnts_abs1 \
+	title="A test with vector input files" descr="A test with vector input files"
+
+t.register type=rast -i input=precip_abs0 file="${n1}" start="2001-01-01" increment="1 months"
+t.rast.list precip_abs0
+t.register type=vect    input=pnts_abs0 file="${n2}"
+t.vect.list pnts_abs0
+t.register type=vect    input=pnts_abs1 file="${n3}"
+t.vect.list pnts_abs1
+
+# The @test
+t.sample method=start    input=precip_abs0,precip_abs0,precip_abs0,precip_abs0 samtype=stvds sample=pnts_abs0 
+t.sample method=equal    input=precip_abs0,precip_abs0,precip_abs0,precip_abs0 samtype=stvds sample=pnts_abs0
+t.sample method=contain  input=precip_abs0,precip_abs0,precip_abs0 samtype=stvds sample=pnts_abs0 -c
+t.sample method=overlap  input=precip_abs0,precip_abs0 samtype=stvds sample=pnts_abs0 -cs
+t.sample method=during   input=precip_abs0 samtype=stvds sample=pnts_abs0 -c
+t.sample method=precedes input=precip_abs0 samtype=stvds sample=pnts_abs0 -c
+t.sample method=follows  input=precip_abs0 samtype=stvds sample=pnts_abs0 -c
+t.sample method=precedes,follows input=precip_abs0 samtype=stvds sample=pnts_abs0 -c
+t.sample input=precip_abs0 samtype=strds sample=precip_abs0 -cs
+
+
+# Test with temporal point data
+t.register type=rast input=precip_abs0 file="${n1}" start="2001-01-01" increment="1 months"
+t.rast.list precip_abs0 
+t.sample input=precip_abs0 samtype=stvds sample=pnts_abs0 -cs
+t.sample input=precip_abs0 samtype=stvds sample=pnts_abs1 -cs
+
+t.remove -rf type=strds input=precip_abs0
+t.remove -rf type=stvds input=pnts_abs0,pnts_abs1

Deleted: grass/trunk/temporal/t.vect.import/test.t.vect.import.sh
===================================================================
--- grass/trunk/temporal/t.vect.import/test.t.vect.import.sh	2014-08-15 20:34:08 UTC (rev 61657)
+++ grass/trunk/temporal/t.vect.import/test.t.vect.import.sh	2014-08-15 20:39:10 UTC (rev 61658)
@@ -1,71 +0,0 @@
-#!/bin/sh
-# Test the import of space time vector datasets
-
-# We need to set a specific region in the
-# @preprocess step of this test.
-# The region setting should work for UTM and LL test locations
-g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
-
-mkdir test
-
-v.random --o -z output=soil_1 n=100 zmin=0 zmax=100 column=height seed=1
-v.random --o -z output=soil_2 n=100 zmin=0 zmax=100 column=height seed=2
-v.random --o -z output=soil_3 n=100 zmin=0 zmax=100 column=height seed=3
-
-n1=`g.tempfile pid=1 -d` 
-
-cat > "${n1}" << EOF
-soil_1
-soil_2
-soil_3
-EOF
-
-t.create --o type=stvds temporaltype=absolute output=soil_abs1 title="A test" descr="A test"
-t.register -i type=vect input=soil_abs1 file="${n1}" start='2001-01-01' increment="1 months"
-
-# The first @test
-t.vect.export format=GML input=soil_abs1 output=stvds_export_gml.tar.bz2 compression=bzip2 workdir=/tmp
-t.vect.export format=GML input=soil_abs1 output=stvds_export_gml.tar.gz compression=gzip workdir=/tmp
-t.vect.export format=GML input=soil_abs1 output=stvds_export_gml.tar compression=no workdir=/tmp
-
-t.vect.export format=pack input=soil_abs1 output=stvds_export_pack.tar.bz2 compression=bzip2 workdir=/tmp
-t.vect.export format=pack input=soil_abs1 output=stvds_export_pack.tar.gz compression=gzip workdir=/tmp
-t.vect.export format=pack input=soil_abs1 output=stvds_export_pack.tar compression=no workdir=/tmp
-
-# Checking different flags
-t.vect.import --o input=stvds_export_gml.tar.bz2 output=precip_abs1 extrdir=test\
-          -oe title="A test" description="Description of a test"
-t.vect.import --o input=stvds_export_gml.tar.bz2 output=precip_abs1 extrdir=test\
-          -o title="A test" description="Description of a test"
-t.vect.import --o input=stvds_export_gml.tar.bz2 output=precip_abs1 extrdir=test\
-              title="A test" description="Description of a test"
-
-# Import using different compression and formats
-t.vect.import --o input=stvds_export_gml.tar.gz output=soil_abs2 extrdir=test\
-              title="A test" description="Description of a test"
-v.info soil_1
-t.vect.import --o input=stvds_export_gml.tar output=soil_abs2 extrdir=test\
-              title="A test" description="Description of a test"
-v.info soil_1
-t.vect.import --o input=stvds_export_pack.tar output=soil_abs2 extrdir=test\
-              title="A test" description="Description of a test"
-v.info soil_1
-t.vect.import --o input=stvds_export_pack.tar.gz output=soil_abs2 extrdir=test\
-              title="A test" description="Description of a test"
-v.info soil_1
-t.vect.import --o input=stvds_export_pack.tar.bz2 output=soil_abs2 extrdir=test\
-              title="A test" description="Description of a test"
-v.info soil_1
-
-# Cleaning up
-rm -rf test
-g.remove vect=soil_1,soil_2,soil_3
-t.unregister type=vect file="${n1}"
-t.remove type=stvds input=soil_abs1,soil_abs2
-rm stvds_export_gml.tar.bz2
-rm stvds_export_gml.tar.gz
-rm stvds_export_gml.tar
-rm stvds_export_pack.tar.bz2
-rm stvds_export_pack.tar.gz
-rm stvds_export_pack.tar
-

Copied: grass/trunk/temporal/t.vect.import/testsuite/test.t.vect.import.sh (from rev 61650, grass/trunk/temporal/t.vect.import/test.t.vect.import.sh)
===================================================================
--- grass/trunk/temporal/t.vect.import/testsuite/test.t.vect.import.sh	                        (rev 0)
+++ grass/trunk/temporal/t.vect.import/testsuite/test.t.vect.import.sh	2014-08-15 20:39:10 UTC (rev 61658)
@@ -0,0 +1,71 @@
+#!/bin/sh
+# Test the import of space time vector datasets
+
+# We need to set a specific region in the
+# @preprocess step of this test.
+# The region setting should work for UTM and LL test locations
+g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
+
+mkdir test
+
+v.random --o -z output=soil_1 n=100 zmin=0 zmax=100 column=height seed=1
+v.random --o -z output=soil_2 n=100 zmin=0 zmax=100 column=height seed=2
+v.random --o -z output=soil_3 n=100 zmin=0 zmax=100 column=height seed=3
+
+n1=`g.tempfile pid=1 -d` 
+
+cat > "${n1}" << EOF
+soil_1
+soil_2
+soil_3
+EOF
+
+t.create --o type=stvds temporaltype=absolute output=soil_abs1 title="A test" descr="A test"
+t.register -i type=vect input=soil_abs1 file="${n1}" start='2001-01-01' increment="1 months"
+
+# The first @test
+t.vect.export format=GML input=soil_abs1 output=stvds_export_gml.tar.bz2 compression=bzip2 workdir=/tmp
+t.vect.export format=GML input=soil_abs1 output=stvds_export_gml.tar.gz compression=gzip workdir=/tmp
+t.vect.export format=GML input=soil_abs1 output=stvds_export_gml.tar compression=no workdir=/tmp
+
+t.vect.export format=pack input=soil_abs1 output=stvds_export_pack.tar.bz2 compression=bzip2 workdir=/tmp
+t.vect.export format=pack input=soil_abs1 output=stvds_export_pack.tar.gz compression=gzip workdir=/tmp
+t.vect.export format=pack input=soil_abs1 output=stvds_export_pack.tar compression=no workdir=/tmp
+
+# Checking different flags
+t.vect.import --o input=stvds_export_gml.tar.bz2 output=precip_abs1 extrdir=test\
+          -oe title="A test" description="Description of a test"
+t.vect.import --o input=stvds_export_gml.tar.bz2 output=precip_abs1 extrdir=test\
+          -o title="A test" description="Description of a test"
+t.vect.import --o input=stvds_export_gml.tar.bz2 output=precip_abs1 extrdir=test\
+              title="A test" description="Description of a test"
+
+# Import using different compression and formats
+t.vect.import --o input=stvds_export_gml.tar.gz output=soil_abs2 extrdir=test\
+              title="A test" description="Description of a test"
+v.info soil_1
+t.vect.import --o input=stvds_export_gml.tar output=soil_abs2 extrdir=test\
+              title="A test" description="Description of a test"
+v.info soil_1
+t.vect.import --o input=stvds_export_pack.tar output=soil_abs2 extrdir=test\
+              title="A test" description="Description of a test"
+v.info soil_1
+t.vect.import --o input=stvds_export_pack.tar.gz output=soil_abs2 extrdir=test\
+              title="A test" description="Description of a test"
+v.info soil_1
+t.vect.import --o input=stvds_export_pack.tar.bz2 output=soil_abs2 extrdir=test\
+              title="A test" description="Description of a test"
+v.info soil_1
+
+# Cleaning up
+rm -rf test
+g.remove vect=soil_1,soil_2,soil_3
+t.unregister type=vect file="${n1}"
+t.remove type=stvds input=soil_abs1,soil_abs2
+rm stvds_export_gml.tar.bz2
+rm stvds_export_gml.tar.gz
+rm stvds_export_gml.tar
+rm stvds_export_pack.tar.bz2
+rm stvds_export_pack.tar.gz
+rm stvds_export_pack.tar
+

Deleted: grass/trunk/temporal/t.vect.list/test.t.vect.list.layer.sh
===================================================================
--- grass/trunk/temporal/t.vect.list/test.t.vect.list.layer.sh	2014-08-15 20:34:08 UTC (rev 61657)
+++ grass/trunk/temporal/t.vect.list/test.t.vect.list.layer.sh	2014-08-15 20:39:10 UTC (rev 61658)
@@ -1,124 +0,0 @@
-#!/bin/sh
-# This is a test to list vecter maps of a space time vecter dataset
-
-# We need to set a specific region in the
-# @preprocess step of this test. 
-# The region setting should work for UTM and LL test locations
-g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
-
-export GRASS_OVERWRITE=1
-
-v.random -z seed=1 output=soil_orig n=20 zmin=0 zmax=100 column=sand
-# Adding new layer with categories
-v.category input=soil_orig out=soils option=transfer layer=1,1
-v.category input=soils out=soil_orig option=transfer layer=1,2
-v.category input=soil_orig out=soils option=transfer layer=1,3
-v.category input=soils out=soil_orig option=transfer layer=1,4
-v.category input=soil_orig out=soils option=transfer layer=1,5
-v.category input=soils out=soil_orig option=transfer layer=1,6
-g.copy vect=soil_orig,soils
-# Creating new tables for each layer
-db.copy from_table=soil_orig to_table=soils_2
-db.copy from_table=soil_orig to_table=soils_3
-db.copy from_table=soil_orig to_table=soils_4
-db.copy from_table=soil_orig to_table=soils_5
-db.copy from_table=soil_orig to_table=soils_6
-v.db.addtable map=soils table=soils_2 layer=2 
-v.db.addtable map=soils table=soils_3 layer=3 
-v.db.addtable map=soils table=soils_4 layer=4 
-v.db.addtable map=soils table=soils_5 layer=5 
-v.db.addtable map=soils table=soils_6 layer=6 
-
-n1=`g.tempfile pid=1 -d` 
-n2=`g.tempfile pid=2 -d`
-n3=`g.tempfile pid=3 -d`
-n4=`g.tempfile pid=4 -d`
-n5=`g.tempfile pid=5 -d`
-
-cat > "${n1}" << EOF
-soils:1
-soils:2
-soils:3
-soils:4
-soils:5
-soils:6
-EOF
-
-cat > "${n2}" << EOF
-soils:1|2001-01-01
-soils:2|2001-02-01
-soils:3|2001-03-01
-soils:4|2001-04-01
-soils:5|2001-05-01
-soils:6|2001-06-01
-EOF
-
-cat > "${n3}" << EOF
-soils:1|2001-01-01|2001-04-01
-soils:2|2001-05-01|2001-07-01
-soils:3|2001-08-01|2001-10-01
-soils:4|2001-11-01|2002-01-01
-soils:5|2002-02-01|2002-04-01
-soils:6|2002-05-01|2002-07-01
-EOF
-
-cat > "${n4}" << EOF
-soils:1|2001-01-01|2001-07-01
-soils:2|2001-02-01|2001-04-01
-soils:3|2001-03-01|2001-04-01
-soils:4|2001-04-01|2001-06-01
-soils:5|2001-05-01|2001-06-01
-soils:6|2001-06-01|2001-07-01
-EOF
-
-cat > "${n5}" << EOF
-soils:1|2001-01-01|2001-03-11
-soils:2|2001-02-01|2001-04-01
-soils:3|2001-03-01|2001-06-02
-soils:4|2001-04-01|2001-04-01
-soils:5|2001-05-01|2001-05-01
-soils:6|2001-06-01|2001-07-01
-EOF
-
-t.create type=stvds temporaltype=absolute output=soils_abs1 title="A test with input files" descr="A test with input files"
-t.create type=stvds temporaltype=absolute output=soils_abs2 title="A test with input files" descr="A test with input files"
-t.create type=stvds temporaltype=absolute output=soils_abs3 title="A test with input files" descr="A test with input files"
-t.create type=stvds temporaltype=absolute output=soils_abs4 title="A test with input files" descr="A test with input files"
-t.create type=stvds temporaltype=absolute output=soils_abs5 title="A test with input files" descr="A test with input files"
-
-# The first @test
-t.register type=vect   input=soils_abs1 file="${n1}" start="2001-01-01" increment="1 months"
-t.vect.list    separator=" | " method=comma     input=soils_abs1
-t.vect.list input=soils_abs1
-t.vect.list separator=" | " method=cols      input=soils_abs1
-t.vect.list separator=" | " method=delta     input=soils_abs1
-t.vect.list separator=" | " method=deltagaps input=soils_abs1
-
-t.register type=vect -i input=soils_abs2 file="${n2}"
-t.vect.list    separator=" | " method=comma     input=soils_abs2
-t.vect.list input=soils_abs2
-t.vect.list separator=" | " method=cols      input=soils_abs2
-t.vect.list separator=" | " method=delta     input=soils_abs2
-t.vect.list separator=" | " method=deltagaps input=soils_abs2
-
-t.register type=vect -i input=soils_abs3 file="${n3}"
-t.vect.list    separator=" | " method=comma     input=soils_abs3
-t.vect.list separator=" | " method=delta     input=soils_abs3
-t.vect.list separator=" | " method=deltagaps input=soils_abs3
-
-t.register type=vect -i input=soils_abs4 file="${n4}"
-t.vect.list    separator=" | " method=comma     input=soils_abs4
-t.vect.list separator=" | " method=delta     input=soils_abs4
-t.vect.list separator=" | " method=deltagaps input=soils_abs4
-
-t.register type=vect -i input=soils_abs5 file="${n5}"
-t.vect.list    separator=" | " method=comma     input=soils_abs5
-t.vect.list input=soils_abs5
-t.vect.list separator=" | " method=cols      input=soils_abs5
-t.vect.list separator=" | " method=delta     input=soils_abs5
-t.vect.list separator=" | " method=deltagaps input=soils_abs5
-
-t.unregister type=vect maps=soils:1,soils:2,soils:3,soils:4,soils:5,soils:6
-t.remove type=stvds input=soils_abs1,soils_abs2,soils_abs3,soils_abs4,soils_abs5
-
-g.remove vect=soil_orig,soils

Deleted: grass/trunk/temporal/t.vect.list/test.t.vect.list.sh
===================================================================
--- grass/trunk/temporal/t.vect.list/test.t.vect.list.sh	2014-08-15 20:34:08 UTC (rev 61657)
+++ grass/trunk/temporal/t.vect.list/test.t.vect.list.sh	2014-08-15 20:39:10 UTC (rev 61658)
@@ -1,109 +0,0 @@
-#!/bin/sh
-# This is a test to list vecter maps of a space time vecter dataset
-
-# We need to set a specific region in the
-# @preprocess step of this test. 
-# The region setting should work for UTM and LL test locations
-g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
-
-export GRASS_OVERWRITE=1
-
-v.random -z output=lidar_1 n=20 zmin=0 zmax=100 column=height
-v.random -z output=lidar_2 n=20 zmin=0 zmax=100 column=height
-v.random -z output=lidar_3 n=20 zmin=0 zmax=100 column=height
-v.random -z output=lidar_4 n=20 zmin=0 zmax=100 column=height
-v.random -z output=lidar_5 n=20 zmin=0 zmax=100 column=height
-v.random -z output=lidar_6 n=20 zmin=0 zmax=100 column=height
-
-n1=`g.tempfile pid=1 -d` 
-n2=`g.tempfile pid=2 -d`
-n3=`g.tempfile pid=3 -d`
-n4=`g.tempfile pid=4 -d`
-n5=`g.tempfile pid=5 -d`
-
-cat > "${n1}" << EOF
-lidar_1
-lidar_2
-lidar_3
-lidar_4
-lidar_5
-lidar_6
-EOF
-
-cat > "${n2}" << EOF
-lidar_1|2001-01-01
-lidar_2|2001-02-01
-lidar_3|2001-03-01
-lidar_4|2001-04-01
-lidar_5|2001-05-01
-lidar_6|2001-06-01
-EOF
-
-cat > "${n3}" << EOF
-lidar_1|2001-01-01|2001-04-01
-lidar_2|2001-05-01|2001-07-01
-lidar_3|2001-08-01|2001-10-01
-lidar_4|2001-11-01|2002-01-01
-lidar_5|2002-02-01|2002-04-01
-lidar_6|2002-05-01|2002-07-01
-EOF
-
-cat > "${n4}" << EOF
-lidar_1|2001-01-01|2001-07-01
-lidar_2|2001-02-01|2001-04-01
-lidar_3|2001-03-01|2001-04-01
-lidar_4|2001-04-01|2001-06-01
-lidar_5|2001-05-01|2001-06-01
-lidar_6|2001-06-01|2001-07-01
-EOF
-
-cat > "${n5}" << EOF
-lidar_1|2001-01-01|2001-03-11
-lidar_2|2001-02-01|2001-04-01
-lidar_3|2001-03-01|2001-06-02
-lidar_4|2001-04-01|2001-04-01
-lidar_5|2001-05-01|2001-05-01
-lidar_6|2001-06-01|2001-07-01
-EOF
-
-t.create type=stvds temporaltype=absolute output=lidar_abs1 title="A test with input files" descr="A test with input files"
-t.create type=stvds temporaltype=absolute output=lidar_abs2 title="A test with input files" descr="A test with input files"
-t.create type=stvds temporaltype=absolute output=lidar_abs3 title="A test with input files" descr="A test with input files"
-t.create type=stvds temporaltype=absolute output=lidar_abs4 title="A test with input files" descr="A test with input files"
-t.create type=stvds temporaltype=absolute output=lidar_abs5 title="A test with input files" descr="A test with input files"
-
-# The first @test
-t.register type=vect  input=lidar_abs1 file="${n1}" start="2001-01-01" increment="1 months"
-t.vect.list    separator=" | " method=comma     input=lidar_abs1
-t.vect.list input=lidar_abs1
-t.vect.list separator=" | " method=cols      input=lidar_abs1
-t.vect.list separator=" | " method=delta     input=lidar_abs1
-t.vect.list separator=" | " method=deltagaps input=lidar_abs1
-
-t.register type=vect -i input=lidar_abs2 file="${n2}"
-t.vect.list    separator=" | " method=comma     input=lidar_abs2
-t.vect.list input=lidar_abs2
-t.vect.list separator=" | " method=cols      input=lidar_abs2
-t.vect.list separator=" | " method=delta     input=lidar_abs2
-t.vect.list separator=" | " method=deltagaps input=lidar_abs2
-
-t.register type=vect -i input=lidar_abs3 file="${n3}"
-t.vect.list    separator=" | " method=comma     input=lidar_abs3
-t.vect.list separator=" | " method=delta     input=lidar_abs3
-t.vect.list separator=" | " method=deltagaps input=lidar_abs3
-
-t.register type=vect -i input=lidar_abs4 file="${n4}"
-t.vect.list    separator=" | " method=comma     input=lidar_abs4
-t.vect.list separator=" | " method=delta     input=lidar_abs4
-t.vect.list separator=" | " method=deltagaps input=lidar_abs4
-
-t.register type=vect -i input=lidar_abs5 file="${n5}"
-t.vect.list    separator=" | " method=comma     input=lidar_abs5
-t.vect.list input=lidar_abs5
-t.vect.list separator=" | " method=cols      input=lidar_abs5
-t.vect.list separator=" | " method=delta     input=lidar_abs5
-t.vect.list separator=" | " method=deltagaps input=lidar_abs5
-
-#t.unregister type=vect maps=lidar_1,lidar_2,lidar_3,lidar_4,lidar_5,lidar_6
-#t.remove type=stvds input=lidar_abs1,lidar_abs2,lidar_abs3,lidar_abs4,lidar_abs5
-#g.remove vect=lidar_1,lidar_2,lidar_3,lidar_4,lidar_5,lidar_6

Copied: grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.layer.sh (from rev 61650, grass/trunk/temporal/t.vect.list/test.t.vect.list.layer.sh)
===================================================================
--- grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.layer.sh	                        (rev 0)
+++ grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.layer.sh	2014-08-15 20:39:10 UTC (rev 61658)
@@ -0,0 +1,124 @@
+#!/bin/sh
+# This is a test to list vecter maps of a space time vecter dataset
+
+# We need to set a specific region in the
+# @preprocess step of this test. 
+# The region setting should work for UTM and LL test locations
+g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
+
+export GRASS_OVERWRITE=1
+
+v.random -z seed=1 output=soil_orig n=20 zmin=0 zmax=100 column=sand
+# Adding new layer with categories
+v.category input=soil_orig out=soils option=transfer layer=1,1
+v.category input=soils out=soil_orig option=transfer layer=1,2
+v.category input=soil_orig out=soils option=transfer layer=1,3
+v.category input=soils out=soil_orig option=transfer layer=1,4
+v.category input=soil_orig out=soils option=transfer layer=1,5
+v.category input=soils out=soil_orig option=transfer layer=1,6
+g.copy vect=soil_orig,soils
+# Creating new tables for each layer
+db.copy from_table=soil_orig to_table=soils_2
+db.copy from_table=soil_orig to_table=soils_3
+db.copy from_table=soil_orig to_table=soils_4
+db.copy from_table=soil_orig to_table=soils_5
+db.copy from_table=soil_orig to_table=soils_6
+v.db.addtable map=soils table=soils_2 layer=2 
+v.db.addtable map=soils table=soils_3 layer=3 
+v.db.addtable map=soils table=soils_4 layer=4 
+v.db.addtable map=soils table=soils_5 layer=5 
+v.db.addtable map=soils table=soils_6 layer=6 
+
+n1=`g.tempfile pid=1 -d` 
+n2=`g.tempfile pid=2 -d`
+n3=`g.tempfile pid=3 -d`
+n4=`g.tempfile pid=4 -d`
+n5=`g.tempfile pid=5 -d`
+
+cat > "${n1}" << EOF
+soils:1
+soils:2
+soils:3
+soils:4
+soils:5
+soils:6
+EOF
+
+cat > "${n2}" << EOF
+soils:1|2001-01-01
+soils:2|2001-02-01
+soils:3|2001-03-01
+soils:4|2001-04-01
+soils:5|2001-05-01
+soils:6|2001-06-01
+EOF
+
+cat > "${n3}" << EOF
+soils:1|2001-01-01|2001-04-01
+soils:2|2001-05-01|2001-07-01
+soils:3|2001-08-01|2001-10-01
+soils:4|2001-11-01|2002-01-01
+soils:5|2002-02-01|2002-04-01
+soils:6|2002-05-01|2002-07-01
+EOF
+
+cat > "${n4}" << EOF
+soils:1|2001-01-01|2001-07-01
+soils:2|2001-02-01|2001-04-01
+soils:3|2001-03-01|2001-04-01
+soils:4|2001-04-01|2001-06-01
+soils:5|2001-05-01|2001-06-01
+soils:6|2001-06-01|2001-07-01
+EOF
+
+cat > "${n5}" << EOF
+soils:1|2001-01-01|2001-03-11
+soils:2|2001-02-01|2001-04-01
+soils:3|2001-03-01|2001-06-02
+soils:4|2001-04-01|2001-04-01
+soils:5|2001-05-01|2001-05-01
+soils:6|2001-06-01|2001-07-01
+EOF
+
+t.create type=stvds temporaltype=absolute output=soils_abs1 title="A test with input files" descr="A test with input files"
+t.create type=stvds temporaltype=absolute output=soils_abs2 title="A test with input files" descr="A test with input files"
+t.create type=stvds temporaltype=absolute output=soils_abs3 title="A test with input files" descr="A test with input files"
+t.create type=stvds temporaltype=absolute output=soils_abs4 title="A test with input files" descr="A test with input files"
+t.create type=stvds temporaltype=absolute output=soils_abs5 title="A test with input files" descr="A test with input files"
+
+# The first @test
+t.register type=vect   input=soils_abs1 file="${n1}" start="2001-01-01" increment="1 months"
+t.vect.list    separator=" | " method=comma     input=soils_abs1
+t.vect.list input=soils_abs1
+t.vect.list separator=" | " method=cols      input=soils_abs1
+t.vect.list separator=" | " method=delta     input=soils_abs1
+t.vect.list separator=" | " method=deltagaps input=soils_abs1
+
+t.register type=vect -i input=soils_abs2 file="${n2}"
+t.vect.list    separator=" | " method=comma     input=soils_abs2
+t.vect.list input=soils_abs2
+t.vect.list separator=" | " method=cols      input=soils_abs2
+t.vect.list separator=" | " method=delta     input=soils_abs2
+t.vect.list separator=" | " method=deltagaps input=soils_abs2
+
+t.register type=vect -i input=soils_abs3 file="${n3}"
+t.vect.list    separator=" | " method=comma     input=soils_abs3
+t.vect.list separator=" | " method=delta     input=soils_abs3
+t.vect.list separator=" | " method=deltagaps input=soils_abs3
+
+t.register type=vect -i input=soils_abs4 file="${n4}"
+t.vect.list    separator=" | " method=comma     input=soils_abs4
+t.vect.list separator=" | " method=delta     input=soils_abs4
+t.vect.list separator=" | " method=deltagaps input=soils_abs4
+
+t.register type=vect -i input=soils_abs5 file="${n5}"
+t.vect.list    separator=" | " method=comma     input=soils_abs5
+t.vect.list input=soils_abs5
+t.vect.list separator=" | " method=cols      input=soils_abs5
+t.vect.list separator=" | " method=delta     input=soils_abs5
+t.vect.list separator=" | " method=deltagaps input=soils_abs5
+
+t.unregister type=vect maps=soils:1,soils:2,soils:3,soils:4,soils:5,soils:6
+t.remove type=stvds input=soils_abs1,soils_abs2,soils_abs3,soils_abs4,soils_abs5
+
+g.remove vect=soil_orig,soils

Copied: grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.sh (from rev 61650, grass/trunk/temporal/t.vect.list/test.t.vect.list.sh)
===================================================================
--- grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.sh	                        (rev 0)
+++ grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.sh	2014-08-15 20:39:10 UTC (rev 61658)
@@ -0,0 +1,109 @@
+#!/bin/sh
+# This is a test to list vecter maps of a space time vecter dataset
+
+# We need to set a specific region in the
+# @preprocess step of this test. 
+# The region setting should work for UTM and LL test locations
+g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
+
+export GRASS_OVERWRITE=1
+
+v.random -z output=lidar_1 n=20 zmin=0 zmax=100 column=height
+v.random -z output=lidar_2 n=20 zmin=0 zmax=100 column=height
+v.random -z output=lidar_3 n=20 zmin=0 zmax=100 column=height
+v.random -z output=lidar_4 n=20 zmin=0 zmax=100 column=height
+v.random -z output=lidar_5 n=20 zmin=0 zmax=100 column=height
+v.random -z output=lidar_6 n=20 zmin=0 zmax=100 column=height
+
+n1=`g.tempfile pid=1 -d` 
+n2=`g.tempfile pid=2 -d`
+n3=`g.tempfile pid=3 -d`
+n4=`g.tempfile pid=4 -d`
+n5=`g.tempfile pid=5 -d`
+
+cat > "${n1}" << EOF
+lidar_1
+lidar_2
+lidar_3
+lidar_4
+lidar_5
+lidar_6
+EOF
+
+cat > "${n2}" << EOF
+lidar_1|2001-01-01
+lidar_2|2001-02-01
+lidar_3|2001-03-01
+lidar_4|2001-04-01
+lidar_5|2001-05-01
+lidar_6|2001-06-01
+EOF
+
+cat > "${n3}" << EOF
+lidar_1|2001-01-01|2001-04-01
+lidar_2|2001-05-01|2001-07-01
+lidar_3|2001-08-01|2001-10-01
+lidar_4|2001-11-01|2002-01-01
+lidar_5|2002-02-01|2002-04-01
+lidar_6|2002-05-01|2002-07-01
+EOF
+
+cat > "${n4}" << EOF
+lidar_1|2001-01-01|2001-07-01
+lidar_2|2001-02-01|2001-04-01
+lidar_3|2001-03-01|2001-04-01
+lidar_4|2001-04-01|2001-06-01
+lidar_5|2001-05-01|2001-06-01
+lidar_6|2001-06-01|2001-07-01
+EOF
+
+cat > "${n5}" << EOF
+lidar_1|2001-01-01|2001-03-11
+lidar_2|2001-02-01|2001-04-01
+lidar_3|2001-03-01|2001-06-02
+lidar_4|2001-04-01|2001-04-01
+lidar_5|2001-05-01|2001-05-01
+lidar_6|2001-06-01|2001-07-01
+EOF
+
+t.create type=stvds temporaltype=absolute output=lidar_abs1 title="A test with input files" descr="A test with input files"
+t.create type=stvds temporaltype=absolute output=lidar_abs2 title="A test with input files" descr="A test with input files"
+t.create type=stvds temporaltype=absolute output=lidar_abs3 title="A test with input files" descr="A test with input files"
+t.create type=stvds temporaltype=absolute output=lidar_abs4 title="A test with input files" descr="A test with input files"
+t.create type=stvds temporaltype=absolute output=lidar_abs5 title="A test with input files" descr="A test with input files"
+
+# The first @test
+t.register type=vect  input=lidar_abs1 file="${n1}" start="2001-01-01" increment="1 months"
+t.vect.list    separator=" | " method=comma     input=lidar_abs1
+t.vect.list input=lidar_abs1
+t.vect.list separator=" | " method=cols      input=lidar_abs1
+t.vect.list separator=" | " method=delta     input=lidar_abs1
+t.vect.list separator=" | " method=deltagaps input=lidar_abs1
+
+t.register type=vect -i input=lidar_abs2 file="${n2}"
+t.vect.list    separator=" | " method=comma     input=lidar_abs2
+t.vect.list input=lidar_abs2
+t.vect.list separator=" | " method=cols      input=lidar_abs2
+t.vect.list separator=" | " method=delta     input=lidar_abs2
+t.vect.list separator=" | " method=deltagaps input=lidar_abs2
+
+t.register type=vect -i input=lidar_abs3 file="${n3}"
+t.vect.list    separator=" | " method=comma     input=lidar_abs3
+t.vect.list separator=" | " method=delta     input=lidar_abs3
+t.vect.list separator=" | " method=deltagaps input=lidar_abs3
+
+t.register type=vect -i input=lidar_abs4 file="${n4}"
+t.vect.list    separator=" | " method=comma     input=lidar_abs4
+t.vect.list separator=" | " method=delta     input=lidar_abs4
+t.vect.list separator=" | " method=deltagaps input=lidar_abs4
+
+t.register type=vect -i input=lidar_abs5 file="${n5}"
+t.vect.list    separator=" | " method=comma     input=lidar_abs5
+t.vect.list input=lidar_abs5
+t.vect.list separator=" | " method=cols      input=lidar_abs5
+t.vect.list separator=" | " method=delta     input=lidar_abs5
+t.vect.list separator=" | " method=deltagaps input=lidar_abs5
+
+#t.unregister type=vect maps=lidar_1,lidar_2,lidar_3,lidar_4,lidar_5,lidar_6
+#t.remove type=stvds input=lidar_abs1,lidar_abs2,lidar_abs3,lidar_abs4,lidar_abs5
+#g.remove vect=lidar_1,lidar_2,lidar_3,lidar_4,lidar_5,lidar_6



More information about the grass-commit mailing list