[CDash] Submitting to sub projects via Curl

Wouter Klouwen wouter.klouwen at youview.com
Tue Aug 29 12:13:08 UTC 2017


Just to conclude this thread,

invoking the coverage through a CTest script script was indeed the magic
required.
Subsequent submission with curl using just the project name was ingested
by CDash as expected.

Thanks David and Zack,
     W

On 25/08/17 15:59, Wouter Klouwen wrote:
>
> 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:
>> 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:
>>>> 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



More information about the CDash mailing list