[mapserver-commits] r10366 - in trunk/msautotest: pymod wxs wxs/expected

svn at osgeo.org svn at osgeo.org
Fri Jul 16 16:47:02 EDT 2010


Author: warmerdam
Date: 2010-07-16 20:47:02 +0000 (Fri, 16 Jul 2010)
New Revision: 10366

Modified:
   trunk/msautotest/pymod/mstestlib.py
   trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames1.xml
   trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames2.xml
   trunk/msautotest/wxs/wfs_misc.map
Log:
add support to strip timeStamps as they vary

Modified: trunk/msautotest/pymod/mstestlib.py
===================================================================
--- trunk/msautotest/pymod/mstestlib.py	2010-07-16 20:29:19 UTC (rev 10365)
+++ trunk/msautotest/pymod/mstestlib.py	2010-07-16 20:47:02 UTC (rev 10366)
@@ -140,6 +140,26 @@
     return
 
 ###############################################################################
+# white out timestamp
+
+def detimestamp_file( filename ):
+
+    data = open(filename,'rb').read()
+
+    start = string.find( data, 'timeStamp="' )
+    if start == -1:
+        return
+
+    start = start + 11
+    end = start
+    while data[end+1] != '"':
+        end = end + 1
+
+    new_data = data[:start] + data[end+1:]
+    open(filename,'wb').write(new_data)
+    return
+
+###############################################################################
 # Do windows exponential conversion on the file (e+0nn to e+nn).
 
 def fixexponent_file( filename ):
@@ -290,7 +310,6 @@
             else:
                 deversion = 0
 
-
             command = string.replace( command, '[RESULT]', 'result/'+out_file )
             command = string.replace( command, '[RESULT_DEMIME]', 'result/'+out_file )
             command = string.replace( command, '[RESULT_DEVERSION]', 'result/'+out_file )
@@ -316,6 +335,7 @@
                 deversion_file( 'result/'+out_file )
                 fixexponent_file( 'result/'+out_file )
                 truncate_one_decimal( 'result/'+out_file )
+                detimestamp_file( 'result/'+out_file )
                 
             crlf('result/'+out_file)
             cmp = compare_result( out_file )

Modified: trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames1.xml
===================================================================
--- trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames1.xml	2010-07-16 20:29:19 UTC (rev 10365)
+++ trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames1.xml	2010-07-16 20:47:02 UTC (rev 10366)
@@ -7,6 +7,6 @@
    xmlns:wfs="http://www.opengis.net/wfs"
    xmlns:ogc="http://www.opengis.net/ogc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver http://localhost/path/to/wfs_simple?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=province,popplace&OUTPUTFORMAT=text/xml; subtype=gml/3.1.1  http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" timeStamp="2010-05-14T13:58:16" numberOfFeatures="49">
+   xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver http://localhost/path/to/wfs_simple?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=province,popplace&OUTPUTFORMAT=text/xml; subtype=gml/3.1.1  http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" timeStamp="" numberOfFeatures="49">
 </wfs:FeatureCollection>
 

Modified: trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames2.xml
===================================================================
--- trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames2.xml	2010-07-16 20:29:19 UTC (rev 10365)
+++ trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames2.xml	2010-07-16 20:47:02 UTC (rev 10366)
@@ -7,6 +7,6 @@
    xmlns:wfs="http://www.opengis.net/wfs"
    xmlns:ogc="http://www.opengis.net/ogc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver http://localhost/path/to/wfs_simple?SERVICE=WFS&amp;VERSION=1.1.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=popplace,province&amp;OUTPUTFORMAT=text/xml; subtype=gml/3.1.1  http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" numberOfFeatures="49">
+   xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver http://localhost/path/to/wfs_simple?SERVICE=WFS&amp;VERSION=1.1.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=popplace,province&amp;OUTPUTFORMAT=text/xml; subtype=gml/3.1.1  http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" timeStamp="" numberOfFeatures="49">
 </wfs:FeatureCollection>
 

Modified: trunk/msautotest/wxs/wfs_misc.map
===================================================================
--- trunk/msautotest/wxs/wfs_misc.map	2010-07-16 20:29:19 UTC (rev 10365)
+++ trunk/msautotest/wxs/wfs_misc.map	2010-07-16 20:47:02 UTC (rev 10366)
@@ -9,9 +9,9 @@
 # RUN_PARMS: wfs_filter_startindex2.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=popplace&propertyname=(NAME)&maxfeatures=10&startindex=10" > [RESULT]
 #
 #wfs test valid for 2 type names
-# RUN_PARMS: wfs_getfeature_twotypenames1.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=province,popplace&resulttype=hits" > [RESULT]
+# RUN_PARMS: wfs_getfeature_twotypenames1.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=province,popplace&resulttype=hits" > [RESULT_DEVERSION]
 #
-# RUN_PARMS: wfs_getfeature_twotypenames2.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=popplace,province&resulttype=hits" > [RESULT]
+# RUN_PARMS: wfs_getfeature_twotypenames2.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=popplace,province&resulttype=hits" > [RESULT_DEVERSION]
 
 MAP
 



More information about the mapserver-commits mailing list