GSoC Status Update July/2

Sven Krohlas sven at asbest-online.de
Tue Jul 21 13:24:31 CEST 2009


Heya,

this week I was thinking about the idea that came up after the
last status report: why a gui if mainly developers will run the
tests? So I checked out the ways Qt offers to make each test
class a standalone executable (using the QTEST_MAIN macro). This
is quite nice but has a massive drawback: compiling and linking
to more complicated classes with a lot of dependencies to other
parts of Amarok and generated files becomes a pita (I tried that
with PlaylistManager). Those problems vanish when integrating all
tests into Amarok itself. So on my branch we have now a new
parameter --test for Amarok, intended to run all available unit
tests. The constructor of a test class now simply calls the init-,
test- and cleanup-methods.

This approach is quite fast currently (here two test classes are
being run):

amarok:             BEGIN: static void App::runUnitTests()
amarok:             END__: static void App::runUnitTests() - Took 0.00038s

But... I also miss any output currently. when looking at the docs
about QCOMPARE they shocked me a bit: "Note: This macro can only
be used in a test function that is invoked by the test framework.".

Well, so I might need to write some utility functions/macros for
that approach. I'm still investigating this problem atm.
-- 
Darkerradio Free Music Charts:
http://www.darkerradio.com/news/free-music-charts-juni-2009/
Zweitstimme ist PIRATENstimme! -> http://ich.waehlepiraten.de/


More information about the Amarok-devel mailing list