Hi all,<br><br>I am using the Qt module QTestLib to do some tests on my application (windows, MSVC 2008) that has been all set up with CMake.<br><br>A test I have created with QTestLib is executed, all output is sent to the command window. Since I want it to a file, I used what Qt suggest to redirect all output: -xml -o my_file.xml<br>
so I do this in my CMake file:<br><br>add_test ( NAME   ${PROJECT_NAME}   COMMAND   ${PROJECT_NAME} -xml -o log/foo.xml )<br><br>So now, when I do the &quot;run_test&quot; through visual, my test is run and my file is created (so far so good!).<br>
<br><br>My problem is that I want the name of the file to be time and date dependant (log20110908140230.xml - a year, month, day, hour, minute and second format).<br><br>So I have considered the following solution (I did not succeed in implementing it so far):<br>
I want to execute a script, just after the execution of my test that will rename the result file generated.<br>--&gt; Here I don&#39;t know how I can tell CMake to execute my script just when the test has been executed ?<br>
<br>NB: I do NOT have any problem creating a script that rename a foo.xml file to a log20110908140230.xml file (my script.bat file is already ready). The problem is how to make this script to be executed just after the test execution.<br>
<br><br>Any insight is welcomed on how to implement my suggestion (or if you have another choice, I&#39;m all ears :)! ).<br><br>