[CMake] how to submit customized test report

girish hilage girish_hilage at yahoo.com
Wed Jan 5 04:57:18 EST 2011


Hi,

   Thanks for the reply.
   I had seen 'TAG' file but somehow thought that it is under every new directory created using timestamp (e.g. 20110104-2359/). So, I had started using below code. However, your solution looks more elegant, so will use it.

file(REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY}/Testing/)
FILE (GLOB_RECURSE item "${CTEST_BINARY_DIRECTORY}/Testing/Test.xml")
FOREACH(filename ${item})
...... use Test.xml ......
ENDFOREACH(filename ${item})

Regards,
Girish

--- On Tue, 1/4/11, Tyler Roscoe <tyler at cryptio.net> wrote:


From: Tyler Roscoe <tyler at cryptio.net>
Subject: Re: [CMake] how to submit customized test report
To: "girish hilage" <girish_hilage at yahoo.com>
Cc: "David Cole" <david.cole at kitware.com>, cmake at cmake.org
Date: Tuesday, January 4, 2011, 4:59 PM


On Mon, Jan 03, 2011 at 05:48:13AM -0800, girish hilage wrote:
>    So, now I have to edit Test.xml generated by 'ctest' under directory : 
>    /home/girish/project/trunk/Testing/20110103-1027/
> 
>    What I would like to know is, if there is any 'CTEST_' variable which would give me path of the Test.xml file that is generated by 'ctest'?
>    Or is there any variable which will give me 'Experimental tag' which is shown in the output (Use Experimental tag: 20110103-1027) if we give -VV option to ctest, so that I can construct path to Test.xml?
>    Or can we ask 'ctest' to generate Test.xml at some pre-specified path?

Not 100% certain of your problem, but I think you're looking for
something like this:

    # Start a new submission.
    ctest_start (${TP_DASHBOARD_MODEL})
    # Calculate TP_CTEST_XML_DIR (which changes whenver ctest_start() is
    # called).
    file (READ "${CTEST_BINARY_DIRECTORY}/Testing/TAG" tag_file)
    string (REGEX MATCH "[^\n]*" xml_dir ${tag_file})
    set (TP_CTEST_XML_DIR "${CTEST_BINARY_DIRECTORY}/Testing/${xml_dir}")


The idea for this comes from Clinton Stimpson. See also:
http://permalink.gmane.org/gmane.comp.programming.tools.cmake.user/27268

hth,
tyler



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110105/aa16be52/attachment.htm>


More information about the CMake mailing list