[GRASS-SVN] r63634 - in grass/trunk: raster/r.cost/test_suite raster/r.series/test_suite raster/r.series.accumulate/test_suite raster/r.stats/test_suite raster/r.timestamp/test_suite raster3d/r3.in.bin/test_suite raster3d/r3.neighbors/test_suite raster3d/r3.timestamp/test_suite scripts/v.unpack/test_suite vector/v.surf.bspline/test_suite vector/v.surf.rst/test_suite vector/v.timestamp/test_suite vector/v.what.rast3/test_suite

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 19 15:46:47 PST 2014


Author: neteler
Date: 2014-12-19 15:46:47 -0800 (Fri, 19 Dec 2014)
New Revision: 63634

Modified:
   grass/trunk/raster/r.cost/test_suite/profile.sh
   grass/trunk/raster/r.series.accumulate/test_suite/test.r.series.accumulate.sh
   grass/trunk/raster/r.series/test_suite/test.r.series.sh
   grass/trunk/raster/r.stats/test_suite/profile.sh
   grass/trunk/raster/r.timestamp/test_suite/test.r.timestamp.sh
   grass/trunk/raster3d/r3.in.bin/test_suite/test.r3.in.bin.sh
   grass/trunk/raster3d/r3.neighbors/test_suite/test.r3.neighbors.sh
   grass/trunk/raster3d/r3.timestamp/test_suite/test.r3.timestamp.sh
   grass/trunk/scripts/v.unpack/test_suite/test.v.unpack.sh
   grass/trunk/vector/v.surf.bspline/test_suite/profile_cmd.sh
   grass/trunk/vector/v.surf.rst/test_suite/profile.sh
   grass/trunk/vector/v.timestamp/test_suite/test.v.timestamp.sh
   grass/trunk/vector/v.what.rast3/test_suite/test.v.what.rast3.sh
Log:
some shell test scripts updated

Modified: grass/trunk/raster/r.cost/test_suite/profile.sh
===================================================================
--- grass/trunk/raster/r.cost/test_suite/profile.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/raster/r.cost/test_suite/profile.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -1,8 +1,16 @@
-# NC dataset
-g.region raster=elevation -p
+# NC dataset, http://grass.osgeo.org/download/sample-data/
+
+OUTFILE=callgrind.out.1196
+MAP=elevation
+export GRASS_OVERWRITE=1
+
+g.region raster=$MAP -p
 r.mapcalc 'one = 1'
-CMD="r.cost -k in=one start_points=school_copy output=cost.test --o"
+CMD="r.cost -k in=one start_points=schools_wake output=cost.test --o"
 
-valgrind --tool=callgrind --trace-children=yes $CMD
-kcachegrind callgrind.out.1196
+valgrind --tool=callgrind --callgrind-out-file=$OUTFILE --trace-children=yes $CMD
 
+g.remove --q -f type=raster name=one
+
+# http://kcachegrind.sourceforge.net
+kcachegrind $OUTFILE

Modified: grass/trunk/raster/r.series/test_suite/test.r.series.sh
===================================================================
--- grass/trunk/raster/r.series/test_suite/test.r.series.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/raster/r.series/test_suite/test.r.series.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -32,7 +32,7 @@
 
 EOF
 
-# The second file includes weights. The deafult weight of 1.0 
+# The second file includes weights. The default weight of 1.0 
 # must not be specified
 cat > "${TMP_FILE_WEIGHTS}" << EOF
 prec_1|3

Modified: grass/trunk/raster/r.series.accumulate/test_suite/test.r.series.accumulate.sh
===================================================================
--- grass/trunk/raster/r.series.accumulate/test_suite/test.r.series.accumulate.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/raster/r.series.accumulate/test_suite/test.r.series.accumulate.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -12,9 +12,9 @@
 r.mapcalc expr="lower = 5"
 r.mapcalc expr="upper = 10"
 
-r.mapcalc expr="map_a = rand(0, 15)"
-r.mapcalc expr="map_b = rand(1, 14)"
-r.mapcalc expr="map_c = rand(2, 13)"
+r.mapcalc expr="map_a = rand(0, 15)" -s
+r.mapcalc expr="map_b = rand(1, 14)" -s
+r.mapcalc expr="map_c = rand(2, 13)" -s
 
 # BEDD with lower limit map and upper limit value
 r.series.accumulate basemap=basemap input=map_a lower=lower limits=5,10 \
@@ -24,19 +24,19 @@
                     output=test_accu_1 method=gdd -f --verbose 
 # Winkler with lower limit map
 r.series.accumulate basemap=basemap input=map_a lower=lower \
-                    output=test_accu_2 method=gdd -a -f --verbose 
+                    output=test_accu_2 method=gdd -f --verbose 
 # Mean
 r.series.accumulate basemap=basemap input=map_a \
                     output=test_accu_3  method=mean --verbose 
 # Average
 r.series.accumulate basemap=basemap input=map_a \
-                    output=test_accu_3  method=mean -a --verbose 
+                    output=test_accu_3  method=mean --verbose 
 # GDD with lower limit value
 r.series.accumulate basemap=basemap input=map_a,map_b,map_c limits=5,10 \
                     output=test_accu_4 method=gdd -f --verbose 
 # Winkler with  multiple maps, lower limit value
 r.series.accumulate basemap=basemap input=map_a,map_b,map_c limits=5,10 \
-                    output=test_accu_5 method=bedd -a -f --verbose 
+                    output=test_accu_5 method=bedd -f --verbose 
 # BEDD with  multiple maps, lower limit map and upper limit value
 r.series.accumulate basemap=basemap input=map_a,map_b,map_c lower=lower limits=5,10 \
                     output=test_accu_6 method=bedd -f --verbose 
@@ -52,12 +52,13 @@
 
 # Test for correct results
 for map in `g.list type=raster pattern=test_accu_*` ; do
-    r.out.ascii input=${map} output=${map}.ref dp=2
+    r.out.ascii input=${map} output=${map}.ref precision=2
 done
 
-for i in `ls test_accu_*.txt` ; do
-    diff $i "`basename $i .txt`.ref" >> out.diff
+for i in `ls test_accu_*.ref` ; do
+    diff $i "`basename $i`" >> out.diff
 done
+rm -f test_accu_*.ref
 
 CHAR_NUM=`cat out.diff | wc -c`
 

Modified: grass/trunk/raster/r.stats/test_suite/profile.sh
===================================================================
--- grass/trunk/raster/r.stats/test_suite/profile.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/raster/r.stats/test_suite/profile.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -1,11 +1,16 @@
-#spearfish
-MAP=elevation.10m
-g.region raster=$MAP
+# NC dataset, http://grass.osgeo.org/download/sample-data/
+
+OUTFILE=callgrind.out.1196
+MAP=elevation
+export GRASS_OVERWRITE=1
+
+g.region raster=$MAP -p
+
 CMD="r.stats -a $MAP"
 
 time $CMD
 
-valgrind --tool=callgrind --trace-children=yes $CMD
+valgrind --tool=callgrind --callgrind-out-file=$OUTFILE --trace-children=yes $CMD
 
-kcachegrind callgrind.out.12345
-
+# http://kcachegrind.sourceforge.net
+kcachegrind $OUTFILE

Modified: grass/trunk/raster/r.timestamp/test_suite/test.r.timestamp.sh
===================================================================
--- grass/trunk/raster/r.timestamp/test_suite/test.r.timestamp.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/raster/r.timestamp/test_suite/test.r.timestamp.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -49,6 +49,7 @@
 r.timestamp map=map date=none
 
 # The third @test to check @failure with wrong time stamps
+g.message message="Now checking for expected failures due to wrong time stamps..."
 r.timestamp map=map date="2 years 3 months 8 days"
 r.timestamp map=map date="1 month 5 days"
 r.timestamp map=map date="July 2003"

Modified: grass/trunk/raster3d/r3.in.bin/test_suite/test.r3.in.bin.sh
===================================================================
--- grass/trunk/raster3d/r3.in.bin/test_suite/test.r3.in.bin.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/raster3d/r3.in.bin/test_suite/test.r3.in.bin.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -4,8 +4,8 @@
 
 r3.mapcalc --o expr="test_out_bin_float = float(if(row() == 2, null(), row()))"
 r3.mapcalc --o expr="test_out_bin_double = double(if(row() == 2, null(), row()))"
-r3.out.ascii --o dp=0 input=test_out_bin_float output=test_out_bin_float.ref; 
-r3.out.ascii --o dp=0 input=test_out_bin_double output=test_out_bin_double.ref; 
+r3.out.ascii --o precision=0 input=test_out_bin_float output=test_out_bin_float.ref; 
+r3.out.ascii --o precision=0 input=test_out_bin_double output=test_out_bin_double.ref; 
 
 # @test
 
@@ -125,7 +125,7 @@
     cols=18 rows=9 depths=10
 
 for map in `g.list type=raster3d pattern=test_in_bin_float*` ; do
-  r3.out.ascii input=${map} output=${map}.txt dp=0
+  r3.out.ascii input=${map} output=${map}.txt precision=0
 done
 
 for i in `ls test_in_bin_float_*.txt` ; do 

Modified: grass/trunk/raster3d/r3.neighbors/test_suite/test.r3.neighbors.sh
===================================================================
--- grass/trunk/raster3d/r3.neighbors/test_suite/test.r3.neighbors.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/raster3d/r3.neighbors/test_suite/test.r3.neighbors.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -11,25 +11,25 @@
 # First @test with float values with @precision=2
 r3.neighbors input=test_neighbor_float output=test_neighbor_float_average \
     method=average window=3,3,3 
-r3.out.ascii dp=2 input=test_neighbor_float_average output=test_neighbor_float_average.txt
+r3.out.ascii precision=2 input=test_neighbor_float_average output=test_neighbor_float_average.txt
 
 r3.neighbors input=test_neighbor_float output=test_neighbor_float_sum \
     method=sum window=3,3,3 
-r3.out.ascii dp=2 input=test_neighbor_float_sum output=test_neighbor_float_sum.txt
+r3.out.ascii precision=2 input=test_neighbor_float_sum output=test_neighbor_float_sum.txt
 
 # Second @test with double values
 r3.neighbors input=test_neighbor_double output=test_neighbor_double_average \
     method=average window=3,3,3 
-r3.out.ascii dp=2 input=test_neighbor_double_average output=test_neighbor_double_average.txt
+r3.out.ascii precision=2 input=test_neighbor_double_average output=test_neighbor_double_average.txt
 
 r3.neighbors input=test_neighbor_double output=test_neighbor_double_sum \
     method=sum window=3,3,3 
-r3.out.ascii dp=2 input=test_neighbor_double_sum output=test_neighbor_double_sum.txt
+r3.out.ascii precision=2 input=test_neighbor_double_sum output=test_neighbor_double_sum.txt
 
 # Third @test with null values
 
 r3.neighbors input=test_neighbor_null output=test_neighbor_null_sum \
     method=sum window=3,3,3 
-r3.out.ascii dp=2 input=test_neighbor_null_sum output=test_neighbor_null_sum.txt
+r3.out.ascii precision=2 input=test_neighbor_null_sum output=test_neighbor_null_sum.txt
 
 

Modified: grass/trunk/raster3d/r3.timestamp/test_suite/test.r3.timestamp.sh
===================================================================
--- grass/trunk/raster3d/r3.timestamp/test_suite/test.r3.timestamp.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/raster3d/r3.timestamp/test_suite/test.r3.timestamp.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -49,6 +49,7 @@
 r3.timestamp map=map3d date=none
 
 # The third @test to check @failure with wrong time stamps
+g.message message="Now checking for expected failures due to wrong time stamps..."
 r3.timestamp map=map3d date="2 years 3 months 8 days"
 r3.timestamp map=map3d date="1 month 5 days"
 r3.timestamp map=map3d date="July 2003"

Modified: grass/trunk/scripts/v.unpack/test_suite/test.v.unpack.sh
===================================================================
--- grass/trunk/scripts/v.unpack/test_suite/test.v.unpack.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/scripts/v.unpack/test_suite/test.v.unpack.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -39,7 +39,7 @@
 # We need to clean before import
 g.remove -f type=vector name=probe_1,probe_2,probe_3
 
-# Test the import with v.unpack
+# Test the compressed import with v.unpack
 v.unpack --o input=probe_1.pack
 v.category input=probe_1 option=report
 v.unpack --o input=probe_2.pack
@@ -47,13 +47,13 @@
 v.unpack --o input=probe_3.pack
 v.category input=probe_3 option=report
 
-# Test the import with v.unpack
-v.unpack --o input=probe_1.pack output=probe_1_uncompressed
+# Test the uncompressed import with v.unpack (Seems to fail?)
+v.unpack --o input=probe_1_uncompressed.pack output=probe_1_uncompressed
 v.category input=probe_1_uncompressed option=report
-v.unpack --o input=probe_2.pack output=probe_2_uncompressed
+v.unpack --o input=probe_2_uncompressed.pack output=probe_2_uncompressed
 v.category input=probe_2_uncompressed option=report
-v.unpack --o input=probe_3.pack output=probe_3_uncompressed
+v.unpack --o input=probe_3_uncompressed.pack output=probe_3_uncompressed
 v.category input=probe_3_uncompressed option=report
 
 g.remove -f type=vector name=probe_1_uncompressed,probe_2_uncompressed,probe_3_uncompressed
-rm *.pack
+#rm *.pack

Modified: grass/trunk/vector/v.surf.bspline/test_suite/profile_cmd.sh
===================================================================
--- grass/trunk/vector/v.surf.bspline/test_suite/profile_cmd.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/vector/v.surf.bspline/test_suite/profile_cmd.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -1,9 +1,13 @@
 # nc2008/grass7 mapset
+
+OUTFILE=callgrind.out.1196
+
 g.region n=221230 s=220404 w=638634 e=639530 res=2
-CMD="v.surf.bspline in=lidar_test raster=elev.lidar_test_cubic method=bicubic -z --o"
-valgrind --tool=callgrind --trace-children=yes $CMD
+CMD="v.surf.bspline in=lidar_test raster=elev.lidar_test_cubic method=bicubic --o"
+valgrind --tool=callgrind --callgrind-out-file=$OUTFILE --trace-children=yes $CMD
 
-kcachegrind callgrind.out.1196
+# http://kcachegrind.sourceforge.net
+kcachegrind $OUTFILE
 
 99% of time is spent in gmath lib's G_math_cholesky_sband_decomposition()
 

Modified: grass/trunk/vector/v.surf.rst/test_suite/profile.sh
===================================================================
--- grass/trunk/vector/v.surf.rst/test_suite/profile.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/vector/v.surf.rst/test_suite/profile.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -1,21 +1,26 @@
 # nc2008/grass7 mapset
+
+OUTFILE=callgrind.out.1196
+
 g.copy vect=elev_lid792_bepts,lidar_test
 v.build lidar_test
 g.region n=221230 s=220816 w=639090 e=639530 res=0.5 -p
-CMD="v.surf.rst in=lidar_test -z elev=omp_test.rst --o"
+CMD="v.surf.rst in=lidar_test elev=omp_test.rst --o"
 time $CMD
 
-valgrind --tool=callgrind --trace-children=yes $CMD
-kcachegrind callgrind.out.1196
+valgrind --tool=callgrind --callgrind-out-file=$OUTFILE --trace-children=yes $CMD
 
+# http://kcachegrind.sourceforge.net
+kcachegrind $OUTFILE
 
-x% of module time is spent in fn()
 
+# x% of module time is spent in fn()
 
 
- r.out.ascii omp_test.rst.g7omp6b dp=6 | md5sum
-32d2890afa57354d0d0e4a69b507e81e
+echo "expected MD5: 32d2890afa57354d0d0e4a69b507e81e"
+r.out.ascii omp_test.rst.g7omp6b dp=6 | md5sum
 
+exit 0
 
 time $CMD
 =========

Modified: grass/trunk/vector/v.timestamp/test_suite/test.v.timestamp.sh
===================================================================
--- grass/trunk/vector/v.timestamp/test_suite/test.v.timestamp.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/vector/v.timestamp/test_suite/test.v.timestamp.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -7,7 +7,7 @@
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
 
 # Lets gerenate a test map
-v.random --o seed=1 n=20 output=map
+v.random --o seed=1 npoints=20 output=map
 
 # The first @test uses several different absolute datum formats
 v.timestamp map=map date=none
@@ -62,6 +62,7 @@
 v.timestamp map=map layer=3
 
 # The third @test to check @failure with wrong time stamps
+g.message message="Now checking for expected failures due to wrong time stamps..."
 v.timestamp map=map date="2 years 3 months 8 days"
 v.timestamp map=map date="1 month 5 days"
 v.timestamp map=map date="July 2003"

Modified: grass/trunk/vector/v.what.rast3/test_suite/test.v.what.rast3.sh
===================================================================
--- grass/trunk/vector/v.what.rast3/test_suite/test.v.what.rast3.sh	2014-12-19 23:01:16 UTC (rev 63633)
+++ grass/trunk/vector/v.what.rast3/test_suite/test.v.what.rast3.sh	2014-12-19 23:46:47 UTC (rev 63634)
@@ -8,7 +8,7 @@
 # Create the volume and the sampling vector map
 r3.mapcalc --o expr="plume = double(col() + row() + depth())"
 # This is how the input data was created
-# v.random --o -z seed=1 output=random_points n=10 zmin=0  zmax=50
+# v.random --o -z seed=1 output=random_points npoints=10 zmin=0  zmax=50
 # v.out.ascii --o format=standard input=random_points output=random_points.txt
 
 v.in.ascii --o -z format=standard input=random_points.txt output=random_points



More information about the grass-commit mailing list