Test for CVS plugin
Matt Rogers
mattr at kde.org
Sun Apr 15 15:00:01 UTC 2007
On Saturday 14 April 2007 17:32, Robert Gruber wrote:
> Hello,
>
> I just did a small test app for the cvs plugin. As far as I've
> never written a unit test using QTestLib before, it would be
> nice if somebody could take a look at what I've done so far.
> Just copy the attached archive to kdevelop/lib/plugins/vcs/cvs and
> extract it. (make sure kdevelop/lib/plugins/vcs/cvs is up-to-date first)
>
The test looks quite nice. Sets up the repo, and tests import to make sure it
works correctly. You're on the right track here. :)
> First I run into trouble because I could not link to my shared
> plugin library. So I added the needed source files (cvsjob.cpp
> and cvsproxy.cpp) directly to the test app by doing this
> in the test's CMakeLists.txt file:
> set(cvstest_SRCS ../cvsjob.cpp ../cvsproxy.cpp)
> Is this OK? Or is there a better way?
While that's technically ok, I think you end up compiling those files more
than once. I was having the same problem and worked around it by providing a
library and have my plugin code and my test code link to that. However, that
may not be ideal either since you'll have to install both the plugin library
and the common library that your plugin links to.
>
>
> Thanks, Robert
>
>
>
> BTW: When I issue "make test" in kdevelop's builddir, it tells me this:
> Test project /home/kdedev/src/kdevelop/builddir
> 1/ 5 Testing kdevcvs-test Passed
> 2/ 5 Testing qmake-parsetest Unable to find executable:
> /qmake-parsetest 3/ 5 Testing qmake-assignmenttest Unable to find
> executable: /qmake-assignmenttest 4/ 5 Testing qmake-functionscopetest
> Unable to find executable: /qmake-functionscopetest 5/ 5 Testing
> qmake-scopetest Unable to find executable: /qmake-scopetest
>
> 20% tests passed, 4 tests failed out of 5
>
>
> Are the qmake test broken, or do I have to call anything else than "make
> test" to run them?
I don't know about the qmake tests. Maybe Andreas can tell you more.
Nice work!
--
Matt
More information about the KDevelop-devel
mailing list