[CMake] Categorizing test results displayed via CDash
Neelima Mehdiratta
nmehdiratta at decarta.com
Sat Sep 4 23:24:43 EDT 2010
My CTestConfig.txt file currently uses CTEST_COMMAND and
CTEST_CMAKE_COMMAND to drive the dashboard builds.
SET(CTEST_COMMAND "ctest -D ${CTEST_SCRIPT_ARG}Start -D
${CTEST_SCRIPT_ARG}Update -D ${CTEST_SCRIPT_ARG}Configure -D
${CTEST_SCRIPT_AR\
G}Build -D ${CTEST_SCRIPT_ARG}Test -D ${CTEST_SCRIPT_ARG}Coverage -D
${CTEST_SCRIPT_ARG}Submit --track ${CTEST_SCRIPT_ARG} -A $ENV{PWD\
}/notes.txt")
SET(CTEST_CMAKE_COMMAND "cmake -G \"$ENV{DECARTA_GENERATOR}\"
-DDECARTA_AUTOMATED:STRING=1 -DDECARTA_TEST_ENABLED:STRING=1
-DDASHBOARD\
_TYPE:STRING=${CTEST_SCRIPT_ARG}
-DCMAKE_BUILD_TYPE:STRING=$ENV{CMAKE_BUILD_TYPE}
-DDECARTA_LIBRARY_TYPE:STRING=$ENV{DECARTA_LIBRARY_T\
YPE}")
It appears that to use subprojects and partial submits I need to use the
"new" style of ctest -S script which would look something like this:
CTEST_START(${CTEST_SCRIPT_ARG})
CTEST_UPDATE(SOURCE "${CTEST_SOURCE_DIRECTORY}")
CTEST_SUBMIT(PARTS Update Notes)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
OPTIONS "-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}"
)
CTEST_SUBMIT(PARTS Configure)
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_SUBMIT(PARTS Build)
foreach(subproject ${CTEST_PROJECT_SUBPROJECTS})
set_property(GLOBAL PROPERTY SubProject ${subproject})
set_property(GLOBAL PROPERTY Label ${subproject})
ctest_test(BUILD "$CTEST_BINARY_DIRECTORY" INCLUDE_LABEL
${subproject})
ctest_submit(PARTS TEST)
endforeach()
Both style of scripts are executed using: ctest -S CTestConfig.cmake,
Experimental -VV
1) I need to be able to pass the same flags to cmake as with the
old script (as shown above). Is there a way to do that with the new
style of the script?
2) If I use the new style of commands and put them in the
CTestConfig.cmake file (to replace CTEST_COMMAND and
CTEST_CMAKE_COMMAND) , it really confuses CTest which appears to read
the CTestConfig.cmake file over and over again. So does that mean that
these new style of commands cannot be put in a CTestConfig.cmake file
but need to be put in some other .cmake file? I couldn't find any
documentation on this.
3) This leads me to my 3rd question: which is: What is the
difference between CTestConfig.cmake and some other .cmake file that is
passed to ctest -S?
Thanks.
Neelima
From: ceej at lambda.nu [mailto:ceej at lambda.nu] On Behalf Of Chris Hillery
Sent: Tuesday, August 31, 2010 10:07 PM
To: Neelima Mehdiratta
Cc: cmake at cmake.org
Subject: Re: [CMake] Categorizing test results displayed via CDash
Check out this article:
http://www.kitware.com/blog/home/post/11
and read the article in the Kitware Quarterly that is linked to from
there on "CDash subprojects".
It's not nearly as clean and straightforward as it should be, IMHO, but
it does work.
Ceej
aka Chris Hillery
On Tue, Aug 31, 2010 at 9:00 PM, Neelima Mehdiratta
<nmehdiratta at decarta.com> wrote:
I am writing unit tests for our software using the Google test
framework. There is only one CMakeLists.txt file at the top-level of
the unit test hierarchy, which creates one executable that runs all the
tests. I'm using CTest to run the tests and display the results via
CDash. The unit tests test several software modules and I would like to
display the results categorized according to the modules, via CDash.
The structure of the unit test code is as follows:
Root (test) directory which has the CMakeLists.txt file, test code
common to all tests and several directories (one for each module that
needs to be tested). These directories contain only the unit test code,
but no CMakeLists.txt files. Currently I can only get a flat structure
(a single list of the test results) displayed via CDash (by using an
ADD_TEST() line per test). This list would become really long over time
and developers would mostly be interested in specific modules. Is there
a way to display the tests results categorized by the module being
tested, via CDash?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100904/1a78fff7/attachment-0001.htm>
More information about the CMake
mailing list