Changeset 543


Ignore:
Timestamp:
Nov 20, 2014, 11:27:07 AM (10 years ago)
Author:
djay
Message:

Small fixes in cgal Makefile, update testing script, update HISTORY.txt

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/testing/requests/igml_o.xml

    r348 r543  
    33<wps:DataInputs>
    44<wps:Input>
    5 <ows:Identifier>InputPolygon</ows:Identifier>
     5<ows:Identifier>InputName</ows:Identifier>
    66<ows:Title>Playground area</ows:Title>
    77<wps:Data>
  • trunk/testing/run.sh

    r485 r543  
    44Please use the following syntaxe:
    55
    6   ./run.sh <WPSInstance> <ServiceName>
    7 
    8 where <WPSInstance> should be the url to a WPS Server and <ServiceName> should
    9 be the service name you want to run tests with.
     6  ./run.sh <WPSInstance> <ServiceName> <Request>
     7
     8where <WPSInstance> should be the url to a WPS Server, <ServiceName> should
     9be the service name you want to run tests with (you can use multiple service
     10names, use quote and seperate them using space), <Request> should contain the
     11requests you want to use (you can use more than one at a time).
    1012
    1113For instance to test the Buffer service on a localhost WPS server, use the
    1214following command:
    1315
    14   ./run.sh http://localhost/cgi-bin/zoo_loader.cgi Buffer
     16  ./run.sh http://localhost/cgi-bin/zoo_loader.cgi Buffer "GetCapabilities DescribeProcess Execute"
    1517
    1618EOF
     
    2628NBRequests=1000
    2729NBConcurrents=50
     30pstat=0
     31
     32iter=0
     33
     34function testPostRequests {
     35#
     36# Tests for Execute using POST requests
     37#
     38    for i in $1;
     39    do
     40        cat requests/${i}.xml | sed "s:ServiceName:${ServiceName}:g;s:InputName:$(cat tmp/inputName.txt):g" > tmp/${i}1.xml
     41        if [ -z "$(echo $i | grep async)" ]; then
     42            postRequest "${WPSInstance}" "tmp/outputE${i}.xml" "Execute" "tmp/${i}1.xml"
     43        else
     44            postRequest "${WPSInstance}" "tmp/outputE${i}.xml" "Execute" "tmp/${i}1.xml" "async"
     45        fi
     46        echo ""
     47    done
     48
     49}
     50
     51function plotStat {
     52    echo " **"
     53    echo " * Plot statistics ..."
     54    echo " **"
     55    cp run.tsv tmp/run$1.tsv
     56    sed "s:\[image\]:$2:g;s:\[file\]:$3:g" -i tmp/run$1.tsv
     57    gnuplot tmp/run$1.tsv
     58    cp run1.tsv tmp/run1$1.tsv
     59    sed "s:\[image\]:$(echo $2 | sed "s:.jpg:1.jpg:g"):g;s:\[file\]:$3:g" -i tmp/run1$1.tsv
     60    gnuplot tmp/run1$1.tsv
     61}
     62
    2863
    2964function kvpRequest {
    3065    echo " **"
    31     echo " * Simple KVP request start on $(date)"
    32     echo " * [$1] "
    33     echo " **"
     66    echo " <h1> Simple KVP request start on $(date) </h1>"
     67    echo " <a href='$1'>$1</a>"
    3468   
    3569    RESP=$(curl -v -o "$2" "$1" 2> tmp/temp.log; grep "< HTTP" tmp/temp.log | cut -d' ' -f3)
     
    4579        echo " * Schema: [http://schemas.opengis.net/ows/1.1.0/${3}.xsd]"
    4680        echo " *********************************"
    47         xmllint --noout --schema http://schemas.opengis.net/ows/1.1.0/${3}.xsd "$2"
     81        xmllint --noout --schema http://schemas.opengis.net/ows/1.1.0/${3}.xsd "$2" 2> tmp/res${iter}.txt
    4882        echo " *********************************"
    4983        echo "Verifying that the missing / wrong argument was referenced in locator and the exceptionCode take the corresponding value ..."
     
    5993        echo " * Checking for ${3} response XML validity..."
    6094        echo " * Schema: [http://schemas.opengis.net/wps/1.0.0/wps${3}_response.xsd]"
    61         xmllint --noout --schema http://schemas.opengis.net/wps/1.0.0/wps${3}_response.xsd "$2"
    62     fi
    63     echo " **"
    64     echo " * Sending 10000 ${3} requests starting on $(date) ..."
    65     echo " **"
    66     ab -n "$NBRequests" -c "$NBConcurrents" "$1"
     95        xmllint --noout --schema http://schemas.opengis.net/wps/1.0.0/wps${3}_response.xsd "$2" 2> tmp/res${iter}.txt
     96        v="$(cat tmp/res${iter}.txt | grep validates)"
     97        echo ""
     98    fi
     99    echo " **"
     100    echo " * Sending $NBRequests ${3} requests starting on $(date) ..."
     101    echo " **"
     102    ab -g tmp/stat${3}${iter}.plot -e tmp/stat${3}${iter}.txt -n "$NBRequests" -c "$NBConcurrents" "$1"
     103    if [ "$pstat" -eq 1 ]; then
     104        plotStat ${iter} tmp/stat${3}${iter}.jpg tmp/stat${3}${iter}.plot
     105    fi
     106    iter=$(expr $iter + 1)
    67107    echo " ** Ending on $(date)"
    68108}
     
    91131        echo " *********************************"
    92132    fi
    93     echo " * Sending 10000 ${3} XML requests on $(date) ..."
    94     ab -T "text/xml" -p "$4" -n "$NBRequests" -c "$NBConcurrents" "$1"
     133    echo " * Sending $NBRequests ${3} XML requests on $(date) ..."
     134    ab -g tmp/stat${3}${iter}.plot -e tmp/stat${3}${iter}.txt -T "text/xml" -p "$4" -n "$NBRequests" -c "$NBConcurrents" "$1"
     135    if [ "$pstat" -eq 1 ]; then
     136        plotStat ${iter} tmp/stat${3}${iter}.jpg tmp/stat${3}${iter}.plot
     137    fi
     138    iter=$(expr $iter + 1)
    95139    echo " ** Ending on $(date)"
    96140}
     
    140184}
    141185
    142 
     186for i in $3; do
     187    if [ "$i" == "GetCapabilities" ]; then
    143188#
    144189# Tests for GetCapabilities using KVP (including wrong requests) and POST requests
    145190#
    146 kvpRequest "${WPSInstance}?REQUEST=GetCapabilities&SERVICE=WPS" "tmp/outputGC1.xml" "GetCapabilities"
    147 
    148 params='"request=GetCapabilities" "service=WPS"'
    149 
    150 suffix=$(kvpRequestWrite -1 "$params")
    151 kvpRequest "${WPSInstance}?$suffix" "tmp/outputGC2.xml" "GetCapabilities"
    152 
    153 for j in 0 1; do
    154     suffix=$(kvpRequestWrite $j "$params")
    155     kvpRequest "${WPSInstance}?$suffix" "tmp/outputGC$(expr $j + 3).xml" "owsExceptionReport"
     191        kvpRequest "${WPSInstance}?REQUEST=GetCapabilities&SERVICE=WPS" "tmp/outputGC1.xml" "GetCapabilities"
     192
     193        params='"request=GetCapabilities" "service=WPS"'
     194
     195        suffix=$(kvpRequestWrite -1 "$params")
     196        kvpRequest "${WPSInstance}?$suffix" "tmp/outputGC2.xml" "GetCapabilities"
     197
     198        for j in 0 1; do
     199            suffix=$(kvpRequestWrite $j "$params")
     200            kvpRequest "${WPSInstance}?$suffix" "tmp/outputGC$(expr $j + 3).xml" "owsExceptionReport"
     201        done
     202
     203        paramsw='"request=GetCapabilitie" "service=WXS"'
     204        for j in 0 1; do
     205            suffix=$(kvpWrongRequestWrite $j "$params" "$paramsw")
     206            kvpRequest "${WPSInstance}?$suffix" "tmp/outputGC$(expr $j + 5).xml" "owsExceptionReport"
     207        done
     208
     209        echo "Check if differences between upper case and lower case parameter names"
     210        diff -ru tmp/outputGC1.xml tmp/outputGC2.xml
     211
     212        echo ""
     213
     214        curl -o tmp/10_wpsGetCapabilities_request.xml http://schemas.opengis.net/wps/1.0.0/examples/10_wpsGetCapabilities_request.xml
     215        postRequest "${WPSInstance}" "tmp/outputGCp.xml" "GetCapabilities" "tmp/10_wpsGetCapabilities_request.xml"
     216        echo ""
     217    fi
     218    if [ "$i" == "DescribeProcess" ]; then
     219#
     220# Tests for DescribeProcess using KVP and POST requests
     221#
     222        kvpRequest "${WPSInstance}?request=DescribeProcess&service=WPS&version=1.0.0&Identifier=ALL" "tmp/outputDPall.xml" "DescribeProcess"
     223
     224        params='"request=DescribeProcess" "service=WPS" "version=1.0.0" "Identifier='${ServiceName}'"'
     225
     226        suffix=$(kvpRequestWrite -1 "$params")
     227        kvpRequest "${WPSInstance}?$suffix" "tmp/outputDPb1.xml" "DescribeProcess"
     228       
     229        for j in 0 1 2 3; do
     230            suffix=$(kvpRequestWrite $j "$params")
     231            kvpRequest "${WPSInstance}?$suffix" "tmp/outputDPb$(expr $j + 2).xml" "owsExceptionReport"
     232        done
     233
     234        paramsw='"request=DescribeProces" "service=WXS" "version=1.2.0" "Identifier=Undefined"'
     235       
     236        for j in 0 1 2 3; do
     237            suffix=$(kvpWrongRequestWrite $j "$params")
     238            kvpRequest "${WPSInstance}?$suffix" "tmp/outputDPb$(expr $j + 6).xml" "owsExceptionReport"
     239        done
     240
     241
     242        cat requests/dp.xml | sed "s:ServiceName:${ServiceName}:g" > tmp/dp1.xml
     243        postRequest "${WPSInstance}" "tmp/outputDPp.xml" "DescribeProcess" "tmp/dp1.xml"
     244        xsltproc extractInputs.xsl tmp/outputDPp.xml > tmp/inputName.txt
     245        echo ""
     246    fi
     247    if [ "$i" == "ExecuteSync" ]; then
     248        testPostRequests "ijson_o igml_o ir_o ir_or irb_o irb_or"
     249        echo ""
     250    fi
     251    if [ "$i" == "ExecuteAsync" ]; then
     252        testPostRequests "ir_o_async ir_or_async irb_o_async irb_or_async"
     253        echo ""
     254    fi
    156255done
    157 
    158 paramsw='"request=GetCapabilitie" "service=WXS"'
    159 for j in 0 1; do
    160     suffix=$(kvpWrongRequestWrite $j "$params" "$paramsw")
    161     kvpRequest "${WPSInstance}?$suffix" "tmp/outputGC$(expr $j + 5).xml" "owsExceptionReport"
    162 done
    163 
    164 echo "Check if differences between upper case and lower case parameter names"
    165 diff -ru tmp/outputGC1.xml tmp/outputGC2.xml
    166 
    167 echo ""
    168 
    169 curl -o tmp/10_wpsGetCapabilities_request.xml http://schemas.opengis.net/wps/1.0.0/examples/10_wpsGetCapabilities_request.xml
    170 postRequest "${WPSInstance}" "tmp/outputGCp.xml" "GetCapabilities" "tmp/10_wpsGetCapabilities_request.xml"
    171 echo ""
    172 
    173 #
    174 # Tests for DescribeProcess using KVP and POST requests
    175 #
    176 kvpRequest "${WPSInstance}?request=DescribeProcess&service=WPS&version=1.0.0&Identifier=ALL" "tmp/outputDPall.xml" "DescribeProcess"
    177 
    178 params='"request=DescribeProcess" "service=WPS" "version=1.0.0" "Identifier='${ServiceName}'"'
    179 
    180 suffix=$(kvpRequestWrite -1 "$params")
    181 kvpRequest "${WPSInstance}?$suffix" "tmp/outputDPb1.xml" "DescribeProcess"
    182 
    183 for j in 0 1 2 3; do
    184     suffix=$(kvpRequestWrite $j "$params")
    185     kvpRequest "${WPSInstance}?$suffix" "tmp/outputDPb$(expr $j + 2).xml" "owsExceptionReport"
    186 done
    187 
    188 paramsw='"request=DescribeProces" "service=WXS" "version=1.2.0" "Identifier=Undefined"'
    189 
    190 for j in 0 1 2 3; do
    191     suffix=$(kvpWrongRequestWrite $j "$params")
    192     kvpRequest "${WPSInstance}?$suffix" "tmp/outputDPb$(expr $j + 6).xml" "owsExceptionReport"
    193 done
    194 
    195 
    196 cat requests/dp.xml | sed "s:ServiceName:${ServiceName}:g" > tmp/dp1.xml
    197 postRequest "${WPSInstance}" "tmp/outputDPp.xml" "DescribeProcess" "tmp/dp1.xml"
    198 echo ""
    199 
    200 #
    201 # Tests for Execute using KVP and POST requests
    202 #
    203 for i in ijson_o igml_o ir_o ir_o_async ir_or ir_or_async irb_o irb_o_async irb_or irb_or_async;
    204 do
    205     cat requests/${i}.xml | sed "s:ServiceName:${ServiceName}:g" > tmp/${i}1.xml
    206     if [ -z "$(echo $i | grep async)" ]; then
    207         postRequest "${WPSInstance}" "tmp/outputE${i}.xml" "Execute" "tmp/${i}1.xml"
    208     else
    209         postRequest "${WPSInstance}" "tmp/outputE${i}.xml" "Execute" "tmp/${i}1.xml" "async"
    210     fi
    211     echo ""
    212 done
    213 
    214 echo ""
  • trunk/zoo-project/HISTORY.txt

    r492 r543  
    11Version 1.4.0-dev
     2  * Binary support for PHP language
     3  * ZOO-API for the Java language
     4  * ZOO-Client Javascript API
     5  * FastCGI fixes
     6  * JavaScript ZOO-API enhancements (COOKIE use and Output in generated XML)
     7  * Add debian files
    28  * Inputs passed by reference downloaded in parallel
    39  * Conform behavior for DescribeProcess when the Identifier was not found
  • trunk/zoo-project/zoo-services/cgal/Makefile

    r522 r543  
    11ZRPATH=../..
    22include ${ZRPATH}/zoo-kernel/ZOOMakefile.opts
    3 CFLAGS=${ZOO_CFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} ${PYTHONCFLAGS} ${CGAL_CFLAGS} -fPIC -DLINUX_FREE_ISSUE #-DDEBUG
     3CFLAGS=${ZOO_CFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} ${PYTHONCFLAGS} ${CGAL_CFLAGS} -frounding-math -fPIC -DLINUX_FREE_ISSUE #-DDEBUG
    44CC=gcc
    55
     
    77        g++ ${CFLAGS} -c ./delaunay.c
    88        g++ ${CFLAGS} -c ./voronoi.c
    9         g++ ${CFLAGS} -shared -o cgi-env/cgal_service.zo ./delaunay.o ./voronoi.o ./cgal_service.o ${GDAL_LIBS} ${MACOS_LD_FLAGS} ${CGAL_LDFLAGS} -lCGAL -lgmp
     9        g++ ${CFLAGS} -shared -o cgi-env/cgal_service.zo ./delaunay.o ./voronoi.o ./cgal_service.o ${GDAL_LIBS} ${MACOS_LD_FLAGS} ${CGAL_LDFLAGS} -lCGAL -lgmp -lgdal
    1010
    1111cgal_service.o: cgal_service.c cgal_service.h
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png