-
-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add MSSQL to CI * Update db script and Python tests * Turn off shallow_clone to clone msautotest * Restrict clone size * Add mssql test case and results * Build MSSQL driver * Remove include directory that breaks build * Set projection and update results paths * Use file protocol for pip * Change test order * Add MSSQL to CI * Update db script and Python tests * Turn off shallow_clone to clone msautotest * Fix YAML issues with % * Add full path to work on Windows * Ignore test on Windows as it fails * Update test and skip failing tests * Fix some compiler warnings and disable the rest
- Loading branch information
1 parent
9acb200
commit cb2f603
Showing
20 changed files
with
239 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
# | ||
# Simple OGR Render. | ||
# | ||
# REQUIRES: INPUT=OGR OUTPUT=PNG | ||
# | ||
MAP | ||
|
||
STATUS ON | ||
EXTENT 478300 4762880 481650 4765610 | ||
SIZE 400 300 | ||
|
||
IMAGETYPE png | ||
|
||
LAYER | ||
NAME shppoly | ||
TYPE polygon | ||
CONNECTIONTYPE OGR | ||
CONNECTION "data/shppoly" | ||
DATA "poly" | ||
STATUS default | ||
CLASSITEM "AREA" | ||
CLASS | ||
NAME "test1" | ||
COLOR 0 255 0 | ||
OUTLINECOLOR 255 0 0 | ||
END | ||
END | ||
|
||
END | ||
# | ||
# Simple OGR Render. | ||
# | ||
# REQUIRES: INPUT=OGR OUTPUT=PNG | ||
# | ||
MAP | ||
STATUS ON | ||
EXTENT 478300 4762880 481650 4765610 | ||
SIZE 400 300 | ||
IMAGETYPE png | ||
LAYER | ||
NAME shppoly | ||
TYPE polygon | ||
CONNECTIONTYPE OGR | ||
CONNECTION "data/shppoly/poly.shp" | ||
DATA "poly" | ||
STATUS default | ||
CLASSITEM "AREA" | ||
CLASS | ||
NAME "test1" | ||
COLOR 0 255 0 | ||
OUTLINECOLOR 255 0 0 | ||
END | ||
END | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
set SQLPASSWORD=Password12! | ||
set SERVER=(local)\SQL2017 | ||
|
||
sqlcmd -S "%SERVER%" -Q "USE [master]; CREATE DATABASE msautotest;" | ||
REM sqlcmd -S "%SERVER%" -Q "USE [master]; DROP DATABASE msautotest;" | ||
|
||
ogr2ogr -s_srs epsg:26915 -t_srs epsg:26915 -f MSSQLSpatial "MSSQL:server=%SERVER%;database=msautotest;User Id=sa;Password=%SQLPASSWORD%;" "query/data/bdry_counpy2.shp" -nln "bdry_counpy2" | ||
ogr2ogr -s_srs epsg:26915 -t_srs epsg:26915 -f MSSQLSpatial "MSSQL:server=%SERVER%;database=msautotest;User Id=sa;Password=%SQLPASSWORD%;" "renderers/data/cities.shp" -nln "cities" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# | ||
# Test Filter Expressions with the MSSQL driver plugin - based on filters_postgis.map | ||
# | ||
# REQUIRES: OUTPUT=PNG | ||
# | ||
# RUN_PARMS: filters_mssql_test001.png [SHP2IMG] -m [MAPFILE] -l filters_mssql_test001 -o [RESULT] | ||
# SKIP filters_mssql_test002.png [SHP2IMG] -m [MAPFILE] -l filters_mssql_test002 -o [RESULT] | ||
# SKIP: filters_mssql_test003.png [SHP2IMG] -m [MAPFILE] -l filters_mssql_test003 -o [RESULT] | ||
# SKIP: filters_mssql_test004.png [SHP2IMG] -m [MAPFILE] -l filters_mssql_test004 -o [RESULT] | ||
# RUN_PARMS: filters_mssql_test005.png [SHP2IMG] -m [MAPFILE] -l filters_mssql_test005 -o [RESULT] | ||
# RUN_PARMS: filters_mssql_test006.png [SHP2IMG] -m [MAPFILE] -l filters_mssql_test006 -o [RESULT] | ||
# SKIP: filters_mssql_test007.png [SHP2IMG] -m [MAPFILE] -l filters_mssql_test007 -o [RESULT] | ||
# SKIP: filters_mssql_test008.png [SHP2IMG] -m [MAPFILE] -l filters_mssql_test008 -o [RESULT] | ||
# SKIP: filters_mssql_test009.png [SHP2IMG] -m [MAPFILE] -l filters_mssql_test009 -o [RESULT] | ||
# | ||
MAP | ||
NAME 'filters_mssql' | ||
EXTENT 125000 4785000 789000 5489000 | ||
UNITS METERS | ||
|
||
SIZE 300 300 | ||
IMAGETYPE png8 | ||
|
||
# Simple string comparison | ||
LAYER | ||
NAME 'filters_mssql_test001' | ||
FILTER 'Aitkin' | ||
FILTERITEM 'cty_name' | ||
INCLUDE 'include/bdry_counpy2_mssql.map' | ||
END | ||
|
||
# Simple string comparison (case insensitive) | ||
LAYER | ||
NAME 'filters_mssql_test002' | ||
FILTER 'aitkin'i | ||
FILTERITEM 'cty_name' | ||
INCLUDE 'include/bdry_counpy2_mssql.map' | ||
END | ||
|
||
# Simple regex comparison | ||
LAYER | ||
NAME 'filters_mssql_test003' | ||
FILTER /^S/ | ||
FILTERITEM 'cty_name' | ||
INCLUDE 'include/bdry_counpy2_mssql.map' | ||
END | ||
|
||
# Simple regex comparison (case insensitive) | ||
LAYER | ||
NAME 'filters_mssql_test004' | ||
FILTER /^s/i | ||
FILTERITEM 'cty_name' | ||
INCLUDE 'include/bdry_counpy2_mssql.map' | ||
END | ||
|
||
# Logical expression, string equality | ||
LAYER | ||
NAME 'filters_mssql_test005' | ||
FILTER ('[cty_name]' = 'Itasca') | ||
INCLUDE 'include/bdry_counpy2_mssql.map' | ||
END | ||
|
||
# Logical expression, string equality (case insensitive) | ||
LAYER | ||
NAME 'filters_mssql_test006' | ||
FILTER ('[cty_name]' =* 'wadena') | ||
INCLUDE 'include/bdry_counpy2_mssql.map' | ||
END | ||
|
||
# Logical expression, regex | ||
LAYER | ||
NAME 'filters_mssql_test007' | ||
FILTER ('[cty_name]' ~ '^A') | ||
INCLUDE 'include/bdry_counpy2_mssql.map' | ||
END | ||
|
||
# Logical expression, regex (case insensitive) | ||
LAYER | ||
NAME 'filters_mssql_test008' | ||
FILTER ('[cty_name]' ~* '^a') | ||
INCLUDE 'include/bdry_counpy2_mssql.map' | ||
END | ||
|
||
# Logical expression, in operator | ||
LAYER | ||
NAME 'filters_mssql_test009' | ||
FILTER ('[cty_abbr]' in 'ANOK,RAMS,CARL') | ||
INCLUDE 'include/bdry_counpy2_mssql.map' | ||
END | ||
|
||
# Logical expression, time operands (need to get this test included) | ||
LAYER | ||
NAME 'filters_mssql_test010' | ||
FILTER (`[lastmod]` > `2010-12-01`) | ||
INCLUDE 'include/bdry_counpy2_mssql.map' | ||
END | ||
|
||
LAYER | ||
NAME 'bdry_counpy2' | ||
TYPE LINE | ||
DATA '../query/data/bdry_counpy2.shp' | ||
STATUS DEFAULT | ||
CLASS COLOR 231 231 231 END | ||
END | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CONNECTIONTYPE PLUGIN | ||
PLUGIN "C:\projects\mapserver\build\Release\msplugin_mssql2008.dll" | ||
CONNECTION "SERVER=(local)\SQL2017;DATABASE=msautotest;uid=sa;pwd=Password12!;" | ||
DATA "ogr_geometry from (select * from bdry_counpy2) as foo USING UNIQUE ogr_fid ORCER BY ogr_fid ASC USING SRID=26915" | ||
STATUS OFF | ||
TYPE POLYGON | ||
CLASS | ||
STYLE | ||
COLOR 255 100 100 | ||
OUTLINECOLOR 181 181 181 | ||
END | ||
END | ||
TEMPLATE 'void' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env python | ||
############################################################################### | ||
# $Id: run_test.py 4851 2005-09-22 18:29:07Z frank $ | ||
# | ||
# Project: MapServer | ||
# Purpose: Test harnass script for MapServer autotest. | ||
# Author: Frank Warmerdam, warmerdam@pobox.com | ||
# | ||
############################################################################### | ||
# Copyright (c) 2002, Frank Warmerdam <warmerdam@pobox.com> | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a | ||
# copy of this software and associated documentation files (the "Software"), | ||
# to deal in the Software without restriction, including without limitation | ||
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
# and/or sell copies of the Software, and to permit persons to whom the | ||
# Software is furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included | ||
# in all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
# DEALINGS IN THE SOFTWARE. | ||
############################################################################### | ||
|
||
import os | ||
import pytest | ||
import sys | ||
|
||
sys.path.append( '../pymod' ) | ||
|
||
import mstestlib | ||
|
||
@pytest.mark.parametrize('map,out_file,command', mstestlib.get_pytests(os.path.dirname(os.path.abspath(__file__)))) | ||
def test(map, out_file, command, extra_args): | ||
mstestlib.run_pytest(map, out_file, command, extra_args) | ||
|
||
|
||
############################################################################### | ||
# main() | ||
|
||
if __name__ == '__main__': | ||
sys.exit(mstestlib.pytest_main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters