[CMake] CTest and X server while logged out on linux

Clinton Stimpson clinton at elemtech.com
Wed Mar 24 14:21:43 EDT 2010


How about using xvfb-run to create a virtual X session?

30 1 * * 1,2,3,4,5      tom    /usr/bin/xvfb-run /usr/bin/ctest -j4 -VV -S 
some_full_path_ctest_option.cmake -O some_full_path_log.txt

Clint

On Wednesday 24 March 2010 12:05:14 pm Tom Vercauteren wrote:
> Hi all,
> 
> Apologies if my question seems a little off-topic for this mailing
> list. I know it's rather a linux cron question but the use case seems
> mostly useful in a dashboard setup to me. I have not found a decent
> answer with google yet and thought that if someone knew how to solve
> my problem, it would be beneficial  to add it to
>   http://www.cmake.org/Wiki/CMake_Scripting_Of_CTest#On_Unix.2FMacOSX
> 
> Here is my scenario. I have a project that is built with cmake, tested
> with ctest and the results are sent to cdash. The process runs every
> night with a cron job and I am not in front of my computer at this
> time. Some tests need a X server to complete even if they are fully
> automated.
> 
> If I leave my session open during the night, everything is OK.
> However, if I log out, the unit tests fail with the following error:
>   "cannot connect to X server :0"
> 
> Would anyone know how to solve this problem and give the cron job
> access to X even when I am not logged in?
> 
> My current crontab contains the following lines
> 
> DISPLAY=:0
> 
> 30 1 * * 1,2,3,4,5      tom     /usr/bin/ctest -j4 -VV -S
> some_full_path_ctest_option.cmake -O some_full_path_log.txt
> 
> 
> My computer runs on kubuntu karmic if that's of any importance.
> 
> From what I have read, I might need to do something with xauth, xhost,
> or ~/.Xauthority but I must confess I am rather lost in these matters.
> 
> Best regards,
> Tom
> _______________________________________________
> 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
> 


More information about the CMake mailing list