Running tests faster..

David Faure faure at kde.org
Tue May 15 17:42:43 BST 2012


On Sunday 13 May 2012 00:04:43 Alexander Neundorf wrote:
> Hi,
> 
> just a quick hint, maybe you don't know this yet:
> 
> You can run tests using "make test".
> This will run test by test after each other.
> Internally this simply calls ctest.
> 
> If you call ctest manually, you can use extra command line options, and, it
> supports -jN, as make does.
> 
> So, if you have 4 cores, run
> ctest -j4
> to have it execute 4 tests in parallel and save time this way.

Save time...  but at the expense of more failures, if the tests aren't ready 
for this ;-)

E.g. in kdelibs I get 3 more failures, due to ksycoca-related tests creating 
and removing services that show up in other tests' queries, or other tests 
reading and writing from the same shared files.
Any shared resource makes this impossible, but it's interesting to keep in 
mind for the design of future unit tests.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5



More information about the kde-core-devel mailing list