[CMake] Ctest and custom measurements
ycollette.nospam at free.fr
ycollette.nospam at free.fr
Wed Jul 30 09:07:39 EDT 2014
By the way, this should be better documented in the cmake / ctest documentation.
And we should be allowed to add measurements like these in the log:
Log message - date - <DartMeasurement ...>0.1</DartMeasurement>
Do I fill a bug report for this ?
YC
----- Mail original -----
De: "ycollette nospam" <ycollette.nospam at free.fr>
À: "David Cole" <dlrdave at aol.com>
Cc: cmake at cmake.org
Envoyé: Mercredi 30 Juillet 2014 13:01:31
Objet: Re: [CMake] Ctest and custom measurements
Thanks for the answer. After some trial, I found that I must use <DartMeasurement> and not <NamedMeasurement>.
I also found that to build a correct measurement, the opening tag must be at the beginning of the line, not in the middle:
Log message - date - <DartMeasurement ...>0.1</DartMeasurement> -> DOESN'T WORK
<DartMeasurement ...>0.1</DartMeasurement> -> WORK (I just removed the "Log message - date - " part)
YC
----- Mail original -----
De: "David Cole" <dlrdave at aol.com>
À: "ycollette nospam" <ycollette.nospam at free.fr>, cmake at cmake.org
Envoyé: Mercredi 30 Juillet 2014 12:48:23
Objet: Re: [CMake] Ctest and custom measurements
Unfortunately, I always have to resort to source code analysis to
figure this stuff out... NamedMeasurement is only mentioned in the file
Source/CTest/cmCTestTestHandler.cxx :
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CTest/cmCTestTestHandler.cxx;hb=refs/heads/master
(search the page for NamedMeasurement, and see the function
cmCTestTestHandler::GenerateRegressionImages in particular...)
Transform your output (if you can) into using "DartMeasurement" style
XML tags as shown in this post from 4 years ago:
http://www.cmake.org/pipermail/cmake/2010-April/036574.html
Quoting from that 4-year-old post:
To send a number (for example, 42) as a measurement named "Simple", try
printing output like this on stdout:
<DartMeasurement name="Simple"
type="numeric/integer">42</DartMeasurement>
<DartMeasurement name="pi"
type="numeric/double">3.14159</DartMeasurement>
CTest should parse the DartMeasurement tags from the output and
generate the NamedMeasurement XML that CDash is expecting.
It is a little bit ridiculous to use the legacy format in the output,
which ctest recognizes, and then transforms into what CDash needs, but
it is what is necessary at the moment. You are trying to send what
CDash needs directly, but it gets encoded into the "output" of the
test, rather than recognized like the legacy format....
One of these days, perhaps an easier way will find its way into the
source code.
For now, try the legacy technique and let us know if it works out for
you.
HTH,
David C.
-----Original Message-----
From: ycollette.nospam <ycollette.nospam at free.fr>
To: cmake <cmake at cmake.org>
Sent: Tue, Jul 29, 2014 10:44 am
Subject: [CMake] Ctest and custom measurements
Hello,
I've got an executable built using cmake.
I use ctest to test my executable. Each time the executable is
executed, a log
file on std::cout is produced.
I the log file, I added the following XML tags:
<NamedMeasurement name="my measure"
type="numeric/double"><Value>0.33</Value></NamedMeasurement>
I don't see these named measurements in the xml file produced by ctest
-D
NighlyStart ; ctest -D NighlyTest
I use cmake-2.8.12.2 under Fedora 20 64 bits.
Is it possible to add custom measurements in the xml file generated by
ctest ?
Best regards,
YC
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
More information about the CMake
mailing list