<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=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@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><div><div><div><div><div><div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Is it possible to have a ctest which involves preprocessing as well as postprocessing. The code I want to test is myCode.exe, which writes an output file OUTPUT. Measure for success is a comparison of OUTPUT against REFERENCE data file. Currently, I use two add_tests:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>ADD_TEST(code_for_test                 mpiexec  --np 8 myCode.exe input OUTPUT)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>ADD_TEST(measure_for_success     compare.exe OUTPUT REFERENCE 1.e-6)<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'>It works, but I believe there are better ways to achieve this. Also, I would like to have a preprocessing step, which removes OUTPUT before running myCode.exe, just to make sure that the comparison is always against the current OUTPUT and not against OUTPUT left from previous runs. What I have in mind is: <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'>            Remove OUTPUT                                                       </span><span style='font-family:Wingdings;color:#1F497D'>ß</span><span style='color:#1F497D'> preprocessing step<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>            Run myCode.exe                                                         </span><span style='font-family:Wingdings;color:#1F497D'>ß</span><span style='color:#1F497D'> the code being tested<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>            Compare OUTPUT against REFERENCE data.              </span><span style='font-family:Wingdings;color:#1F497D'>ß</span><span style='color:#1F497D'> measure for PASS/FAIL<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'>Thanks in advance,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Ted<o:p></o:p></span></p></div></div></div></div></div></div></div></div></body></html>