Now the infrastructure for providing bindings exlusively for test scripts in debug builds is in place. This required some CMake magic to set a preprocessor variable DEBUG in debug builds which then can be used in various #ifdefs to make public slots out of public object members, which then can be accessed from scripts. In the beginning the idea was to do this more elegantly, by putting the slot definitions into other preprocessor defines, like AMAROK_DEBUG_EXPORT. This way a lot of #ifdefs could be saved and the code would be much better to read. Sadly the moc preprocessor required to offer the bindings doesn't understand many commands and #define is one of those it lacks. So now you might stumble upon things like:
#if defined(DEBUG)
public slots:
#else
public:
#endif
Sorry, I couldn't find a less ugly way currently.
With that working I started adding bindings to Amarok classes to the script engine for test scripts. Playlist::Actions, Playlist::Controller, PlaylistManager and Meta:TrackPtr are there now. The next problem I stumbled upon was that some more classes have to be known to scripts to write reasonable tests. Currently I'm about to provide a prototype for KUrl, which doesn't work yet, but I think I know what went wrong there.
As of this writing I'm sitting in the train to LinuxTag in Berlin, where I'll be until Saturday, but hopefully some code can nevertheless be written. Feel free to visit our booth or one of our talks and workshops.