207 changes: 0 additions & 207 deletions tests/src/python/qgis_local_server_spawn/flup/server/ajp.py

This file was deleted.

978 changes: 0 additions & 978 deletions tests/src/python/qgis_local_server_spawn/flup/server/ajp_base.py

This file was deleted.

180 changes: 0 additions & 180 deletions tests/src/python/qgis_local_server_spawn/flup/server/threadedserver.py

This file was deleted.

150 changes: 0 additions & 150 deletions tests/src/python/qgis_local_server_spawn/flup/server/threadpool.py

This file was deleted.

473 changes: 0 additions & 473 deletions tests/src/python/qgis_local_server_spawn/flup_fcgi_client.py

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions tests/src/python/qgis_local_server_spawn/spawn-fcgi/AUTHORS

This file was deleted.

20 changes: 0 additions & 20 deletions tests/src/python/qgis_local_server_spawn/spawn-fcgi/CMakeLists.txt

This file was deleted.

31 changes: 0 additions & 31 deletions tests/src/python/qgis_local_server_spawn/spawn-fcgi/COPYING

This file was deleted.

This file was deleted.

44 changes: 0 additions & 44 deletions tests/src/python/qgis_local_server_spawn/spawn-fcgi/NEWS

This file was deleted.

41 changes: 0 additions & 41 deletions tests/src/python/qgis_local_server_spawn/spawn-fcgi/README

This file was deleted.

24 changes: 0 additions & 24 deletions tests/src/python/qgis_local_server_spawn/spawn-fcgi/autogen.sh

This file was deleted.

88 changes: 0 additions & 88 deletions tests/src/python/qgis_local_server_spawn/spawn-fcgi/configure.ac

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

122 changes: 0 additions & 122 deletions tests/src/python/qgis_local_server_spawn/spawn-fcgi/spawn-fcgi.1

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

732 changes: 0 additions & 732 deletions tests/src/python/qgis_local_server_spawn/spawn-fcgi/src/spawn-fcgi.c

This file was deleted.

This file was deleted.

83 changes: 83 additions & 0 deletions tests/testdata/qgis_local_server/fcgi/scripts/spawn_fcgi_mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#! /bin/bash

PROCESS="mapserv"
LABEL="org.qgis.test-${PROCESS}"
USAGE="${0} {stop|status} or {start|restart spawn_bin fcgi_socket fcgi_bin}"

if [ ! -z $2 ]; then
SPAWN_BIN=$2
if [ ! -z $3 ]; then
FCGI_SOCKET=$3
fi
if [ ! -z $4 ]; then
FCGI_BIN=$4
fi
fi

START () {
launchctl submit -l $LABEL -- "${SPAWN_BIN}" -n -s "${FCGI_SOCKET}" -- "${FCGI_BIN}"
return $?
}

STATUS () {
launchctl list $LABEL 2>&1 | grep -c 'unknown response'
}

case $1 in
start)
echo -n "Starting ${PROCESS}"
res=$(STATUS)
if [ $res -gt 0 ]; then
echo ""
res=$(START)
exit $res
else
echo ": already running"
exit 0
fi
;;
stop)
echo -n "Stopping ${PROCESS}"
res=$(STATUS)
if [ $res -eq 0 ]; then
echo ""
launchctl remove $LABEL
exit $?
else
echo ": not running"
exit 0
fi
;;
restart)
echo -n "Restarting ${PROCESS}"
# using `launchctl submit` sets the KeepAlive=true for submitted process,
# i.e. auto-restarted on stop
res=$(STATUS)
if [ $res -eq 0 ]; then
echo ""
launchctl stop $LABEL
exit $?
else
echo ": not running, starting now"
res=$(START)
exit $res
fi
;;
status)
echo -n "Service ${LABEL}: "
# error when not in list: launchctl list returned unknown response
# NOTE: success does not mean process is properly running, just that its service is loaded
res=$(STATUS)
if [ $res -gt 0 ]; then
echo "unloaded"
else
echo "loaded"
fi
exit $res
;;
*)
echo -e "Usage:\n ${USAGE}"
exit 1
;;
esac

10 changes: 10 additions & 0 deletions tests/testdata/qgis_local_server/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Local QGIS Server Default Index</title>
</head>
<body>
<h2 style="font-family:Arial;">Web Server Working<h2/>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#######################################################################
##
## Corresponding documentation:
##
## http://www.lighttpd.net/documentation/access.html
##
server.modules += ( "mod_accesslog" )

##
## Default access log.
##
accesslog.filename = log_root + "/access.log"

##
## The default format produces CLF compatible output.
## For available parameters see access.txt
##
#accesslog.format = "%h %l %u %t \"%r\" %b %>s \"%{User-Agent}i\" \"%{Referer}i\""

##
## If you want to log to syslog you have to unset the
## accesslog.use-syslog setting and uncomment the next line.
##
#accesslog.use-syslog = "enable"

#
#######################################################################
47 changes: 47 additions & 0 deletions tests/testdata/qgis_local_server/lighttpd/config/conf/debug.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#######################################################################
##
## Debug options
## ---------------
##
## Enable those options for debugging the behavior
##
## The settings can be set per location/vhost.
##

##
## log-request-handling allows you to track the request
## handing inside lighttpd.
##
#debug.log-request-handling = "enable"

##
## log all request headers.
##
#debug.log-request-header = "enable"

##
## similar to log-request-header.
## but only logs if we encountered an error.
## (return codes 400 and 5xx)
##
#debug.log-request-header-on-error = "enable"

##
## log the header we send out to the client.
##
#debug.log-response-header = "enable"

##
## log if a file wasnt found in the error log.
##
#debug.log-file-not-found = "enable"

##
## debug conditionals handling
##
#debug.log-condition-handling = "enable"

#
#######################################################################


Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#######################################################################
##
## Dirlisting Module
## -------------------
##
## See http://www.lighttpd.net/documentation/dirlisting.html
##

##
## Enabled Directory listing
##
dir-listing.activate = "disable"

##
## Hide dot files from the listing?
## By default they are listed.
##
dir-listing.hide-dotfiles = "disable"

##
## list of regular expressions. Files that match any of the specified
## regular expressions will be excluded from directory listings.
##
dir-listing.exclude = ( "~$" )

##
## set a encoding for the generated directory listing
##
## If you file-system is not using ASCII you have to set the encoding of
## the filenames as they are put into the HTML listing AS IS (with XML
## encoding)
##
dir-listing.encoding = "UTF-8"

##
## Specify the url to an optional CSS file.
##
#dir-listing.external-css = "/dirindex.css"

##
## Include HEADER.txt files above the directory listing.
## You can disable showing the HEADER.txt in the listing.
##
dir-listing.hide-header-file = "disable"
dir-listing.show-header = "disable"

##
## Include README.txt files above the directory listing.
## You can disable showing the README.txt in the listing.
##
dir-listing.hide-readme-file = "disable"
dir-listing.show-readme = "disable"

##
#######################################################################
16 changes: 16 additions & 0 deletions tests/testdata/qgis_local_server/lighttpd/config/conf/fastcgi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#######################################################################
##
## FastCGI Module
## ---------------
##
## http://redmine.lighttpd.net/projects/1/wiki/Docs_ModFastCGI
##
server.modules += ( "mod_fastcgi" )

alias.url = ( "/cgi-bin/" => base_dir + "cgi-bin/" )

fastcgi.server = (
"/cgi-bin/" =>
(( "socket" => state_dir + "/run/qgs_mapserv.sock"
))
)
78 changes: 78 additions & 0 deletions tests/testdata/qgis_local_server/lighttpd/config/conf/mime.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#######################################################################
##
## MimeType handling
## -------------------
##
## http://www.lighttpd.net/documentation/configuration.html#mimetypes
##
## Use the "Content-Type" extended attribute to obtain mime type if
## possible
##
mimetype.use-xattr = "disable"

##
## mimetype mapping
##
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".spec" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar",
".rpm" => "application/x-rpm",
".json" => "application/json",
# make the default mime type application/octet-stream.
"" => "application/octet-stream",
)


#
#######################################################################

51 changes: 51 additions & 0 deletions tests/testdata/qgis_local_server/lighttpd/config/conf/scgi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#######################################################################
##
## FastCGI Module
## ---------------
##
## http://www.lighttpd.net/documentation/scgi.html
##
server.modules += ( "mod_scgi" )

##
## Ruby on Rails Example
##
## Normally you only run one Rails application on one vhost.
##
#$HTTP["host"] == "rails1.example.com" {
# server.document-root = server_root + "/rails/someapp/public"
# server.error-handler-404 = "/dispatch.fcgi"
# scgi.server = ( ".scgi" =>
# ("scgi-someapp" =>
# ( "socket" => socket_dir + "/someapp-scgi.socket",
# "bin-path" => server_root + "/rails/someapp/public/dispatch.scgi",
# "bin-environment" => (
# "RAILS_ENV" => "production",
# "TMP" => home_dir + "/rails/someapp",
# ),
# )
# )
# )
#}

##
## 2nd Ruby on Rails Example
##
## This time we launch the rails application via scgi_rails externally.
##
#$HTTP["host"] == "rails2.example.com" {
# server.document-root = server_root + "/rails/someapp/public"
# server.error-handler-404 = "/dispatch.scgi"
# scgi.server = ( ".scgi" =>
# ( "scgi-tcp" =>
# (
# "host" => "127.0.0.1",
# "port" => 9998,
# "check-local" => "disable",
# )
# )
# )
#}

##
#######################################################################
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#######################################################################
##
## Simple Virtual hosting
## ------------------------
##
## http://www.lighttpd.net/documentation/simple-vhost.html
##
server.modules += ( "mod_simple_vhost" )

## If you want name-based virtual hosting add the next three settings and load
## mod_simple_vhost
##
## document-root =
## virtual-server-root + virtual-server-default-host + virtual-server-docroot
## or
## virtual-server-root + http-host + virtual-server-docroot
##
simple-vhost.server-root = vhosts_dir + "/"
simple-vhost.default-host = "default.example.com"
simple-vhost.document-root = "/htdocs/"

##
## Print some errors for finding the document-root
##
#simple-vhost.debug = "enable"

##
#######################################################################
24 changes: 24 additions & 0 deletions tests/testdata/qgis_local_server/lighttpd/config/conf/status.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#######################################################################
##
## Status Module
## ---------------
##
## see http://www.lighttpd.net/documentation/status.html
##
server.modules += ( "mod_status" )

$HTTP["remoteip"] == "127.0.0.0/8" {
##
## configure urls for the various parts of the module.
##
status.status-url = "/server-status"
status.config-url = "/server-config"
status.statistics-url = "/server-statistics"
##
## add JavaScript which allows client-side sorting for the connection
## overview
##
status.enable-sort = "enable"
}
##
#######################################################################
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# var.conf_dir = env.QGIS_SERVER_CONFIG_DIR + "/"
var.base_dir = env.QGIS_SERVER_TEMP_DIR + "/"

var.log_root = base_dir + "log/"
var.server_root = base_dir + "www/"
var.state_dir = base_dir + "var/"
var.home_dir = base_dir + "var/"

server.modules = (
"mod_access",
"mod_alias"
)
server.port = 8448
server.use-ipv6 = "disable"
server.bind = "localhost"
server.document-root = server_root + "htdocs"
server.pid-file = state_dir + "/lighttpd.pid"
server.errorlog = log_root + "/error.log"

include "conf/access_log.conf"
include "conf/debug.conf"

server.event-handler = "select"
server.network-backend = "writev"
server.max-fds = 256
server.stat-cache-engine = "simple"
server.max-connections = 128
#server.max-keep-alive-idle = 5
#server.max-keep-alive-requests = 16
#server.max-request-size = 0
# timeout?
#server.max-read-idle = 60
#server.max-write-idle = 360
#server.kbytes-per-second = 128
#connection.kbytes-per-second = 32

index-file.names += (
"index.xhtml", "index.html", "index.htm", "default.htm", "index.php"
)

url.access-deny = ( "~", ".inc" )

# limit to local access only
$HTTP["remoteip"] !~ "127.0.0.1" {
url.access-deny = ( "" )
}

$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )

#server.error-handler-404 = "/error-handler.html"

#server.errorfile-prefix = "/srv/www/htdocs/errors/status-"

include "conf/mime.conf"
include "conf/dirlisting.conf"

server.follow-symlink = "enable"
server.upload-dirs = ( "/var/tmp" )

include "conf/fastcgi.conf"
172 changes: 172 additions & 0 deletions tests/testdata/qgis_local_server/lighttpd/config/modules.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
#######################################################################
##
## Modules to load
## -----------------
##
## at least mod_access and mod_accesslog should be loaded
## all other module should only be loaded if really neccesary
##
## - saves some time
## - saves memory
##
## the default module set contains:
##
## "mod_indexfile", "mod_dirlisting", "mod_staticfile"
##
## you dont have to include those modules in your list
##
## Modules, which are pulled in via conf.d/*.conf
##
## NOTE: the order of modules is important.
##
## - mod_accesslog -> conf.d/access_log.conf
## - mod_compress -> conf.d/compress.conf
## - mod_status -> conf.d/status.conf
## - mod_webdav -> conf.d/webdav.conf
## - mod_cml -> conf.d/cml.conf
## - mod_evhost -> conf.d/evhost.conf
## - mod_simple_vhost -> conf.d/simple_vhost.conf
## - mod_mysql_vhost -> conf.d/mysql_vhost.conf
## - mod_trigger_b4_dl -> conf.d/trigger_b4_dl.conf
## - mod_userdir -> conf.d/userdir.conf
## - mod_rrdtool -> conf.d/rrdtool.conf
## - mod_ssi -> conf.d/ssi.conf
## - mod_cgi -> conf.d/cgi.conf
## - mod_scgi -> conf.d/scgi.conf
## - mod_fastcgi -> conf.d/fastcgi.conf
## - mod_proxy -> conf.d/proxy.conf
## - mod_secdownload -> conf.d/secdownload.conf
## - mod_expire -> conf.d/expire.conf
##

server.modules = (
"mod_access",
# "mod_alias",
# "mod_auth",
# "mod_evasive",
# "mod_redirect",
# "mod_rewrite",
# "mod_setenv",
# "mod_usertrack",
)

##
#######################################################################

#######################################################################
##
## Config for various Modules
##

##
## mod_ssi
##
#include "conf.d/ssi.conf"

##
## mod_status
##
#include "conf.d/status.conf"

##
## mod_webdav
##
#include "conf.d/webdav.conf"

##
## mod_compress
##
#include "conf.d/compress.conf"

##
## mod_userdir
##
#include "conf.d/userdir.conf"

##
## mod_magnet
##
#include "conf.d/magnet.conf"

##
## mod_cml
##
#include "conf.d/cml.conf"

##
## mod_rrdtool
##
#include "conf.d/rrdtool.conf"

##
## mod_proxy
##
#include "conf.d/proxy.conf"

##
## mod_expire
##
#include "conf.d/expire.conf"

##
## mod_secdownload
##
#include "conf.d/secdownload.conf"

##
#######################################################################

#######################################################################
##
## CGI modules
##

##
## SCGI (mod_scgi)
##
#include "conf.d/scgi.conf"

##
## FastCGI (mod_fastcgi)
##
#include "conf.d/fastcgi.conf"

##
## plain old CGI (mod_cgi)
##
#include "conf.d/cgi.conf"

##
#######################################################################

#######################################################################
##
## VHost Modules
##
## Only load ONE of them!
## ========================
##

##
## You can use conditionals for vhosts aswell.
##
## see http://www.lighttpd.net/documentation/configuration.html
##

##
## mod_evhost
##
#include "conf.d/evhost.conf"

##
## mod_simple_vhost
##
#include "conf.d/simple_vhost.conf"

##
## mod_mysql_vhost
##
#include "conf.d/mysql_vhost.conf"

##
#######################################################################
85 changes: 85 additions & 0 deletions tests/testdata/qgis_local_server/lighttpd/scripts/lighttpd_mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#! /bin/bash

PROCESS="lighttpd"
LABEL="org.qgis.test-${PROCESS}"
USAGE="${0} {stop|status} or {start|restart lighttpd-path lighttpd_conf qgis_server_temp_dir}"

if [ ! -z $2 ]; then
LIGHTTPD_BIN=$2
if [ ! -z $3 ]; then
LIGHTTPD_CONF_PATH=$3
fi
if [ ! -z $4 ]; then
QGIS_SERVER_TEMP_DIR=$4
fi
fi

START () {
launchctl setenv QGIS_SERVER_TEMP_DIR "${QGIS_SERVER_TEMP_DIR}"
launchctl submit -l $LABEL -- "${LIGHTTPD_BIN}" -D -f "${LIGHTTPD_CONF_PATH}"
return $?
}

STATUS () {
launchctl list $LABEL 2>&1 | grep -c 'unknown response'
}

case $1 in
start)
echo -n "Starting ${PROCESS}"
res=$(STATUS)
if [ $res -gt 0 ]; then
echo ""
res=$(START)
exit $res
else
echo ": already running"
exit 0
fi
;;
stop)
echo -n "Stopping ${PROCESS}"
res=$(STATUS)
if [ $res -eq 0 ]; then
echo ""
launchctl unsetenv QGIS_TEST_TEMP_DIR
launchctl remove $LABEL
exit $?
else
echo ": not running"
exit 0
fi
;;
restart)
echo -n "Restarting ${PROCESS}"
# using `launchctl submit` sets the KeepAlive=true for submitted process,
# i.e. auto-restarted on stop
res=$(STATUS)
if [ $res -eq 0 ]; then
echo ""
launchctl stop $LABEL
exit $?
else
echo ": not running, starting now"
res=$(START)
exit $res
fi
;;
status)
echo -n "Service ${LABEL}: "
# error when not in list: launchctl list returned unknown response
# NOTE: success does not mean process is properly running, just that its service is loaded
res=$(STATUS)
if [ $res -gt 0 ]; then
echo "unloaded"
else
echo "loaded"
fi
exit $res
;;
*)
echo -e "Usage:\n ${USAGE}"
exit 1
;;
esac

21 changes: 21 additions & 0 deletions tests/testdata/qgis_local_server/test-project/background.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="1.9.0-Master" minimumScale="-4.65661e-10" maximumScale="1e+08" minLabelScale="0" maxLabelScale="1e+08" hasScaleBasedVisibilityFlag="0" scaleBasedLabelVisibilityFlag="0">
<renderer-v2 symbollevels="0" type="singleSymbol">
<symbols>
<symbol alpha="1" type="fill" name="0">
<layer pass="0" class="SimpleFill" locked="0">
<prop k="border_width_unit" v="MM"/>
<prop k="color" v="152,219,249,255"/>
<prop k="color_border" v="0,0,0,255"/>
<prop k="offset" v="0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="style" v="solid"/>
<prop k="style_border" v="no"/>
<prop k="width_border" v="0.26"/>
</layer>
</symbol>
</symbols>
<rotation field=""/>
<sizescale field="" scalemethod="area"/>
</renderer-v2>
</qgis>
Binary file not shown.
27 changes: 27 additions & 0 deletions tests/testdata/qgis_local_server/test-project/point.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="1.9.0-Master" minimumScale="-4.65661e-10" maximumScale="1e+08" minLabelScale="0" maxLabelScale="1e+08" hasScaleBasedVisibilityFlag="0" scaleBasedLabelVisibilityFlag="0">
<renderer-v2 symbollevels="0" type="RuleRenderer">
<rules>
<rule filter="&quot;text&quot; IS NOT NULL" symbol="0"/>
</rules>
<symbols>
<symbol alpha="1" type="marker" name="0">
<layer pass="0" class="SimpleMarker" locked="0">
<prop k="angle" v="0"/>
<prop k="color" v="61,128,45,255"/>
<prop k="color_border" v="0,0,0,255"/>
<prop k="name" v="circle"/>
<prop k="offset" v="0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline_width" v="0"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="scale_method" v="area"/>
<prop k="size" v="2"/>
<prop k="size_unit" v="MM"/>
</layer>
</symbol>
</symbols>
<rotation field=""/>
<sizescale field="" scalemethod="area"/>
</renderer-v2>
</qgis>

Large diffs are not rendered by default.