Re: unit testing a freeze

2012-03-22 Thread Frank Reininghaus
Hi, Am 22. März 2012 01:11 schrieb Dario Freddi: Il 21 marzo 2012 22:29, Dominik Haumann ha scritto: Moin, is there a simple way to unit test a freeze? Like if the test needs more than 5 seconds, fail? There's no straightforward way to check afaik and I don't really like the thread

Re: unit testing a freeze

2012-03-22 Thread Dominik Haumann
On Thursday, March 22, 2012 01:11:53 Dario Freddi wrote: Il 21 marzo 2012 22:29, Dominik Haumann dhaum...@kde.org ha scritto: Moin, is there a simple way to unit test a freeze? Like if the test needs more than 5 seconds, fail? There's no straightforward way to check afaik and I don't

Re: Re: unit testing a freeze

2012-03-22 Thread Alex Fiestas
Execute the process with K/QProcess, then try to send a unix signal to it, that might work as well though it depends on unix signals which are crappy. Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe

Re: unit testing a freeze

2012-03-22 Thread Milian Wolff
On Wednesday 21 March 2012 22:29:53 Dominik Haumann wrote: Moin, is there a simple way to unit test a freeze? Like if the test needs more than 5 seconds, fail? One way would be to create a thread, start the freeze unit test, and if the thread does not finish in some time period, kill it

Re: unit testing a freeze

2012-03-22 Thread Dominik Haumann
On Thursday, March 22, 2012 10:47:18 Milian Wolff wrote: Why not Zoidberg? Uhm I mean: ctest --timeout seconds That would do the trick. Is it possible to set this timeout for a single test in CMakeLists.txt? On Thursday, March 22, 2012 10:33:49 Alex Fiestas wrote: Execute the process with

Re: unit testing a freeze

2012-03-22 Thread Milian Wolff
On Thursday 22 March 2012 11:08:35 Dominik Haumann wrote: On Thursday, March 22, 2012 10:47:18 Milian Wolff wrote: Why not Zoidberg? Uhm I mean: ctest --timeout seconds That would do the trick. Is it possible to set this timeout for a single test in CMakeLists.txt? yes:

Re: unit testing a freeze

2012-03-22 Thread Dominik Haumann
On Thursday, 22. March 2012 15:50:34 Milian Wolff wrote: On Thursday 22 March 2012 11:08:35 Dominik Haumann wrote: On Thursday, March 22, 2012 10:47:18 Milian Wolff wrote: Why not Zoidberg? Uhm I mean: ctest --timeout seconds That would do the trick. Is it possible to set this timeout

unit testing a freeze

2012-03-21 Thread Dominik Haumann
Moin, is there a simple way to unit test a freeze? Like if the test needs more than 5 seconds, fail? One way would be to create a thread, start the freeze unit test, and if the thread does not finish in some time period, kill it and fail. But that's rather complicated for such a simple thing.

Re: unit testing a freeze

2012-03-21 Thread Dario Freddi
Il 21 marzo 2012 22:29, Dominik Haumann dhaum...@kde.org ha scritto: Moin, is there a simple way to unit test a freeze? Like if the test needs more than 5 seconds, fail? There's no straightforward way to check afaik and I don't really like the thread approach. What are you trying to verify?