[prev in list] [next in list] [prev in thread] [next in thread]
List: cmake
Subject: Re: [CMake] unit tests include in "all" but not install
From: Miller Henry <MillerHenry () JohnDeere ! com>
Date: 2015-03-23 15:21:22
Message-ID: 35F6921410093E4CA40D524BD5C18D4C26874505 () EDXMB57 ! jdnet ! deere ! com
[Download RAW message or body]
Our tests are in a custom system, but I think you can figure from the snippet.
ADD_CUSTOM_COMMAND(
OUTPUT : ${testName}.xml
DEPENDS ${TEST_EXECUTABLE} ...
COMMAND ${TEST_EXECUTABLE}
ARGS --gtest_output="xml:${testName}.xml"
)
From: CMake [mailto:cmake-bounces@cmake.org] On Behalf Of Scott Aron Bloom
Sent: Monday, March 23, 2015 10:12 AM
To: CMake ML
Subject: Re: [CMake] unit tests include in "all" but not install
I use google test, which can output XML/Junit style (we have another reporting \
system, so junit isn't necessary)..
However, what "Cmake" rules do you use to have to have the test dependent on the \
output file, and not the running of the test?
Scott
From: Miller Henry [mailto:MillerHenry@JohnDeere.com]
Sent: Monday, March 23, 2015 6:44 AM
To: Scott Aron Bloom; CMake ML
Subject: RE: unit tests include in "all" but not install
I have setup our unit tests to output a junit report, and the junit report is what is \
in the all target. Thus my unit tests don't run on a make install if they have run \
during the original make. If anything was rebuilt during the make install only the \
affected tests are run.
This of course depends on your test framework having the ability to create an output \
file. (but there are enough useful things to do from a junit output that I suggest \
you should refuse a framework that doesn't)
From: CMake [mailto:cmake-bounces@cmake.org] On Behalf Of Scott Aron Bloom
Sent: Friday, March 20, 2015 6:24 PM
To: Scott Aron Bloom; CMake ML
Subject: Re: [CMake] unit tests include in "all" but not install
For those who couldn't understand my jibberish.. I apologize, never send email from a \
phone...
Ill restate...
In general, I want all my unit tests to be built when I do a make all, but I really \
don't care if they are up to date for a make install.
Is that a possibility? Ie, add the exclude from all attribute, that is really an \
exclude from install?
Scott
From: CMake [mailto:cmake-bounces@cmake.org] On Behalf Of Scott Aron Bloom
Sent: Friday, March 20, 2015 16:05 PM
To: CMake ML
Subject: [CMake] unit tests include in "all" but not install
In general, I want unit tests, are build when I do a make all, but I really don't \
care if they are up to date for a install..
Is that a possibility?
Scott
[Attachment #3 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle23
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Our tests are in a custom system, \
but I think you can figure from the snippet. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span \
style="color:#1F497D">ADD_CUSTOM_COMMAND(<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="color:#1F497D"> OUTPUT : \
${testName}.xml<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D"> DEPENDS \
${TEST_EXECUTABLE} …<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D"> COMMAND \
${TEST_EXECUTABLE} <o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="color:#1F497D"> ARGS \
--gtest_output="xml:${testName}.xml"<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="color:#1F497D"> \
)<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D"><o:p> </o:p></span></p> <div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> CMake \
[mailto:cmake-bounces@cmake.org] <b>On Behalf Of </b>Scott Aron Bloom<br>
<b>Sent:</b> Monday, March 23, 2015 10:12 AM<br>
<b>To:</b> CMake ML<br>
<b>Subject:</b> Re: [CMake] unit tests include in "all" but not \
install<o:p></o:p></span></p> </div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">I use google test, which can output \
XML/Junit style (we have another reporting system, so junit isn’t \
necessary)..<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D">However, what “Cmake” rules do you use to have to \
have the test dependent on the output file, and not the running of the test?<br> <br>
Scott<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"></a><span \
style="color:#1F497D"><o:p> </o:p></span></p> <div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> \
Miller Henry [<a href="mailto:MillerHenry@JohnDeere.com">mailto:MillerHenry@JohnDeere.com</a>]
<br>
<b>Sent:</b> Monday, March 23, 2015 6:44 AM<br>
<b>To:</b> Scott Aron Bloom; CMake ML<br>
<b>Subject:</b> RE: unit tests include in "all" but not \
install<o:p></o:p></span></p> </div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">I have setup our unit tests to \
output a junit report, and the junit report is what is in the all target. Thus \
my unit tests don’t run on a make install if they have run during the original \
make. If anything was rebuilt during the make install only the affected tests are \
run.<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D">This of course depends on your test framework having the \
ability to create an output file. (but there are enough useful things to do \
from a junit output that I suggest you should refuse a framework that \
doesn’t)<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D"><o:p> </o:p></span></p> <div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> CMake \
[<a href="mailto:cmake-bounces@cmake.org">mailto:cmake-bounces@cmake.org</a>] <b>On \
Behalf Of </b>Scott Aron Bloom<br> <b>Sent:</b> Friday, March 20, 2015 6:24 PM<br>
<b>To:</b> Scott Aron Bloom; CMake ML<br>
<b>Subject:</b> Re: [CMake] unit tests include in "all" but not \
install<o:p></o:p></span></p> </div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">For those who couldn’t \
understand my jibberish.. I apologize, never send email from a \
phone…<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D">Ill restate…<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="color:#1F497D">In general, I want all my unit tests to \
be built when I do a make all, but I really don’t care if they are up to date \
for a make install.<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D">Is that a possibility? Ie, add the exclude from all \
attribute, that is really an exclude from install?<br> <br>
Scott<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> CMake \
[<a href="mailto:cmake-bounces@cmake.org">mailto:cmake-bounces@cmake.org</a>] <b>On \
Behalf Of </b>Scott Aron Bloom<br> <b>Sent:</b> Friday, March 20, 2015 16:05 PM<br>
<b>To:</b> CMake ML<br>
<b>Subject:</b> [CMake] unit tests include in "all" but not \
install<o:p></o:p></span></p> </div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In general, I want unit tests, are build when I do a make all, \
but I really don’t care if they are up to date for a install..<o:p></o:p></p> \
<p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Is that a \
possibility?<br> <br>
Scott<o:p></o:p></p>
</div>
</body>
</html>
--
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
--===============1082126735==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic