[mapserver-dev] Automated publication of MapServer code coverage

Daniel Morissette dmorissette at mapgears.com
Mon Jul 8 13:45:42 PDT 2013


Agreed. Very cool stuff!

Daniel

On 13-07-08 4:10 PM, Lime, Steve D (MNIT) wrote:
> Agreed, very interesting and useful output!
>
> -----Original Message-----
> From: mapserver-dev-bounces at lists.osgeo.org [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of thomas bonfort
> Sent: Monday, July 08, 2013 12:51 PM
> To: Even Rouault
> Cc: MapServer Dev Mailing List
> Subject: Re: [mapserver-dev] Automated publication of MapServer code coverage
>
> Even,
> This is way cool !
> Maybe the resulting pages could be uploaded to the mapserver.org website. I'm not sure about ftp access, but the upload could probably be done with an ssh key. I would also need that functionality to upload artifacts for failed test runs, in order to visually see which tests failed, but that's another story...
>
> regards,
> Thomas
>
> On 6 July 2013 23:52, Even Rouault <even.rouault at mines-paris.org> wrote:
>> Hi devs,
>>
>> What is it about ?
>> --------------------------
>>
>> I've setup a cronjob that publishes the code coverage of MapServer
>> when running the msautotest suite.
>>
>> The results are published at the below links, and updated at each
>> pushed commit in master :
>>
>> http://even.rouault.free.fr/mapserver_coverage_html/home/travis/build/
>> rouault/mapserver/
>>
>> What for ?
>> ----------------
>>
>> This can help improving msautotest to add better coverage for still
>> untested code.
>>
>> How does it work ?
>> ----------------------------
>>
>> I've setup a branch 'mapserver_coverage' in my mapserver fork :
>> https://github.com/rouault/mapserver/commits/master_with_coverage
>>
>> This branch modifies the base .travis.yml to compile mapserver with
>> coverage information (gcc --coverage flag), runs the testsuite and
>> then generate the HTML report of code coverage afterwards with the
>> lcov & genhtml utilities. At the end, it transfers the generated HTML files onto the above site via FTP.
>> (There's a trick to be able to incrementally upload files between
>> jobs. See run_code_coverage_upload.sh and find_updated_files.py )
>>
>> The changes of master_with_coverage vs master are summarized here :
>> https://github.com/rouault/mapserver/compare/master_with_coverage
>>
>> The cronjob just merges 'master' into 'master_with_coverage' regularly
>> and pushes the branch to github, which causes a Travis build.
>>
>> Why in a personnal branch ?
>> -------------------------------------------
>>
>> The issue is with the FTP transfer onto my HTTP page. This requires of
>> course specifying a password that is better kept private... Travis
>> offers a way of doing this securely by putting an encrypted
>> environment variable into the .travis.yml file. When Travis runs the
>> script, it decrypts the environment variable. The variable is
>> encoded/decoded with information linked to the Travis (or github ??
>> I'm not sure) account. There's a security in Travis that prevents
>> people running forks of the repository (or pull requests triggering
>> Travis builds) to steal the decoded information. See
>> http://about.travis- ci.org/docs/user/build-configuration/#Secure-environment-variables for more details.
>>
>> This could likely be merged into the official MapServer repository
>> (this would avoid relying on the cronjob on my PC) if the project
>> manages a FTP repository. I've not investigated if there would be more
>> efficient/simple ways to upload files.
>>
>>
>> Best regards,
>>
>> Even
>>
>> --
>> Geospatial professional services
>> http://even.rouault.free.fr/services.html
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>


-- 
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000



More information about the mapserver-dev mailing list