[CDash] Submitting to sub projects via Curl

Wouter Klouwen wouter.klouwen at youview.com
Fri Aug 25 14:59:38 UTC 2017


At the moment I am executing the running of tests + coverage by means of 
using ctest -T.
I will try to modify this into using the CTest test scripts, and feeding 
this into ctest -S.

Thanks for the hint,
     W

On 25/08/17 15:53, David Cole wrote:
> [External email]
> 
> 
> For this to work right, you need to set that property in the ctest -S
> script which drives and submits the results. Are you using a -S
> script, or are you driving it with ctest command line arguments
> instead?
> 
> 
> 
> On Fri, Aug 25, 2017 at 10:04 AM, Wouter Klouwen
> <wouter.klouwen at youview.com> wrote:
>> Hi Zack,
>>
>> thanks for taking the time to reply.
>>
>> Your suggestion makes sense, though the CTest HTTP submit handler code
>> suggests that the "ctest -T Submit" does this via the HTTP URL:
>>
>> https://github.com/Kitware/CMake/blob/master/Source/CTest/cmCTestSubmitHandler.cxx#L1074
>>
>> Regardless of that, how does one get the Coverage.xml to contain this extra
>> information? Putting the following line into the CMakeLists.txt or even
>> CTestTestfile.cmake doesn't make anything appear in it:
>>      set_property(GLOBAL PROPERTY SubProject "example")
>>
>> Is this more of a question for the CMake group?
>>
>> I did find a fellow soul who seemingly had to do something very similar
>> approximately 4 years ago but never posted an solution to his quandary:
>>
>> https://stackoverflow.com/questions/17885371/ctest-cdash-subproject-xml-elements-missing-under-sites-using-includectest-on
>>
>> Thanks in advance,
>>      W
>>
>> On 25/08/17 13:32, Zack Galbreath wrote:
>>>
>>> [External email]
>>>
>>> It sounds like you got pretty close!  What subproject a build belongs to
>>> should be embedded in the XML file you're submitting. Here's an example
>>> <https://github.com/Kitware/CDash/blob/master/tests/data/AggregateSubProjectCoverage/debug_case/production/Coverage.xml#L26>.
>>> Give this a try and let us know if it still doesn't work for you.
>>>
>>> On Fri, Aug 25, 2017 at 5:39 AM, Wouter Klouwen
>>> <wouter.klouwen at youview.com <mailto:wouter.klouwen at youview.com>> wrote:
>>>
>>>
>>>      Hi All,
>>>
>>>      I'm experimenting with a setup of CDash where I have one big project
>>>      containing a few hundred smaller projects.
>>>
>>>      The first thing I want to do is to use it to gather code coverage
>>>      metrics. I have a setup where Coverage.xml files are created for the
>>>      smaller projects.
>>>
>>>      For a variety of reasons that might not possibly make all that much
>>>      sense, mainly to do with ease of integration into our existing CI
>>>      pipeline, I'd like to curl to manually upload the result XML files,
>>>      rather than using the ctest and DartConfiguration.tcl.
>>>
>>>      There's a page on the wiki that indicated how do to a manual
>>>      submission*, which says to use a PUT and with curl, roughly
>>>      translates into:
>>>
>>>          $ curl -T /path/to/Coverage.xml
>>>
>>> "http://hostname/submit.php?project=ProjectName&FileName=/path/to/Coverage.xml&MD5=somemd5
>>>
>>> <http://hostname/submit.php?project=ProjectName&FileName=/path/to/Coverage.xml&MD5=somemd5>"
>>>
>>>      This works fine for submitting into the main project, but with this
>>>      method I don't seem to be able to submit into a sub project, despite
>>>      adding "subproject=foobar" to the URL.
>>>       From my reading of the PHP, it seems that only one code path actually
>>>      looks for the "subproject" parameter, and it's a POST submission.
>>>
>>>      Should I change to using a POST, perhaps I cannot use manual
>>> submission
>>>      with sub projects, or is there another solution?
>>>
>>>      Thanks in advance,
>>>           W
>>>
>>>
>>>      *:
>>>      https://www.paraview.org/Wiki/CDash:XML#Manually_submitting_to_CDash
>>>      <https://www.paraview.org/Wiki/CDash:XML#Manually_submitting_to_CDash>
>>>      **: https://blog.kitware.com/additional-coverage-features-in-cdash/
>>>      <https://blog.kitware.com/additional-coverage-features-in-cdash/>
>>>
>>>
>>>      This transmission contains information that may be confidential and
>>>      contain personal views which are not necessarily those of YouView TV
>>>      Ltd. YouView TV Ltd (Co No:7308805) is a limited liability company
>>>      registered in England and Wales with its registered address at
>>>      YouView TV Ltd, 3rd Floor, 10 Lower Thames Street, London, EC3R 6YT.
>>>      For details see our web site at http://www.youview.com
>>>      _______________________________________________
>>>      CDash mailing list
>>>      CDash at public.kitware.com <mailto:CDash at public.kitware.com>
>>>      http://public.kitware.com/mailman/listinfo/cdash
>>>      <http://public.kitware.com/mailman/listinfo/cdash>
>>>
>>>
>>>
>>>
>>> [External email. Treat hyperlinks and attachments with caution]
>>>
>> _______________________________________________
>> CDash mailing list
>> CDash at public.kitware.com
>> http://public.kitware.com/mailman/listinfo/cdash



More information about the CDash mailing list