[mapserver-dev] Automated publication of MapServer code coverage

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Jul 8 11:08:18 PDT 2013

Let me know if you need help with the .org part....to be honest I'm not
fully understanding how we would do all this yet...but it could be
linked somehow from http://www.mapserver.org/development/


On 2013-07-08 2:50 PM, thomas bonfort wrote:
> 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
>> --

More information about the mapserver-dev mailing list