From: Sandro Santilli Date: Mon, 23 Jun 2014 07:37:53 +0000 (+0000) Subject: Subtract size of offdb raster paths in test for ST_MemSize X-Git-Tag: 2.2.0rc1~1074 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3c5bbe26b5c932dde8c8f1fbb016891a44a912a;p=postgis Subtract size of offdb raster paths in test for ST_MemSize Doing so should make the resulting size equal on all systems, fixing the travis builds: https://travis-ci.org/postgis/postgis#L2373-L2380 git-svn-id: http://svn.osgeo.org/postgis/trunk@12636 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/raster/test/regress/rt_utility.sql b/raster/test/regress/rt_utility.sql index d8dee3da5..8ce2434c4 100644 --- a/raster/test/regress/rt_utility.sql +++ b/raster/test/regress/rt_utility.sql @@ -439,7 +439,20 @@ ORDER BY rid; ----------------------------------------------------------------------- SELECT 'ms1', ST_MemSize(ST_MakeEmptyRaster(10, 10, 0, 0, 1, -1, 0, 0, 0)); -SELECT 'ms2', ST_MemSize(rast) from raster_outdb_template order by rid; +WITH +mem AS ( + SELECT rid, ST_MemSize(rast) as size from raster_outdb_template +), +path AS ( + SELECT rid, sum(length(st_bandpath(rast,n))) as len, + array_agg(st_bandpath(rast,n)) as agg + FROM raster_outdb_template, generate_series(1,ST_NumBands(rast)) n + GROUP BY rid +) +SELECT 'ms2', mem.rid, mem.size - path.len + from mem, path + where mem.rid = path.rid + order by mem.rid; ----------------------------------------------------------------------- -- st_bandpath() diff --git a/raster/test/regress/rt_utility_expected b/raster/test/regress/rt_utility_expected index 771ec378c..95d31e4e6 100644 --- a/raster/test/regress/rt_utility_expected +++ b/raster/test/regress/rt_utility_expected @@ -52,10 +52,10 @@ Skewed raster of 10x10 pixels has 1 band and extent of BOX(0 -10,10 0.0001) band 1 of pixtype 8BUI is out-db with NODATA value of 255 band 2 of pixtype 8BUI is in-db with NODATA value of 0 ms1|64 -ms2|280 -ms2|280 -ms2|8240 -ms2|8240 +ms2|1|82 +ms2|2|82 +ms2|3|8174 +ms2|4|8174 NOTICE: Could not find raster band of index 1 when getting band path. Returning NULL bandpath1| bandpath2|testraster.tif