Hi all,
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.
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
so I do this in my CMake file:
add_test ( NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME} -xml -o
log/foo.xml )
So now, when I do the "run_test" through visual, my test is run and my file
is created (so far so good!).
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).
So I have considered the following solution (I did not succeed in
implementing it so far):
I want to execute a script, just after the execution of my test that will
rename the result file generated.
--> Here I don't know how I can tell CMake to execute my script just when
the test has been executed ?
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.
Any insight is welcomed on how to implement my suggestion (or if you have
another choice, I'm all ears :)! ).
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake